Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310573 - sys-libs/zlib-1.2.4: ./configure disables shared libs building when gcc issues warnings
Summary: sys-libs/zlib-1.2.4: ./configure disables shared libs building when gcc issue...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-21 16:28 UTC by Jan-Erik Skata
Modified: 2010-04-14 02:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
archive of tmpdir for zlib-1.2.4 build failure (zlib-temp.tar.bz2,20.02 KB, application/x-bzip2)
2010-04-12 20:15 UTC, Gilles Dartiguelongue (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Erik Skata 2010-03-21 16:28:39 UTC
zlib-1.2.4 compiles but when portage is about to install, it fails: 

>>> Install zlib-1.2.4 into /var/tmp/portage/sys-libs/zlib-1.2.4/image/ category sys-libs
make -j2 install DESTDIR=/var/tmp/portage/sys-libs/zlib-1.2.4/image/                     
cp libz.a   /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/lib                          
cd /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/lib; chmod u=rw,go=r libz.a           
cp zlib.3 /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/share/man/man3                 
chmod 644 /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/share/man/man3/zlib.3          
cp zlib.pc /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/lib/pkgconfig                 
chmod 644 /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/lib/pkgconfig/zlib.pc          
cp zlib.h zconf.h /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/include                
chmod 644 /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/include/zlib.h /var/tmp/portage/sys-libs/zlib-1.2.4/image//usr/include/zconf.h                                                
 * ERROR: sys-libs/zlib-1.2.4 failed:                                                       
 *   unable to read SONAME from libz.so                                                     
 *                                                                                          
 * Call stack:                                                                              
 *     ebuild.sh, line   48:  Called src_install                                            
 *   environment, line 2295:  Called gen_usr_ldscript '-a' 'z'                              
 *   environment, line 1412:  Called die                                                    
 * The specific snippet of code:                                                            
 *                       [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}";       
 *                                                                                          
 * If you need support, post the output of 'emerge --info =sys-libs/zlib-1.2.4',            
 * the complete build log and the output of 'emerge -pqv =sys-libs/zlib-1.2.4'.             
 * The complete build log is located at '/var/tmp/portage/sys-libs/zlib-1.2.4/temp/build.log'.                                                                                          
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/zlib-1.2.4/temp/environment'.                                                                                   
 * S: '/var/tmp/portage/sys-libs/zlib-1.2.4/work/zlib-1.2.4'                                

>>> Failed to emerge sys-libs/zlib-1.2.4, Log file:

>>>  '/var/tmp/portage/sys-libs/zlib-1.2.4/temp/build.log'

 * Messages for package sys-libs/zlib-1.2.4:

 * ERROR: sys-libs/zlib-1.2.4 failed:
 *   unable to read SONAME from libz.so
 *
 * Call stack:
 *     ebuild.sh, line   48:  Called src_install
 *   environment, line 2295:  Called gen_usr_ldscript '-a' 'z'
 *   environment, line 1412:  Called die
 * The specific snippet of code:
 *                       [[ -z ${tlib} ]] && die "unable to read SONAME from ${lib}";
 *
 * If you need support, post the output of 'emerge --info =sys-libs/zlib-1.2.4',
 * the complete build log and the output of 'emerge -pqv =sys-libs/zlib-1.2.4'.
 * The complete build log is located at '/var/tmp/portage/sys-libs/zlib-1.2.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/zlib-1.2.4/temp/environment'.
 * S: '/var/tmp/portage/sys-libs/zlib-1.2.4/work/zlib-1.2.4'

 * IMPORTANT: 3 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items

Reproducible: Always




# emerge --info    
Portage 2.2_rc67 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.32-gentoo-r1 i686)
=================================================================                         
System uname: Linux-2.6.32-gentoo-r1-i686-Intel-R-_Pentium-R-_M_processor_1.50GHz-with-gentoo-2.0.1                                                                                     
Timestamp of tree: Fri, 19 Mar 2010 19:15:01 +0000                                          
distcc 3.1 i686-pc-linux-gnu [enabled]                                                      
app-shells/bash:     4.1_p2                                                                 
dev-java/java-config: 1.3.7-r1, 2.1.10                                                      
dev-lang/python:     2.6.4-r1, 3.1.1-r1                                                     
dev-python/pycrypto: 2.0.1-r8                                                               
dev-util/cmake:      2.8.0-r2                                                               
sys-apps/baselayout: 2.0.1                                                                  
sys-apps/openrc:     0.6.0-r1                                                               
sys-apps/sandbox:    2.2                                                                    
sys-devel/autoconf:  2.13, 2.65                                                             
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.3, 1.11.1                                     
sys-devel/binutils:  2.20                                                                   
sys-devel/gcc:       4.4.3                                                                  
sys-devel/gcc-config: 1.4.1                                                                 
sys-devel/libtool:   2.2.6b                                                                 
virtual/os-headers:  2.6.33                                                                 
ACCEPT_KEYWORDS="x86 ~x86"                                                                  
ACCEPT_LICENSE="*"                                                                          
CBUILD="i686-pc-linux-gnu"                                                                  
CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"                                    
CHOST="i686-pc-linux-gnu"                                                                   
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"                                  
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"                                                                           
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"                                  
DISTDIR="/usr/portage/distfiles"                                                            
FEATURES="assume-digests distcc distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"                    
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/ "    
LDFLAGS="-Wl,--as-needed -Wl,-O1 -s"                                                        
MAKEOPTS="-j2"                                                                              
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa berkdb bluetooth branding bzip2 cdr cli cracklib crypt cxx dlloader dri dvd dvdread exif firefox fortran gdbm gif gimp gpm gps gtk hal hdaps iconv icq ipv6 java jpg kde mad mmx modules mp3 msn mudflap ncurses nls nptl nptlonly nsplugin offensive opengl openmp pam pcre perl pic png pppd python qt3support qt4 readline reflection session spl sse sse2 ssl sysfs tcpd theora threads tiff unicode usb wifi win32codecs x86 xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-03-21 16:36:22 UTC
Try FEATURES="-distcc" emerge -1 zlib because a user had this same problem today, and it helped him; ./configure disabled shared libs building with distcc.

