# Can't install postgresql92-server inside a jail



## danielr (Jul 7, 2013)

```
[CMD]uname -a[/CMD]
FreeBSD POSTGRESQL 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0: Mon Jun 17 11:42:37 UTC 2013     [email]root@amd64-builder.daemonology.net[/email]:/usr/obj/usr/src/sys/GENERIC amd64
[CMD]file /bin/ls[/CMD]
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), stripped
```
Full Log: https://gist.github.com/anonymous/78483ebcc6492fa0946a

Install log:

```
[CMD=root@POSTGRESQL:/usr/ports/databases/postgresql92-server #]make install clean[/CMD]

===>  Building for postgresql-server-9.2.4

  =========== BACKUP YOUR DATA! =============
  As always, backup your data before
  upgrading. If the upgrade leads to a higher
  minor revision (e.g. 8.3.x -> 8.4), a dump
  and restore of all databases is
  required. This is *NOT* done by the port!

  Press ctrl-C *now* if you need to pg_dump.
  ===========================================
gmake: Nothing to be done for `symlinks'.
gmake -C ../backend submake-errcodes
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend'
gmake[1]: Nothing to be done for `submake-errcodes'.
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend'
gmake -C ../../src/port all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/port'
gmake -C ../backend submake-errcodes
gmake[2]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend'
gmake[2]: Nothing to be done for `submake-errcodes'.
gmake[2]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend'
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/port'
gmake -C ../../src/port all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/port'
gmake -C ../backend submake-errcodes
gmake[2]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend'
gmake[2]: Nothing to be done for `submake-errcodes'.
gmake[2]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend'
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/port'
gmake -C catalog schemapg.h
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/catalog'
gmake[1]: `schemapg.h' is up to date.
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/catalog'
gmake -C access all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access'
gmake -C common all
gmake -C nbtree all
gmake[2]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/nbtree'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/nbtree'
gmake -C transam all
gmake[2]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/transam'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/transam'
gmake -C gin all
gmake[2]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/gin'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/gin'
gmake -C spgist all
gmake[2]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/spgist'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access/spgist'
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/access'
gmake -C bootstrap all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/bootstrap'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/bootstrap'
gmake -C catalog all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/catalog'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/catalog'
gmake -C parser all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/parser'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/parser'
gmake -C commands all
gmake[1]: Entering directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/commands'
cc -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-
security -fno-strict-aliasing -fwrapv -I../../../src/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/us
r/local/include  -c -o dbcommands.o dbcommands.c
In file included from /usr/include/xlocale.h:56,
                 from ../../../src/include/utils/pg_locale.h:17,
                 from dbcommands.c:55:
/usr/include/xlocale/_time.h: In function 'strftime_l':
/usr/include/xlocale/_time.h:46: error: expected declaration specifiers before '__strftimelike'
In file included from /usr/include/xlocale.h:64,
from ../../../src/include/utils/pg_locale.h:17,
                 from dbcommands.c:55:
/usr/include/xlocale/_ctype.h:97: error: storage class specified for parameter '__sbmaskrune_l'
/usr/include/xlocale/_ctype.h:99: error: storage class specified for parameter '__sbistype_l'

... (shortened)

/usr/include/xlocale/_time.h:45: error: parameter name omitted
/usr/include/xlocale/_time.h:45: error: parameter name omitted
/usr/include/xlocale/_time.h:45: error: parameter name omitted
/usr/include/xlocale/_time.h:46: error: parameter name omitted
/usr/include/xlocale/_time.h:46: error: parameter name omitted
dbcommands.c:2067: error: expected '{' at end of input
gmake[1]: *** [dbcommands.o] Error 1
gmake[1]: Leaving directory `/var/ports/basejail/usr/ports/databases/postgresql92-server/work/postgresql-9.2.4/src/backend/commands'
gmake: *** [commands-recursive] Error 2
*** Error code 2

Stop in /basejail/usr/ports/databases/postgresql92-server.
*** Error code 1

Stop in /basejail/usr/ports/databases/postgresql92-server.
```


----------



## ShelLuser (Jul 7, 2013)

This seems to be option specific because this port compiled cleanly on my end at first, but after I enabled DTrace and PAM support it failed on me. Could you paste the output of `# make showconfig` so that we can see which options you're using?


----------



## danielr (Jul 7, 2013)

`root@POSTGRESQL:/usr/ports/databases/postgresql92-server # make showconfig`

```
===> The following configuration options are available for postgresql-server-9.2.4:
     DEBUG=off: Builds with debugging symbols
     DTRACE=off: Build with DTrace probes (server only)
     GSSAPI=off: Build with GSSAPI support
     ICU=off: Use ICU for unicode collation (server)
     INTDATE=on: Builds with 64-bit date/time type (server)
     KRB5=off: Build with kerberos provider support
     LDAP=off: Build with LDAP authentication support (server only)
     NLS=on: Use internationalized messages
     OPTIMIZED_CFLAGS=off: Builds with compiler optimizations (-O3)
     PAM=off: Build with PAM Support
     SSL=on: Build with OpenSSL support
     TZDATA=on: Use internal timezone database (server)
     XML=on: Build with XML data type (server)
====> Build with kerberos provider support: you have to select exactly one of them
     MIT_KRB5=off: Build with MIT kerberos support
     HEIMDAL_KRB5=off: Builds with Heimdal kerberos
```


----------



## danielr (Jul 16, 2013)

Alright,

My jails were running Freebsd FreeBSD 9.0 all these weeks. My jails couldn*'*t compile either gettext or postgresql anymore.

The command `file /bin/ls` gave me the following output:

```
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0, stripped
```
With the help of AllanJude from #freebsd on freenode I executed these commands:
`ezjail-admin install -r 9.1-RELEASE`
`env UNAME_r=9.1-RELEASE ezjail-admin update -s 9.0-RELEASE -U`
`ezjail-admin update -u`
Now my jails are also running 9.1 and compiling works again.


----------

