Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332663 - sys-libs/zlib-1.2.5-r2: build fails after changing CHOST but not rebuilding gcc/etc...
Summary: sys-libs/zlib-1.2.5-r2: build fails after changing CHOST but not rebuilding g...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-13 20:02 UTC by Pravar Mahajan
Modified: 2011-06-12 20:14 UTC (History)
1 user (show)

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


Attachments
build.log file (sys-libs:zlib-1.2.5-r2:20100813-194630.log,7.49 KB, text/plain)
2010-08-13 20:06 UTC, Pravar Mahajan
Details
Output of `emerge --debug sys-libs/zlib` (log,75.22 KB, text/plain)
2010-08-14 04:09 UTC, Pravar Mahajan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pravar Mahajan 2010-08-13 20:02:36 UTC
I am unable to emerge package sys-libs/zlib-1.2.5-r2
The compilation phase goes fine, but during the installation phase, I get the error message:
"unable to read SONAME from libz.so"
and the emerge fails.

Reproducible: Always

Steps to Reproduce:
1. emerge sys-libs/zlib
2.
3.

Actual Results:  
Emerge fails

Expected Results:  
Emerge should have completed successfully

Output of 'emerge --info =sys-libs/zlib-1.2.5-r2':

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.10.1-r1, 2.6.34-gentoo-r1 i686)
=================================================================
System Settings
=================================================================
System uname: Linux-2.6.34-gentoo-r1-i686-Intel-R-_Core-TM-2_Duo_CPU_T5450_@_1.66GHz-with-gentoo-1.12.13
Timestamp of tree: Wed, 11 Aug 2010 18:00:02 +0000
app-shells/bash: 4.0_p37
dev-lang/python: 2.6.4-r1, 3.1.2-r3
dev-util/cmake: 2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox: 1.6-r2
sys-devel/autoconf: 2.13, 2.65
sys-devel/automake: 1.10.3, 1.11.1
sys-devel/binutils: 2.20.1-r1
sys-devel/gcc: 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6b
virtual/os-headers: 2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mtune=generic -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mtune=generic -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirrors.sohu.com/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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.gentoo.org/gentoo-portage"
USE="X aac acl aiglx alsa asf berkdb bzip2 cairo cli cracklib crypt cups cxx dbus dri dvd fam firefox fortran gdbm gdu giff glitz gnome gpm gstreamer gtk hal iconv java jpeg mad modules mp3 mp4 mudflap ncurses new-login nls nptl nptlonly nsplugin opengl openmp pam pcre pdf perl png pppd python readline reflection session spell spl ssl svg symlink sysfs tcpd threads tiff truetype unicode vidix win32codecs x264 x86 xcomposite xinerama xorg xscreensaver xv 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Pravar Mahajan 2010-08-13 20:06:04 UTC
Created attachment 242851 [details]
build.log file
Comment 2 SpanKY gentoo-dev 2010-08-13 22:13:32 UTC
something is seriously screwed up on your system ... CHOST doesnt appear to be properly exported and read by the zlib configure script

run `emerge --debug zlib >& log` and post the log file as an attachment

what is your /bin/sh pointing to ?  bash ?
Comment 3 Pravar Mahajan 2010-08-14 04:09:05 UTC
Created attachment 242885 [details]
Output of `emerge --debug sys-libs/zlib`
Comment 4 Pravar Mahajan 2010-08-14 04:09:56 UTC
> what is your /bin/sh pointing to ?  bash ? 

yes