Also, attach full build.log.
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-04-12 20:14:54 UTC
After hitting this for a couple of weeks, I finally took some time to check what was going on. It seems that ccache and distcc are getting in the way of detection script of zlib, working in $WORKDIR after a build failure, here is what happens:

# export PATH=/usr/lib/ccache/bin:/usr/lib/portage/bin/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.3
# LC_ALL="C" ./configure --shared --prefix=/usr --libdir=/usr/lib                                                                               Checking for shared library support...
Tested i686-pc-linux-gnu-gcc -w -c -O2 -march=pentium2 -fomit-frame-pointer -pipe ztest24475.c
ccache: failed to create /home/eva/.ccache (No such file or directory)
Tested cc -shared -O2 -march=pentium2 -fomit-frame-pointer -pipe -o ztest24475.so ztest24475.o
gcc: ztest24475.o: No such file or directory
gcc: no input files
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.4 with i686-pc-linux-gnu-gcc.


# export PATH=/usr/lib/distcc/bin:/usr/lib/portage/bin/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.3
# LC_ALL="C" ./configure --shared --prefix=/usr --libdir=/usr/libChecking for shared library support...
Tested i686-pc-linux-gnu-gcc -w -c -O2 -march=pentium2 -fomit-frame-pointer -pipe -fPIC ztest27026.c
distcc[27142] Warning: INCLUDE_SERVER_PORT not set - did you forget to run under 'pump'?
distcc[27142] (dcc_build_somewhere) Warning: failed to get includes from include server, preprocessing locally
Tested i686-pc-linux-gnu-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O2 -march=pentium2 -fomit-frame-pointer -pipe -fPIC -o ztest27026.so ztest27026.o
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.4 with i686-pc-linux-gnu-gcc.


setting both obvsiouly fails as well.
Building like this:
# FEATURES="-ccache -distcc" emerge -1v  zlib
is a nice success.
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-04-12 20:15:44 UTC
Created attachment 227531 [details]
archive of tmpdir for zlib-1.2.4 build failure
Comment 4 SpanKY gentoo-dev 2010-04-14 02:23:17 UTC
should be fixed now, thanks

http://sources.gentoo.org/sys-libs/zlib/zlib-1.2.4.ebuild?r1=1.3&r2=1.4