Installation of Postgresql 8.1.1 failed on my gentoo system with the following error. The system is more or less up to date. USE flags are as follows: [ebuild U ] dev-db/postgresql-8.1.1 [8.0.3] -doc +kerberos -libg++* +nls +pam +perl -pg-intdatetime +python +readline (-selinux) +ssl +tcltk* +xml2 +zlib 0 kB GCC has the following version info: # gcc --version gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8) x86_64-pc-linux-gnu-gcc -mfpmath=sse -mcpu=k8 -march=k8 -mtune=k8 -frerun-loop-opt -msse2 -mmmx -O3 -pipe -fvisibility=hidden -fprofile-use -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing initdb.o -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/port -Wl,-rpath,/usr/lib64 -lpgport -lpam -lssl -lcrypto -lkrb5 -lz -lreadline -lcrypt -lresolv -lnsl -ldl -lm -lbsd -o initdb initdb.o: In function `trapsig': initdb.c:(.text+0x279a): undefined reference to `pqsignal' initdb.o: In function `main': initdb.c:(.text+0x3a46): undefined reference to `pg_char_to_encoding' initdb.c:(.text+0x3a58): undefined reference to `pg_valid_server_encoding' initdb.c:(.text+0x408a): undefined reference to `pg_encoding_to_char' initdb.c:(.text+0x40ce): undefined reference to `pqsignal' initdb.c:(.text+0x40dd): undefined reference to `pqsignal' initdb.c:(.text+0x40ec): undefined reference to `pqsignal' initdb.c:(.text+0x40fb): undefined reference to `pqsignal' initdb.c:(.text+0x410a): undefined reference to `pqsignal' initdb.c:(.text+0x46ff): undefined reference to `pg_encoding_to_char' collect2: ld returned 1 exit status make[3]: *** [initdb] Error 1 make[3]: Leaving directory `/var/tmp/portage/postgresql-8.1.1/work/postgresql-8.1.1/src/bin/initdb' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/postgresql-8.1.1/work/postgresql-8.1.1/src/bin' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/postgresql-8.1.1/work/postgresql-8.1.1/src' make: *** [all] Error 2 !!! ERROR: dev-db/postgresql-8.1.1 failed. !!! Function src_compile, Line 107, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message.
Just found out what caused the failure: It was the -fvisibility=hidden in CFLAGS. Without it, postgresql compiled without any problem. I propose adding a fliter-flag to the ebuild.
Nope, sorry. "-fvisibility=hidden" is currently not supported by Gentoo.