Comment 5 SpanKY gentoo-dev 2010-08-14 04:21:14 UTC
did you change CHOST recently ?  what does `ls /usr/bin/*gcc` and `ls /usr/bin/*-pc-*` show ?
Comment 6 Pravar Mahajan 2010-08-14 04:56:54 UTC
(In reply to comment #5)
> did you change CHOST recently ?

Yes.
Previously I had it set to 'x86_64-pc-linux-gnu'

Changed it to 'i686-pc-linux-gnu' when I bumped at some errors.

>  what does `ls /usr/bin/*gcc`

Output of `ls /usr/bin/*gcc`:

/usr/bin/gcc  /usr/bin/i486-pc-linux-gnu-gcc

> and `ls/usr/bin/*-pc-*` show ?

Output of `ls /usr/bin/*-pc-*`:

/usr/bin/i486-pc-linux-gnu-addr2line  /usr/bin/i486-pc-linux-gnu-gfortran
/usr/bin/i486-pc-linux-gnu-ar         /usr/bin/i486-pc-linux-gnu-gfortran-4.4.3
/usr/bin/i486-pc-linux-gnu-as         /usr/bin/i486-pc-linux-gnu-gprof
/usr/bin/i486-pc-linux-gnu-c++        /usr/bin/i486-pc-linux-gnu-ld
/usr/bin/i486-pc-linux-gnu-c++-4.4.3  /usr/bin/i486-pc-linux-gnu-nm
/usr/bin/i486-pc-linux-gnu-c++filt    /usr/bin/i486-pc-linux-gnu-objcopy
/usr/bin/i486-pc-linux-gnu-cpp        /usr/bin/i486-pc-linux-gnu-objdump
/usr/bin/i486-pc-linux-gnu-cpp-4.4.3  /usr/bin/i486-pc-linux-gnu-ranlib
/usr/bin/i486-pc-linux-gnu-g++        /usr/bin/i486-pc-linux-gnu-readelf
/usr/bin/i486-pc-linux-gnu-g++-4.4.3  /usr/bin/i486-pc-linux-gnu-size
/usr/bin/i486-pc-linux-gnu-gcc        /usr/bin/i486-pc-linux-gnu-strings
/usr/bin/i486-pc-linux-gnu-gcc-4.4.3  /usr/bin/i486-pc-linux-gnu-strip
Comment 7 SpanKY gentoo-dev 2010-08-14 05:01:30 UTC
you need to read the documentation then:
http://www.gentoo.org/doc/en/change-chost.xml
Comment 8 DrChandra the Gentoo Person 2011-03-30 12:57:23 UTC
I have the same problem, but I never changed my CHOST. My CHOST is properly set, and has been the same since the machine was built a couple of years ago. I was in the middle of an emerge of 29 packages when zlib was emerged. The next package failed to emerge. Now just about every exeutable complains that libz.so is not found. I can't sync, I can't run gcc-config, nor can I do just about anything.
Comment 9 DrChandra the Gentoo Person 2011-03-30 13:36:37 UTC
The problem I was having turned out to be a missing /lib/libz.so after emerging sys-libs/zlib-1.2.5-r2. When running various tools (gcc-config for example) I would see complaints about CHOST not being set properly. I set it in my environment and exported it, and the problem persisted. I suspect that whatever checks the CHOST setting needs to use libz, so the problem is with the library, and not the CHOST setting.

Once I created /lib/libz.so by hand and pointed it to libz.so.1.2.5, everything started working again, including CHOST checks.

I don't know if you want to re-close this bug or use it to track the zlib-1.2.5-r2 emerge bug. I'll look around for a better bug to post on.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-31 18:51:33 UTC
(In reply to comment #9)
> The problem I was having turned out to be a missing /lib/libz.so after emerging
> sys-libs/zlib-1.2.5-r2. When running various tools (gcc-config for example) I
> would see complaints about CHOST not being set properly. I set it in my
> environment and exported it, and the problem persisted. I suspect that whatever
> checks the CHOST setting needs to use libz, so the problem is with the library,
> and not the CHOST setting.
> 
> Once I created /lib/libz.so by hand and pointed it to libz.so.1.2.5, everything
> started working again, including CHOST checks.
> 
> I don't know if you want to re-close this bug or use it to track the
> zlib-1.2.5-r2 emerge bug. I'll look around for a better bug to post on.

File a new bug report. This one has a different Summary, and partially matching the Summary doesn't make the original bug report less invalid.
Comment 11 Wolfram Kahl 2011-06-12 20:14:32 UTC
I see this error also when using cross-emerge.

I did, in my first attempt at cross compilation:

  crossdev -t mipsel-linux-uclibc
  mipsel-linux-uclibc-fix-root mipsel-linux-uclibc

Then, trying:

  mipsel-linux-uclibc-emerge -avuDN gcc

I get:

 * ERROR: sys-libs/zlib-1.2.5-r2 failed (install phase):
 *   unable to read SONAME from libz.so

``Azdo''s message in http://forums.gentoo.org/viewtopic-t-825260-start-0.html
mentions that libz.so is created without soname; the creating command in my case is:

mipsel-linux-uclibc-gcc -shared -Os -pipe  -fomit-frame-pointer -I/usr/mipsel-linux-uclibc/usr/include/ -I/usr/mipsel-linux-uclibc/include/ -fPIC -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.5 adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo  -lc -L/usr/mipsel-linux-uclibc/lib -L/usr/mipsel-linux-uclibc/usr/lib


This is on x86_64 running 2.6.37-gentoo-r4.