pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Can't compile postgresql 11 on FreeBSD 11.1
7+ messages / 6 participants
[nested] [flat]

* Can't compile postgresql 11 on FreeBSD 11.1
@ 2018-07-17 19:34 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
  2018-07-17 19:37 ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Adrian Klaver <adrian.klaver@aklaver.com>
  2018-07-17 19:47 ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Christoph Moench-Tegeder <cmt@burggraben.net>
  0 siblings, 2 replies; 7+ messages in thread

From: Márcio Antônio Sepp @ 2018-07-17 19:34 UTC (permalink / raw)
  To: pgsql-general

 

Hi,

 

 

I’m 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 joinable pthread attribute... PTHREAD_CREATE_JOINABLE

checking if more special flags are required for pthreads... -D_THREAD_SAFE

checking for PTHREAD_PRIO_INHERIT... yes

checking pthread.h usability... yes

checking pthread.h presence... yes

checking for pthread.h... yes

checking for strerror_r... yes

checking for getpwuid_r... yes

checking for gethostbyname_r... yes

checking whether strerror_r returns int... yes

checking for main in -lm... yes

checking for library containing setproctitle... none required

checking for library containing dlopen... none required

checking for library containing socket... none required

checking for library containing shl_load... no

checking for library containing getopt_long... none required

checking for library containing crypt... -lcrypt

checking for library containing shm_open... none required

checking for library containing shm_unlink... none required

checking for library containing clock_gettime... none required

checking for library containing fdatasync... none required

checking for library containing sched_yield... none required

checking for library containing gethostbyname_r... none required

checking for library containing shmget... none required

checking for library containing readline... -ledit

checking for inflate in -lz... yes

checking for stdbool.h that conforms to C99... yes

checking for _Bool... yes

checking atomic.h usability... no

checking atomic.h presence... no

checking for atomic.h... no

checking crypt.h usability... no

checking crypt.h presence... no

checking for crypt.h... no

checking dld.h usability... no

checking dld.h presence... no

checking for dld.h... no

checking fp_class.h usability... no

checking fp_class.h presence... no

checking for fp_class.h... no

checking getopt.h usability... yes

checking getopt.h presence... yes

checking for getopt.h... yes

checking ieeefp.h usability... yes

checking ieeefp.h presence... yes

checking for ieeefp.h... yes

checking ifaddrs.h usability... yes

checking ifaddrs.h presence... yes

checking for ifaddrs.h... yes

checking langinfo.h usability... yes

checking langinfo.h presence... yes

checking for langinfo.h... yes

checking mbarrier.h usability... no

checking mbarrier.h presence... no

checking for mbarrier.h... no

checking poll.h usability... yes

checking poll.h presence... yes

checking for poll.h... yes

checking sys/epoll.h usability... no

checking sys/epoll.h presence... no

checking for sys/epoll.h... no

checking sys/ipc.h usability... yes

checking sys/ipc.h presence... yes

checking for sys/ipc.h... yes

checking sys/pstat.h usability... no

checking sys/pstat.h presence... no

checking for sys/pstat.h... no

checking sys/resource.h usability... yes

checking sys/resource.h presence... yes

checking for sys/resource.h... yes

checking sys/select.h usability... yes

checking sys/select.h presence... yes

checking for sys/select.h... yes

checking sys/sem.h usability... yes

checking sys/sem.h presence... yes

checking for sys/sem.h... yes

checking sys/shm.h usability... yes

checking sys/shm.h presence... yes

checking for sys/shm.h... yes

checking sys/sockio.h usability... yes

checking sys/sockio.h presence... yes

checking for sys/sockio.h... yes

checking sys/tas.h usability... no

checking sys/tas.h presence... no

checking for sys/tas.h... no

checking sys/un.h usability... yes

checking sys/un.h presence... yes

checking for sys/un.h... yes

checking termios.h usability... yes

checking termios.h presence... yes

checking for termios.h... yes

checking ucred.h usability... no

checking ucred.h presence... no

checking for ucred.h... no

checking utime.h usability... yes

checking utime.h presence... yes

checking for utime.h... yes

checking wchar.h usability... yes

checking wchar.h presence... yes

checking for wchar.h... yes

checking wctype.h usability... yes

checking wctype.h presence... yes

checking for wctype.h... yes

