When I try to update "dev-db/postgresql-server" the process fails. Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge dev-db/postgresql-server 3. Actual Results: pgstat.c: In function ‘pgstat_write_statsfile’: pgstat.c:3204: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result pgstat.c:3209: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result pgstat.c:3223: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result pgstat.c:3232: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result pgstat.c:3242: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result elog.c: In function ‘write_console’: elog.c:1702: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result elog.c: In function ‘write_pipe_chunks’: elog.c:2392: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result elog.c:2401: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result plperl.c: In function ‘pp_require_safe’: plperl.c:777: warning: control reaches end of non-void function All of PostgreSQL successfully made. Ready to install. make -j17 -s -C contrib -j1 /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a(crypt-entry.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libcrypt.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[1]: *** [chkpass.so] Error 1 make: *** [all] Error 2 emake failed * ERROR: dev-db/postgresql-server-9.0.4-r1 failed (compile phase): * emake in contrib failed * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 6215: Called die * The specific snippet of code: * PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" emake -C $bd -j1 || die "emake in $bd failed"; Expected Results: update successful Portage 2.1.10.3 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.38-gentoo-r6 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.38-gentoo-r6-x86_64-Intel-R-_Xeon-R-_CPU_E5630_@_2.53GHz-with-gentoo-2.0.2 Timestamp of tree: Mon, 18 Jul 2011 18:00:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/cmake: 2.8.4-r1 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.3-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.82 sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers) sys-libs/glibc: 2.12.2 Repositories: gentoo sunrise science ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -mtune=generic -O2 -pipe -fPIC" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=core2 -mtune=generic -O2 -pipe -fPIC" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed" LINGUAS="en" MAKEOPTS="-j17 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/science" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl acpi amd64 bash-completion bidi bzip2 cdr cjk cli cracklib crypt cxx dbus dvb dvd dvdr fat fortran gcj gdbm gif gnutls gpm iconv inotify java java6 lm_sensors lzo mmx modules mudflap multilib ncurses nls nptl nptlonly ntfs openexr openmp pam pcre perl png pppd python rar readline see2 see3 session sse sse2 ssl svg sysfs tcpd threads tiff udev unicode usb xcb xorg xpm zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
So how about a full log ? The question obviously is why static lib is used.
Created attachment 280329 [details] Full log for emerge postgresql-server
What's the output of `pg_config90'?
Output of `pg_config90': BINDIR = /usr/lib64/postgresql-9.0/bin DOCDIR = /usr/share/doc/postgresql-9.0 HTMLDIR = /usr/share/doc/postgresql-9.0 INCLUDEDIR = /usr/include/postgresql-9.0 PKGINCLUDEDIR = /usr/include/postgresql-9.0 INCLUDEDIR-SERVER = /usr/include/postgresql-9.0/server LIBDIR = /usr/lib64/postgresql-9.0/lib64 PKGLIBDIR = /usr/lib64/postgresql-9.0/lib64 LOCALEDIR = /usr/lib64/postgresql-9.0/share/locale MANDIR = /usr/share/postgresql-9.0/man SHAREDIR = /usr/share/postgresql-9.0 SYSCONFDIR = /etc/postgresql-9.0 PGXS = /usr/lib64/postgresql-9.0/lib64/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64/postgresql-9.0/lib64' '--prefix=/usr/lib64/postgresql-9.0' '--datadir=/usr/share/postgresql-9.0' '--docdir=/usr/share/doc/postgresql-9.0' '--includedir=/usr/include/postgresql-9.0' '--mandir=/usr/share/postgresql-9.0/man' '--sysconfdir=/etc/postgresql-9.0' '--enable-depend' '--without-tcl' '--without-perl' '--without-python' '--without-krb5' '--without-gssapi' '--without-ldap' '--enable-nls=' '--with-pam' '--enable-integer-datetimes' '--with-readline' '--with-openssl' '--enable-thread-safety' '--with-zlib' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed' 'LDFLAGS_EX=-Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed' 'LDFLAGS_SL=-Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed' CC = x86_64-pc-linux-gnu-gcc CPPFLAGS = -D_GNU_SOURCE CFLAGS = -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv CFLAGS_SL = -fpic LDFLAGS = -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -Wl,--as-needed -Wl,-rpath,'/usr/lib64/postgresql-9.0/lib64',--enable-new-dtags LDFLAGS_EX = -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed LDFLAGS_SL = -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed LIBS = -lpgport -lpam -lssl -lcrypto -lz -lreadline -lcrypt -ldl -lm VERSION = PostgreSQL 9.0.4
OK, a correction - how about a full build log with some real content. A hint: '-s' in MAKEOPTS makes the opposite case. Also, putting '-fPIC' in C{,XX}FLAGS is plain broken.
Created attachment 280337 [details] New build log
(In reply to comment #5) > OK, a correction - how about a full build log with some real content. > A hint: '-s' in MAKEOPTS makes the opposite case. > > Also, putting '-fPIC' in C{,XX}FLAGS is plain broken. I've made the changes you suggest. The same result, I attach the log of the process.
In reply to comment #7) > (In reply to comment #5) > > OK, a correction - how about a full build log with some real content. > > A hint: '-s' in MAKEOPTS makes the opposite case. > > > > Also, putting '-fPIC' in C{,XX}FLAGS is plain broken. > > I've made the changes you suggest. The same result, I attach the log of the > process. You'll need to rebuild dev-db/postgresql-base:9.0 as well.
Now, the linking command is: x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -fpic -shared -o chkpass.so chkpass.o -L../../src/port -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -L/usr/lib64/postgresql-9.0/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/lib64/postgresql-9.0/lib64',--enable-new-dtags -Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed -lcrypt There's nothing about static here, so /usr/lib/libcrypt.so (or its amd64 equivalent) should be found first. Given it's not and that it belongs to glibc...
I executed the following command: 1. kernel update 2. re-emerge glibc, openssl, libtool
(In reply to comment #10) > I executed the following command: > 1. kernel update > 2. re-emerge glibc, openssl, libtool Sorry, everything is working well. Sorry for the inconvenience and thank