Re: Can't compile postgresql 11 on FreeBSD 11.1
On 23/07/2018 09:22, Achilleas Mantzios wrote: On 17/07/2018 23:25, Tom Lane wrote: Adrian Klaver writes: On 07/17/2018 12:34 PM, Márcio Antônio Sepp wrote: I'm trying to compile PostgreSQL 11beta2 but this errors occur: checking readline.h usability... no Looks like you need whatever is the FreeBSD equivalent of readline-dev(el). AFAICT FreeBSD doesn't do things that way. On a nearby machine, I see $ pkg which /usr/local/include/readline/readline.h /usr/local/include/readline/readline.h was installed by package readline-6.3.8 What's more likely the problem is that FreeBSD insists on installing packages under /usr/local, but it does *not* set that up to be part of gcc's default search paths. (Security 1, usability 0.) You need these configure flags to do much of anything on that platform: --with-includes=/usr/local/include --with-libs=/usr/local/lib For ages I have been manually compiling PostgreSQL under FreeBSD with only : ./configure --with-ldap But in my case I tend to fall back to gcc instead of the native clang/llvm . That might be his issue. It seems to be the case. With GCC installed, by default I get no problems : root@smadev:/usr/local/src/postgresql-11beta2# uname -a FreeBSD smadev.internal.net 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 root@smadev:/usr/local/src/postgresql-11beta2# root@smadev:/usr/local/src/postgresql-11beta2# cd /usr/local/src/postgresql-11beta2 root@smadev:/usr/local/src/postgresql-11beta2# ./configure . config.status: linking src/makefiles/Makefile.freebsd to src/Makefile.port root@smadev:/usr/local/src/postgresql-11beta2# echo $? 0 By looking into config.log : configure:3885: checking for gcc configure:3901: found /usr/local/bin/gcc configure:3912: result: gcc configure:3943: checking for C compiler version configure:3952: gcc --version >&5 gcc (FreeBSD Ports Collection) 6.4.0 Now, if I configure for clang I get the error : root@smadev:/usr/local/src/postgresql-11beta2# setenv CC cc root@smadev:/usr/local/src/postgresql-11beta2# ./configure .. checking for readline/readline.h... no configure: error: readline header not found If you have libedit already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-readline to disable libedit support. root@smadev:/usr/local/src/postgresql-11beta2# As suggested, when using clang, the way to overcome is via : ./configure --with-includes=/usr/local/include --with-libs=/usr/local/lib regards, tom lane -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt
Re: Can't compile postgresql 11 on FreeBSD 11.1
On 17/07/2018 23:25, Tom Lane wrote: Adrian Klaver writes: On 07/17/2018 12:34 PM, Márcio Antônio Sepp wrote: I'm trying to compile PostgreSQL 11beta2 but this errors occur: checking readline.h usability... no Looks like you need whatever is the FreeBSD equivalent of readline-dev(el). AFAICT FreeBSD doesn't do things that way. On a nearby machine, I see $ pkg which /usr/local/include/readline/readline.h /usr/local/include/readline/readline.h was installed by package readline-6.3.8 What's more likely the problem is that FreeBSD insists on installing packages under /usr/local, but it does *not* set that up to be part of gcc's default search paths. (Security 1, usability 0.) You need these configure flags to do much of anything on that platform: --with-includes=/usr/local/include --with-libs=/usr/local/lib For ages I have been manually compiling PostgreSQL under FreeBSD with only : ./configure --with-ldap But in my case I tend to fall back to gcc instead of the native clang/llvm . That might be his issue. regards, tom lane -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt
RES: Can't compile postgresql 11 on FreeBSD 11.1
Now to the list... > >> I'm trying to compile PostgreSQL 11beta2 but this errors occur: > >> checking readline.h usability... no > > > Looks like you need whatever is the FreeBSD equivalent of readline- > dev(el). > > AFAICT FreeBSD doesn't do things that way. On a nearby machine, I see > > $ pkg which /usr/local/include/readline/readline.h > /usr/local/include/readline/readline.h was installed by package > readline-6.3.8 > > What's more likely the problem is that FreeBSD insists on installing > packages under /usr/local, but it does *not* set that up to be part of > gcc's default search paths. (Security 1, usability 0.) You need > these configure flags to do much of anything on that platform: > > --with-includes=/usr/local/include --with-libs=/usr/local/lib That is right. Including lines above everything works fine. Thanks so much.
Re: Can't compile postgresql 11 on FreeBSD 11.1
On Tue, Jul 17, 2018 at 4:30 PM, Christoph Moench-Tegeder < c...@burggraben.net> wrote: > ## Olivier Gautherot (oliv...@gautherot.net): > > > To: Christoph Moench-Tegeder > > I think you meant to hit List-Reply... > Ooops, my bad... > > I just pulled the .tar.bz2 archive and compiled it with no issue. > > In that case I suspect you have CFLAGS, CPPFLAGS and/or LDFLAGS > set in your environment, or you are using a compiler with non- > standard include/library paths. Default cc (clang) does not > search in /usr/local by default (at least on 11.2, but that did > not change with the update). > Basically, the port's CONFIGURE_ARGS are there for a reason... > I compiled the standard archive and noticed that it used GCC 6.4.0 - and I think it does include /usr/local/include in the standard header files path. I checked the environment and there are no custom CFLAGS/CPPFLAGS/LDFLAGS. My default shell is csh (I doubt it makes any difference). My test machine was a FreeBSD 11.2, if that matters. Márcio, do you have GCC installed?
Re: Can't compile postgresql 11 on FreeBSD 11.1
Adrian Klaver writes: > On 07/17/2018 12:34 PM, Márcio Antônio Sepp wrote: >> I'm trying to compile PostgreSQL 11beta2 but this errors occur: >> checking readline.h usability... no > Looks like you need whatever is the FreeBSD equivalent of readline-dev(el). AFAICT FreeBSD doesn't do things that way. On a nearby machine, I see $ pkg which /usr/local/include/readline/readline.h /usr/local/include/readline/readline.h was installed by package readline-6.3.8 What's more likely the problem is that FreeBSD insists on installing packages under /usr/local, but it does *not* set that up to be part of gcc's default search paths. (Security 1, usability 0.) You need these configure flags to do much of anything on that platform: --with-includes=/usr/local/include --with-libs=/usr/local/lib regards, tom lane
Re: Can't compile postgresql 11 on FreeBSD 11.1
## Márcio Antônio Sepp (mar...@zyontecnologia.com.br): > Im trying to compile PostgreSQL 11beta2 but this errors occur: > > root@srvbacula:/postgresql/postgresql-11beta2 # ./configure Stop right here and try using the same configure command line as the port (postgresql10-server, as there's no v11 port yet). At the very minimum, you will need "--with-libraries=/usr/local/lib" and "--with-includes=/usr/local/include". That makes configure pass for me. Regards, Christoph -- Spare Space
Re: Can't compile postgresql 11 on FreeBSD 11.1
On 07/17/2018 12:34 PM, Márcio Antônio Sepp wrote: Hi, I’m trying to compile PostgreSQL 11beta2 but this errors occur: checking readline.h usability... no checking readline.h presence... no checking for readline.h... no checking readline/readline.h usability... no checking readline/readline.h presence... no checking for readline/readline.h... no configure: error: readline header not found If you have libedit already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-readline to disable libedit support. root@srvbacula:/postgresql/postgresql-11beta2 # pkg info | grep readline readline-7.0.3_1 Library for editing command lines as they are typed Looks like you need whatever is the FreeBSD equivalent of readline-dev(el). root@srvbacula:/postgresql/postgresql-11beta2 # thanks in advance -- Att Márcio A. Sepp -- Adrian Klaver adrian.kla...@aklaver.com
Can't compile postgresql 11 on FreeBSD 11.1
Hi, Im trying to compile PostgreSQL 11beta2 but this errors occur: root@srvbacula:/postgresql/postgresql-11beta2 # ./configure checking build system type... x86_64-unknown-freebsd11.1 checking host system type... x86_64-unknown-freebsd11.1 checking which template to use... freebsd checking whether NLS is wanted... no checking for default port number... 5432 checking for block size... 8kB checking for segment size... 1GB checking for WAL block size... 8kB checking for gcc... no checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking for g++... no checking for c++... c++ checking whether we are using the GNU C++ compiler... yes checking whether c++ accepts -g... yes checking whether cc supports -Wdeclaration-after-statement, for CFLAGS... yes checking whether cc supports -Wendif-labels, for CFLAGS... yes checking whether c++ supports -Wendif-labels, for CXXFLAGS... yes checking whether cc supports -Wmissing-format-attribute, for CFLAGS... yes checking whether c++ supports -Wmissing-format-attribute, for CXXFLAGS... yes checking whether cc supports -Wformat-security, for CFLAGS... yes checking whether c++ supports -Wformat-security, for CXXFLAGS... yes checking whether cc supports -fno-strict-aliasing, for CFLAGS... yes checking whether c++ supports -fno-strict-aliasing, for CXXFLAGS... yes checking whether cc supports -fwrapv, for CFLAGS... yes checking whether c++ supports -fwrapv, for CXXFLAGS... yes checking whether cc supports -fexcess-precision=standard, for CFLAGS... no checking whether c++ supports -fexcess-precision=standard, for CXXFLAGS... no checking whether cc supports -funroll-loops, for CFLAGS_VECTOR... yes checking whether cc supports -ftree-vectorize, for CFLAGS_VECTOR... yes checking whether cc supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... yes checking whether cc supports -Wformat-truncation, for NOT_THE_CFLAGS... no checking whether cc supports -Wstringop-truncation, for NOT_THE_CFLAGS... no checking whether the C compiler still works... yes checking how to run the C preprocessor... cc -E checking allow thread-safe client libraries... yes checking whether to build with ICU support... no checking whether to build with Tcl... no checking whether to build Perl modules... no checking whether to build Python modules... no checking whether to build with GSSAPI support... no checking whether to build with PAM support... no checking whether to build with BSD Authentication support... no checking whether to build with LDAP support... no checking whether to build with Bonjour support... no checking whether to build with OpenSSL support... no checking whether to build with SELinux support... no checking whether to build with systemd support... no checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for ranlib... ranlib checking for strip... strip checking whether it is possible to strip libraries... no checking for ar... ar checking for a BSD-compatible install... /usr/bin/install -c checking for tar... /usr/bin/tar checking whether ln -s works... yes checking for gawk... no checking for mawk... no checking for nawk... nawk checking for a thread-safe mkdir -p... config/install-sh -c -d checking for bison... no configure: WARNING: *** Without Bison you will not be able to build PostgreSQL from Git nor *** change any of the parser definition files. You can obtain Bison from *** a GNU mirror site. (If you are using the official distribution of *** PostgreSQL then you do not need to worry about this, because the Bison *** output is pre-generated.) checking for flex... /usr/bin/flex configure: using flex 2.5.37 checking for perl... /usr/local/bin/perl configure: using perl 5.26.2 checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking if compiler needs certain flags to reject unknown flags... no checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for