compiling PostgreSQL with --enable-llvm - Mailing list pgsql-novice

From Saifi Khan
Subject compiling PostgreSQL with --enable-llvm
Date
Msg-id 20190508015546.16964.qmail@server322.com
Whole thread Raw
Responses Re: compiling PostgreSQL with --enable-llvm  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi:

environment is
GNU/Linux 4.18.0-32.el8.x86_64

toolchain environment is
--------------------------------

LLVM (http://llvm.org/):
LLVM version 8.0.0
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: btver2

clang version 8.0.0 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin


madrid $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto
--prefix=/usr--mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-shared--enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib
--enable-__cxa_atexit--disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl
--enable-offload-targets=nvptx-none--without-cuda-driver --enable-gnu-indirect-function --enable-cet
--with-tune=generic--with-arch_32=i686 --build=x86_64-redhat-linux
 
Thread model: posix
gcc version 9.0.1 20190426 (Red Hat 9.0.1-0.15) (GCC) 


issue faced
---------------------

configured PostgreSQL 'master' with --enable-llvm and --without-readline option

on compilation the following error is seen.

In file included from llvmjit_inline.cpp:35:
/usr/include/unistd.h:1124:14: error: declaration of ‘char* crypt(const char*, const char*) throw ()’ has a different
exceptionspecifier
 
 1124 | extern char *crypt (const char *__key, const char *__salt)
      |              ^~~~~
In file included from ../../../../src/include/c.h:1267,
                 from ../../../../src/include/postgres.h:46,
                 from llvmjit_inline.cpp:24:
../../../../src/include/port.h:334:14: note: from previous declaration ‘char* crypt(const char*, const char*)’
  334 | extern char *crypt(const char *key, const char *setting);
      |              ^~~~~
make[2]: *** [<builtin>: llvmjit_inline.o] Error 1
make[2]: Leaving directory '/home/strikr/src/postgresql/postgres/src/backend/jit/llvm'
make[1]: *** [Makefile:42: all-backend/jit/llvm-recurse] Error 2
make[1]: Leaving directory '/home/strikr/src/postgresql/postgres/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2
madrid $ 


how do i work around this error ? Any pointers ?

warm regards
Saifi.



pgsql-novice by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Does DROP TABLE on table A with foreign key to table B locksSELECT queries on table B?
Next
From: Gavin M2301
Date:
Subject: trouble connecting with psql to running server