View previous topic :: View next topic |
Author |
Message |
nl Tux's lil' helper
Joined: 14 Oct 2003 Posts: 102
|
Posted: Mon Oct 27, 2003 2:57 pm Post subject: stage 1 install fails compiling zlib... |
|
|
This is a duplicate of my earlier post on stage 1 installs. I appreciate the responses but the problem isn't solved, and at least one other person is having the identical problem so (hopefully) it isn't just me.
I realized my earlier topic title wasn't informative enough to attrack someone with expertise on this to read it, so I am reposting here. Sorry for duplicate, but I AM hoping someone knows what to do at this point!
Here's what's going on:
Background. The system is an ASUS P4P800 Deluxe MB with P4 2.4C processor, 1GB dual banked RAM, no overclocking. Although the MB has onboard ethernet (3COM 3C940), that isn't supported by the native linux sk98lin network driver, so I threw in a new Linksys ethernet card with the tulip driver.
HD is partitioned with separate partitions for /boot, /, /usr, /tmp, /var. All are Reiserfs except /boot which is the first partition on the HD and is ext2. All appropriately mounted under /mnt/gentoo. The only addition I made to recommended commands here is that after mounting, I did chmod go+r,o+t /mnt/gentoo/tmp to bring /tmp's permissions in line with what I have used as standard on other linux distros.
After emerge sync, I received a message telling me to emerge portage and update configuration files, because a new version of portage is available. That failed, so I restarted and did not do this the second time. In any case, I have no idea what configuration files to update since the message gave no instructions. Maybe this generates my later problem.
I nano'd /etc/make.conf and here are the changes I made, which I think are reasonable:
# I'm on a p4, so:
CHOST="i686-pc-linux-gnu"
# Taken from http://freehackers.org/gentoo/gccflags/flag_gcc3.html
CFLAGS="-march=pentium 4 -O3 -pipe -fomit-frame-pointer"
# Not changed from what was already there:
CXXFLAGS="${CFLAGS}"
With my understanding that my USE variable in /etc/make.conf supplements what is in /etc/make.profile/<config files>, I added the following USE in make.conf:
USE="acl acpi alsa bonobo cdr doc dvd dvdr esd evo fbcon gphoto2 gtk2 gkhtml imap java ldap libgda mbox mozilla mysql nocardbus odbc pda ppds perl samba sasl scanner slp snmp sse tcltk tiff usb videos wmf xinerama xml"
cd /usr/portage (in chrooted phase of install), and scripts/bootstrap.sh.
Early on in this process, I got a beeping message telling me to restore /etc/make.globals because that's not where I should make any changes. I ignored this, because I didn't make any changes to this file in any case.
Jillions of screens of message go shooting by as we build <things>, I cannot follow the bouncing cursor fast enough to know what. I know it was getting binutils at one point, but then I got tired of watching and had to go watch Law and Order: Criminal Intent instead of staring at the screen.
WHen I get back to check on things: Comile has failed building something with, I think zlib. What's left on the screen shows me that:
1) we are unpacking zlib-1.1.4.tar.bz2.
2) THen, a zlib-1.1.4-gentoo.security.patch is applied.
3) THe source is unpacked.
4) It checks for share library support and says it is not there, and tells me to "try without defining CC and CFLAGS".
5) Building static library libz.a version 1.1.4 with gcc
6) Checking for unistd.h...No.
7) Checking whether to use vsnprintf() or snprintf()... using snprintf().
Checking for snprintf() in stdio.h...No
Warning: snprintf() not found, falling back to sprintf().
9) Checking for return value of snprintf()... No.
Warning....
9) Checking for errno.h... No
10) Checking for mmap support... No.
11) THe compile starts. THe first compile, of example.c, works. THe second compile, of adler32.c fails, with error message indicating a relocation error: /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: undefined symbol: xmalloc_set_program_name
12) CC crashes with a "broken pipe" error, and that's all there is.
This is reproducible, not just a glitch in the machine, as I have tried it three times (each time going back to the beginning and recreating each file system so there are no residuals left over form from a prior attempt) and it happens identically each time. Yes, I'm a glutton for punishment.
It seems that something is broken in the build of zlib, although I know of one person who has gotten beyond this point. Since my CFLAGS, CHOSTS, and USE variables seem pretty generic, I would more or less have expected this to "just work" (TM), but it doesn't.
Any thoughts, help, etc, would be most appreciated!!!
Thanks.
nl |
|
Back to top |
|
|
gen2newB Apprentice
Joined: 23 Sep 2003 Posts: 150 Location: Fall River, MA.
|
Posted: Mon Oct 27, 2003 3:38 pm Post subject: |
|
|
what are you running for CFLAGS? perhaps you set them too agressively. Try tonign them down and see where that gets you. |
|
Back to top |
|
|
nl Tux's lil' helper
Joined: 14 Oct 2003 Posts: 102
|
Posted: Mon Oct 27, 2003 4:31 pm Post subject: |
|
|
CFLAGS are -march=pentium4 -O3 -fomit-frame-pointer -pipe
These seem like pretty generic flags, taken from other postings as suggested flags. I could back off on optimization to -O2; I don't see why that would generate the errors that I am seeing, however, which should not be related to optimization - why wouldn't unistd.h be found, for instance, just based on optimization flags (I have verified that the files are present in the expected places, btw, on the system) and why would optimization flags cause the compilation to be unable to find a symbol - lesser optimization shouldn't cause it to NOT need that routine, I would think.
Someone else suggested to me that I try -march=pentium3, but I cannot believe I am the only person trying to install gentoo on a P4 system...but then again, something must have recently changed in glibc or zlib because it also seems unlikely that I (and the other two people who have posted in teh last two days with the same problem) are the only people doing stage 1 installs...
I'm very confused at present. BUt I do appreciate your thoughts. |
|
Back to top |
|
|
jamieo n00b
Joined: 13 Jul 2002 Posts: 38 Location: Reading, UK
|
Posted: Mon Oct 27, 2003 4:56 pm Post subject: |
|
|
I've got the exact same problem here. Tried changing the make.conf compiler settings but that's not helped at all.
Really don't fancy doing a stage2 and then rebuild. Still no solutions to this problem? |
|
Back to top |
|
|
novmode n00b
Joined: 26 Oct 2003 Posts: 43
|
Posted: Mon Oct 27, 2003 5:06 pm Post subject: |
|
|
I've been trying and have still not been able to get it working, I have not altered my use variables, and my CFLAGS are fairly generic for my T-Bird architecture. As posted by another individual in your initial thread the problem seems to be that certain headers are not being recognized by the compiler, unistd.h for example should be checking off as Yes, but rather for both of us it's checking off as No. So i don't think our CFLAGS are the problem, regardless i'm still stumped.
Code: |
>>> Downloading http://gentoo.mirrors.pair.com//distfiles/zlib-1.1.4.tar.bz2
--00:28:34-- http://gentoo.mirrors.pair.com//distfiles/zlib-1.1.4.tar.bz2
=> `/usr/portage/distfiles/zlib-1.1.4.tar.bz2'
Resolving gentoo.mirrors.pair.com... done.
Connecting to gentoo.mirrors.pair.com[216.92.2.140]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 147,014 [application/x-tar]
100%[==================================================================================>] 147,014 710.73K/s ETA 00:00
00:28:34 (710.73 KB/s) - `/usr/portage/distfiles/zlib-1.1.4.tar.bz2' saved [147014/147014]
>>> md5 src_uri ;-) zlib-1.1.4.tar.bz2
>>> Unpacking source...
>>> Unpacking zlib-1.1.4.tar.bz2 to /var/tmp/portage/zlib-1.1.4-r1/work
* Applying zlib-1.1.4-gentoo.security.patch... [ ok ]
>>> Source unpacked.
Checking for shared library support...
No shared library suppport; try without defining CC and CFLAGS
Building static library libz.a version 1.1.4 with gcc.
Checking for unistd.h... No.
Checking whether to use vsnprintf() or snprintf()... using snprintf()
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities. See README.vsnprintf for more info.
Checking for return value of sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities. See README.vsnprintf for more info.
Checking for errno.h... No.
Checking for mmap support... No.
gcc -march=athlon-tbird -O3 -pipe -fomit-frame-pointer -fPIC -c -o example.o example.c
gcc -march=athlon-tbird -O3 -pipe -fomit-frame-pointer -fPIC -c -o adler32.o adler32.c
/usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: relocation error: /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: undefined symbol: xmalloc_set_program_name
/usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: relocation error: /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: undefined symbol: xmalloc_set_program_name
cc1: Broken pipe: error closing -
make: *** [adler32.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: Broken pipe: error writing to -
make: *** [example.o] Error 1
!!! ERROR: sys-libs/zlib-1.1.4-r1 failed.
!!! Function src_compile, Line 30, Exitcode 2
!!! (no error message)
|
|
|
Back to top |
|
|
gen2newB Apprentice
Joined: 23 Sep 2003 Posts: 150 Location: Fall River, MA.
|
Posted: Mon Oct 27, 2003 5:10 pm Post subject: |
|
|
try doing march=pentium4 since that is what it looks like you are trying to compile for in the CFLAGS. if that is not the case, try MCPU even, just make sure that the CFLAGS and the MARCH/MCPU (which ever you end up using) match up. That could be the problem right there. |
|
Back to top |
|
|
nl Tux's lil' helper
Joined: 14 Oct 2003 Posts: 102
|
Posted: Mon Oct 27, 2003 5:33 pm Post subject: |
|
|
novmode:
Your posted trace is identical to mine, with the exception of the march flag for which I use pentium4 instead of tbird. That suggests to me that there is a problem in the library or the autoconfigure file for the library. Which again is odd, because it does not look like the library has been changed for a while...
Tonight, when I have the time, I will try to grab a copy of the .bz2 file and see if I can unpack it and try to figure out what has gone wrong...although that is more difficult without my working linux box! I do have a knoppix cd, so I could boot to KDE via that and work on this <G>.
nl |
|
Back to top |
|
|
novmode n00b
Joined: 26 Oct 2003 Posts: 43
|
Posted: Mon Oct 27, 2003 5:53 pm Post subject: |
|
|
I may be shooting smoke out of my ass to try and find an excuse for why this isn't working, but here it goes. While running through this for a 3rd time right now and this time i downloaded the stage one image instead of taking it off the cd, i'm paying attention to the config parts of other packages and I have noticed that they also rely on unistd.h and the check goes through without a hitch, so it would seem to me as though the library itself is fine or everyone would be complaining from the first step of the bootstrap. Another person posted and said it worked fine for him and even gave a small snippet of the screen output he receieved showing as such. Now i'd only place my self as an "noob" when it comes to figuring out problems in linux so take this idea with a grain of salt, but what if the problem is in our libz package? Would it be feasible that different mirrors might have different versionis of the package? |
|
Back to top |
|
|
Barkotron Apprentice
Joined: 05 Aug 2003 Posts: 253 Location: location, location.
|
Posted: Mon Oct 27, 2003 6:01 pm Post subject: |
|
|
Hi there,
Just a couple of things: first off, about the "pentium3/pentium4" thing - is there not a warning in your make.conf about pentium4 creating invalid instructions? e.g.
Code: | # CRITICAL WARNINGS: ****************************************************** #
# ATHLON-4 will generate invalid SSE instructions; use 'athlon' instead. #
# PENTIUM4 will generate invalid SSE2 instructions; use 'pentium3' instead. #
|
I haven't yet seen anything saying that p4 instructions are not broken: unless anyone has I'm going to stick to p3 (I'm using gentoo in a server environment - I want nothing broken on these boxes )
The odd thing is that "Athlon-4" doesn't appear to be any kind of processor at all - could this be a typo meaning athlon-tbird (edit: yes, this does seem a little far-fetched )?
Otherwise - how much has been compiled by this point? Is it likely that you're using components that have just been compiled with dodgy settings? Are you possibly using ACCEPT_KEYWORDS="~x86"? If so, I'd definitely recommend changing that until you were at least past bootstrap.
Sorry if these feel a bit general - just checking a couple of things. _________________ Give a man a fire and he'll be warm for a day: set fire to him and he'll be warm for the rest of his life. |
|
Back to top |
|
|
marize n00b
Joined: 16 Mar 2003 Posts: 20 Location: New York, NY
|
Posted: Mon Oct 27, 2003 6:50 pm Post subject: |
|
|
I am having the exact same problem as described by 'nl'. The system is a P3 though. And, NO, I am not using "~x86". |
|
Back to top |
|
|
novmode n00b
Joined: 26 Oct 2003 Posts: 43
|
Posted: Mon Oct 27, 2003 7:52 pm Post subject: |
|
|
I may be jumping the gun here with my 'success' beacuse i'm not done compiling it yet and i haven't watched every step down to the letter, but I'm on step 8 of 9 right now and as i recall zlib was like step 6 of 9. I downloaded the stage 1 tarball from the site instead of using the tarball from the CD and everything seems to be working fine so far. I'm using the same options, cflags, use variables etc. |
|
Back to top |
|
|
novmode n00b
Joined: 26 Oct 2003 Posts: 43
|
Posted: Mon Oct 27, 2003 8:49 pm Post subject: |
|
|
it just finished with out a hitch |
|
Back to top |
|
|
nl Tux's lil' helper
Joined: 14 Oct 2003 Posts: 102
|
Posted: Mon Oct 27, 2003 8:50 pm Post subject: |
|
|
Well, in response to above posts:
1) I am not using ~86 in that I have made no changes to that part of the config files. I have only changed CHOSTS, CFLAGS, CXXFLAGS, and USE.
2) Given that others are having the same problem with zlib that I am, down to identical error messages, I have to assume that it is not specific to my configuration. Since others are having this problem with athlon and P3 processors, it isn't specific to the P4.
3) I believe the problem is somewhere in the zlib configuration; when I have time tonight I will try to look through the zlib tar file and see if I can spot something obvious, although my present lack of familiarity with the internals of the gentoo build process will likely prevent me from figuring out anything meaningful.
4) I don't understand why using the stage file downloaded during the install would be different than using the one on the live cd, since I would actually have expected the files to be the same. I will also check that tonight by diff'ing and downloaded file with the one on the cd. Also, since zlib is actually downloaded from a gentoo mirror by bootstrap.sh, the place were things would be different would be in, I assume, portage or bootstrap.sh or some configuration file. ---- Since I, and I think others, are being told that portage should be updated during the initial emerge sync (but I was unable to do this, because emerge portage at that point also failed), perhaps there IS a new stage file with a new portage that somehow makes this whole thing work.
I wonder if any of the gentoo developers read this post? Previously, as a debian user, I could look on the debian site, find the "maintainer" for a balky or malfunctioning package, and I would often email them with my questions and findings and they would respond. Is that possible with gentoo also, because maybe whomever works on zlib, portage, or the installation procedure could shed some light on a problem that at least a few of us are having in common.
nl |
|
Back to top |
|
|
novmode n00b
Joined: 26 Oct 2003 Posts: 43
|
Posted: Mon Oct 27, 2003 9:18 pm Post subject: |
|
|
the file sizes and names (i assume they indicate different compilation dates) are different, so i would assume there are some differences
the one i downloaded from a mirror
-rw-r--r-- 1 root root 11066526 Oct 27 12:15 stage1-x86-1.4-20030806.tar.bz2
the file on the cd
-rw-r--r-- 1 1030 1030 11175550 Sep 13 13:53 stage1-x86-20030910.tar.bz2 |
|
Back to top |
|
|
bormooski n00b
Joined: 16 Apr 2003 Posts: 11
|
Posted: Mon Oct 27, 2003 10:00 pm Post subject: it happening to me too... |
|
|
im getting the same error too. i have successfully installed gentoo several times, and i never ran across any hicups during bootstrap. i hope this gets fixed quickly.... i want gentoo back on my laptop.... |
|
Back to top |
|
|
fbudesa n00b
Joined: 27 Oct 2003 Posts: 1
|
Posted: Mon Oct 27, 2003 10:15 pm Post subject: |
|
|
I've been having the same problem, with bootstrap.sh stopping at zlib. My system is an IBM Thinkpad T23 (Pentium 3). I've run through the install now many times, and this problem doesn't occur for me if CHOST is left unchanged in /etc/make.conf (CHOST="i486-pc-linux-gnu"). Unfortunately I'm having IDE-bus errors now, but this seems to be a kernel issue, I'm currently installing through Debian instead of the LiveCD, and it is going well so far. Hope this helps! |
|
Back to top |
|
|
BillyD Guru
Joined: 05 May 2002 Posts: 323 Location: Australia
|
Posted: Mon Oct 27, 2003 10:29 pm Post subject: |
|
|
I am experiencing this issue as well - failing on zlib. I will try downloading the (older) stage 1 file from one of the mirrors and see how it goes. _________________ We used to have hominid cousins that were vegetarian. The palæontological record suggests that our ancestors killed them and ate them. |
|
Back to top |
|
|
BillyD Guru
Joined: 05 May 2002 Posts: 323 Location: Australia
|
Posted: Mon Oct 27, 2003 11:17 pm Post subject: |
|
|
No joy with the older stage file - going to give it a go with a stage3 file now, seems to be the only option to get up and running till a fix is out. Anyone posted this to bugzilla as yet? _________________ We used to have hominid cousins that were vegetarian. The palæontological record suggests that our ancestors killed them and ate them. |
|
Back to top |
|
|
curmudgeon Veteran
Joined: 08 Aug 2003 Posts: 1744
|
Posted: Mon Oct 27, 2003 11:53 pm Post subject: |
|
|
Same problem here. :(
CFLAGS="-march=pentium3 -O3 -pipe"
It seems that this just started happening recently. |
|
Back to top |
|
|
BillyD Guru
Joined: 05 May 2002 Posts: 323 Location: Australia
|
Posted: Mon Oct 27, 2003 11:58 pm Post subject: |
|
|
I decided to have a go from stage 2 rather than 3, as this bypasses the initial problem of not being able to bootstrap. emerge system wants to update zlib-1.1.4-r1 to zlib-1.1.4-r2 - I suspect r2 is a new ebuild and I have a hunch this may cause problems not only for people installing but perhaps anyone who does an emerge -u world/system. I have no idea what is supposed to be in the ebuilds, but examining them shows the only difference between them is on line 29, r1 has:
Code: |
emake CFLAGS="${CFLAGS}" || die
|
and r2 has:
I have manually edited my r2 ebuild to be the same as r1, and am hoping this will build zlib without problems. I tried to not keep zlib-1.1.4-r1 installed by defining it in my /var/cache/edb/world file, but portage is ignoring it, so hopefully this will server as a workaround. I will report the results here when done - got about 60 packages to go before I get to zlib. _________________ We used to have hominid cousins that were vegetarian. The palæontological record suggests that our ancestors killed them and ate them. |
|
Back to top |
|
|
BillyD Guru
Joined: 05 May 2002 Posts: 323 Location: Australia
|
Posted: Tue Oct 28, 2003 12:15 am Post subject: |
|
|
Filed bug# 32140 - if anyone could add the actual error message to the report for the zlib compilation fail it would be appreciated.
In hindsight, this should not affect people on an emerge world/system -u as when the compile fails, their intact zlib should remain as it is... _________________ We used to have hominid cousins that were vegetarian. The palæontological record suggests that our ancestors killed them and ate them. |
|
Back to top |
|
|
marize n00b
Joined: 16 Mar 2003 Posts: 20 Location: New York, NY
|
Posted: Tue Oct 28, 2003 1:16 am Post subject: |
|
|
Just to let you know that using the tarball downloaded from a mirror (stage1-x86-1.4-20030806.tar.bz2) I have been able to finish stage1 installation. |
|
Back to top |
|
|
foX004 n00b
Joined: 28 Oct 2003 Posts: 1
|
Posted: Tue Oct 28, 2003 1:20 am Post subject: |
|
|
FYI...I had the same problem using the stage one tarball from the CD and also got the stage one bootstrap to work using a stage one tarball downloaded from a mirror. |
|
Back to top |
|
|
malfunction n00b
Joined: 23 Sep 2003 Posts: 6 Location: Scotland
|
Posted: Tue Oct 28, 2003 1:25 am Post subject: |
|
|
Hi there,
I'm having the same problem as well and have some pointers after a few hours at the keyboard...
The problem, I think, has nothing to do with zlib, USE, CFLAGS or make.conf.
The package installed immediately prior to zlib is binutils and it seems to be breaking gcc.
The configure script for zlib tests the compiler by writing the following program and shoving it through the compiler:-
external int getchar();
int hello () {return getchar();}
Put this in a file, say, test.c and runL
gcc -v -O3 -c test.c
and you will get lots of messages and finally the error message:
/usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: relocation error: /usr/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/../../../../i486-pc-linux-gnu/bin/as: undefined symbol: xmalloc_set_program_name
This as command resolvs to /usr/i486-pc-linux-gnu/bin/as
Now try
gcc -v -o3 -S test.c
which produces test.s - the assembler code.
Test again with
/usr/i486-pc-linux-gnu/bin/as -V -Qy -o test.o test.s
and you get the same error.
Now try
/usr/i686-pc-linux-gnu/bin/as -V -Qy -o test.o test.s
(if you compiled for i686) and it seems OK.
This is as far as I have got with this so far and I now need some sleep but it appears like the bootstrap is using the old, original assembler when it should be using the new one.
If anyone gets any further sorting this then please let us know.
HTH |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Tue Oct 28, 2003 1:39 am Post subject: |
|
|
There are two possible methods I know of which should prove to be a better basis for performing a stage1 install.
One (as BillyD alluded to) is to install using a suitable stage2 tarball, even if one wishes to run a full bootstrap. This should also rectify those issues with the initial toolchain being built for a 486 host. As far as I'm concerned, the process of building the eventual toolchain (and the quality of the resultant toolchain) is more optimal in this case. I recall that the bootstrap.sh script used to be more thorough (it would build almost everything twice), but since then the approach has changed. The major changes in the script were made in the 1.43 check-in to CVS. The comment said: Code: | New bootstrap script that no longer compiles gcc and binutils twice, which
is unnecessary. Way back in the early days of gentoo, we did this for
paranoia. |
I can only assume that paranoia is not always a bad thing
In any case, the other workaround might be to forcibly build gcc, having configured make.conf correctly, by entering emerge -O gcc prior to running the bootstrap (thanks rac for the suggestion).
As for the issue of general zlib niggles, a rather upleasant bug was fixed in zlib-1.1.4-r2 which might have a bearing on the matter. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|