Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 125708

Summary: zlib fails to build a shared lib
Product: Gentoo Linux Reporter: João Eduardo Ferreira Bertacchi <joaobertacchi>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: major CC: amd64
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge zlib
"# emerge --debug zlib" output
'MAKEOPTS=-j1 emerge zlib >& log' with changed ebuild
/var/tmp/portage/zlib-1.2.3/work/zlib-1.2.3/configure

Description João Eduardo Ferreira Bertacchi 2006-03-10 06:34:57 UTC
This problem occured on a emerge -e system (building stage3).
I noticed that zlib ebuild is creating the link /lib64/libz.so -> /usr/lib64/libz.so but at the end it is deleted.

>>> emerge (31 of 92) dev-python/python-fchksum-1.7.1 to /
>>> md5 files   ;-) python-fchksum-1.7.1.ebuild
>>> md5 files   ;-) python-fchksum-1.6.1-r1.ebuild
>>> md5 files   ;-) files/digest-python-fchksum-1.7.1
>>> md5 files   ;-) files/digest-python-fchksum-1.6.1-r1
>>> md5 src_uri ;-) python-fchksum-1.7.1.tar.gz
>>> Unpacking source...
>>> Unpacking python-fchksum-1.7.1.tar.gz to /var/tmp/portage/python-fchksum-1.7
.1/work
>>> Source unpacked.
['setup.py', 'build']
running build
running build_ext
building 'fchksum' extension
creating build
creating build/temp.linux-x86_64-2.4
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -pipe -fPIC -
I/usr/include/python2.4 -c fchksum.c -o build/temp.linux-x86_64-2.4/fchksum.o
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -pipe -fPIC -
I/usr/include/python2.4 -c md5.c -o build/temp.linux-x86_64-2.4/md5.o
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -pipe -fPIC -
I/usr/include/python2.4 -c cksum.c -o build/temp.linux-x86_64-2.4/cksum.o
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -pipe -fPIC -
I/usr/include/python2.4 -c sum.c -o build/temp.linux-x86_64-2.4/sum.o
creating build/lib.linux-x86_64-2.4
x86_64-pc-linux-gnu-gcc -pthread -shared -O2 -pipe build/temp.linux-x86_64-2.4/f
chksum.o build/temp.linux-x86_64-2.4/md5.o build/temp.linux-x86_64-2.4/cksum.o b
uild/temp.linux-x86_64-2.4/sum.o -lz -o build/lib.linux-x86_64-2.4/fchksum.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld: c
annot find /lib64/libz.so
collect2: ld returned 1 exit status
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

!!! ERROR: dev-python/python-fchksum-1.7.1 failed.
!!! Function src_compile, Line 21, Exitcode 1
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

----------------------------------------------------------------------------
# emerge --info
Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.14-gentoo-r5 x86_64 Intel(R) Xeon(TM) CPU 3.40GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   [Not Present]
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa avi berkdb bitmap-fonts bzip2 crypt cups eds emboss encode expat foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 imlib ipv6 jpeg kde lzw lzw-tiff mp3 mpeg ncurses nls nptl opengl pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd tiff truetype-fonts type1-fonts usb userlocales xpm xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2006-03-10 10:24:13 UTC
/lib64/libz.so shouldnt be pointing to stuff /usr/lib64/

post the log as an attachment: `emerge zlib >& log`
Comment 2 João Eduardo Ferreira Bertacchi 2006-03-10 10:59:09 UTC
Created attachment 81861 [details]
emerge zlib

After I emerge zlib, there isn't /lib64/libz.so link. I noticed that there is a file named libz.so in /usr/lib64 and I make by hand a link to it.
Comment 3 SpanKY gentoo-dev 2006-03-10 11:37:24 UTC
no, your problem is that zlib doesnt generate a shared lib at all:
>>> Source unpacked.
./configure: line 80: -fPIC: command not found
Checking for shared library support...

run `emerge --debug zlib >& log` and post that as an attachment
Comment 4 João Eduardo Ferreira Bertacchi 2006-03-10 12:43:44 UTC
Created attachment 81866 [details]
"# emerge --debug zlib" output
Comment 5 SpanKY gentoo-dev 2006-03-10 14:04:30 UTC
ok, that doesnt work ... try this:
edit /usr/portage/sys-libs/zlib/zlib-1.2.3.ebuild
change the line './configure ......' to read 'sh -x ./configure ......'
then run MAKEOPTS=-j1 emerge zlib >& log
Comment 6 João Eduardo Ferreira Bertacchi 2006-03-10 15:36:22 UTC
Created attachment 81874 [details]
'MAKEOPTS=-j1 emerge zlib >& log' with changed ebuild

Before run emerge I did 'ebuild zlib-1.2.3.ebuild digest'
Comment 7 SpanKY gentoo-dev 2006-03-10 16:00:44 UTC
your sync is up to date right ?  also, what version of bash do you have ?

can you post your 
/var/tmp/portage/zlib-1.2.3/work/zlib-1.2.3/configure as an attachment so we can be sure it isnt screwed up ...
Comment 8 João Eduardo Ferreira Bertacchi 2006-03-13 10:22:09 UTC
Created attachment 82026 [details]
/var/tmp/portage/zlib-1.2.3/work/zlib-1.2.3/configure
Comment 9 João Eduardo Ferreira Bertacchi 2006-03-13 10:23:45 UTC
I didn't sync (and I'd like to don't sync). I'm using the release 2006.0.
I'm creating a new system from stage 1 in a system that still works. I use chroot to change the root to other dir and I run emerge from new root.
Comment 10 SpanKY gentoo-dev 2006-03-13 10:41:09 UTC
ugh, no wonder it isnt working
Comment 11 SpanKY gentoo-dev 2006-03-13 10:42:18 UTC
sync your tree and dont bother filing a bug again w/out doing so because you'll just waste our time chasing bugs that were fixed already
Comment 12 João Eduardo Ferreira Bertacchi 2006-03-13 11:54:33 UTC
I'm sorry and thanks for your time.
After sync, for my shame, it works.
Sorry again.