checking for net/if.h... yes

checking for sys/ucred.h... yes

checking for netinet/tcp.h... yes

checking editline/readline.h usability... no

checking editline/readline.h presence... no

checking for editline/readline.h... no

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

root@srvbacula:/postgresql/postgresql-11beta2 #

 

thanks in advance

 

 

--

Att

Márcio A. Sepp

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Can't compile postgresql 11 on FreeBSD 11.1
  2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
@ 2018-07-17 19:37 ` Adrian Klaver <adrian.klaver@aklaver.com>
  2018-07-17 20:25   ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 7+ messages in thread

From: Adrian Klaver @ 2018-07-17 19:37 UTC (permalink / raw)
  To: Márcio Antônio Sepp <marcio@zyontecnologia.com.br>; pgsql-general

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.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Can't compile postgresql 11 on FreeBSD 11.1
  2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
  2018-07-17 19:37 ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-07-17 20:25   ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-07-23 06:22     ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2018-07-17 20:25 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Márcio Antônio Sepp <marcio@zyontecnologia.com.br>; pgsql-general

Adrian Klaver <adrian.klaver@aklaver.com> 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




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Can't compile postgresql 11 on FreeBSD 11.1
  2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
  2018-07-17 19:37 ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Adrian Klaver <adrian.klaver@aklaver.com>
  2018-07-17 20:25   ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-07-23 06:22     ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  2018-07-23 06:35       ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Achilleas Mantzios @ 2018-07-23 06:22 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 17/07/2018 23:25, Tom Lane wrote:
> Adrian Klaver <adrian.klaver@aklaver.com> 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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Can't compile postgresql 11 on FreeBSD 11.1
  2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
  2018-07-17 19:37 ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Adrian Klaver <adrian.klaver@aklaver.com>
  2018-07-17 20:25   ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Tom Lane <tgl@sss.pgh.pa.us>
  2018-07-23 06:22     ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Achilleas Mantzios <achill@matrix.gatewaynet.com>
@ 2018-07-23 06:35       ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Achilleas Mantzios @ 2018-07-23 06:35 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 23/07/2018 09:22, Achilleas Mantzios wrote:
> On 17/07/2018 23:25, Tom Lane wrote:
>> Adrian Klaver <adrian.klaver@aklaver.com> 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 root@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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Can't compile postgresql 11 on FreeBSD 11.1
  2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
@ 2018-07-17 19:47 ` Christoph Moench-Tegeder <cmt@burggraben.net>
  2018-07-17 21:19   ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Olivier Gautherot <olivier@gautherot.net>
  1 sibling, 1 reply; 7+ messages in thread

From: Christoph Moench-Tegeder @ 2018-07-17 19:47 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

## Márcio Antônio Sepp (marcio@zyontecnologia.com.br):

> I’m 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




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Can't compile postgresql 11 on FreeBSD 11.1
  2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
  2018-07-17 19:47 ` Re: Can't compile postgresql 11 on FreeBSD 11.1 Christoph Moench-Tegeder <cmt@burggraben.net>
@ 2018-07-17 21:19   ` Olivier Gautherot <olivier@gautherot.net>
  0 siblings, 0 replies; 7+ messages in thread

From: Olivier Gautherot @ 2018-07-17 21:19 UTC (permalink / raw)
  To: Christoph Moench-Tegeder <cmt@burggraben.net>; pgsql-general; Márcio Antônio Sepp <marcio@zyontecnologia.com.br>

On Tue, Jul 17, 2018 at 4:30 PM, Christoph Moench-Tegeder <
cmt@burggraben.net> wrote:

> ## Olivier Gautherot (olivier@gautherot.net):
>
> > To: Christoph Moench-Tegeder <cmt@burggraben.net>
>
> 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?

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2018-07-23 06:35 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 19:34 Can't compile postgresql 11 on FreeBSD 11.1 Márcio Antônio Sepp <marcio@zyontecnologia.com.br>
2018-07-17 19:37 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-07-17 20:25   ` Tom Lane <tgl@sss.pgh.pa.us>
2018-07-23 06:22     ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2018-07-23 06:35       ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2018-07-17 19:47 ` Christoph Moench-Tegeder <cmt@burggraben.net>
2018-07-17 21:19   ` Olivier Gautherot <olivier@gautherot.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox