LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   glibc 1st pass error (http://www.linuxquestions.org/questions/linux-from-scratch-13/glibc-1st-pass-error-705648/)

cody0416 02-18-2009 10:01 AM

glibc 1st pass error
 
I am trying to follow the book, but when i type in


Code:

../glibc-2.8-20080929/configure --prefix=/tools \
    --host=$LFS_TGT --build=$(../glibc-2.8-20080929/scripts/config.guess) \
    --disable-profile --enable-add-ons \
    --enable-kernel=2.6.0 --with-headers=/tools/include \
    libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes


as it say in chapter 5.7, i get the following error.


Code:

configure: error: fragment must set $libc_add_on_canonical

How do i get past this error. I tried a google search but couldn't find anything. I would appreciate any help on this.

I am using Debian Lenny as my host system if that helps.

This is my 1st time trying to build lfs so i apologize if i am just missing something small.

shevegen 02-21-2009 07:31 AM

Do you perhaps have unusual hardware?
Normally critical errors are caught in LFS by others, so you must have done something strange, or your hardware is strange.

cody0416 02-21-2009 07:14 PM

I don't think I have any strange hardware. My hardware is a bit old, but not strange. I have an old P4 processor, an nvidia graphics card that came with this computer when I got it, and other things like that. If that is strange then I guess I have strange hardware.

gmic 02-22-2009 03:23 AM

cody0416,
have you tried just starting all over again to see if the same mistake would happen at the same point in time?

I had a problem with the first pass of glibc because I omitted some commands by accident. I tried it a second time and noticed that I omitted the commands. The second time the glibc went fine.

I am not saying that you necesserily forgot any commands or had a typo but I think it is a good idea to just try to do it all over again to (almost) rule out those sources of error. (of course you can have typos or forget commands the second time around too, but you'd probably get a different error then)

cody0416 02-22-2009 03:24 PM

I had other problems the very first time I tried it. After that, I started over and tried again. The second time through, I made it past my previous errors, but then I ran into this problem. When I couldn't figure it out, I tried starting over again to see if I had made any more mistakes. When I got back to this point, I had the same problem. I have now ran into this problem 3 times after restarting, and every time it is in the same spot. After this, I tried searching for help, but couldn't find any. I have no idea why I am getting this error.

Mystican 02-24-2009 09:58 PM

I found the following message on the CLFS-support list from someone who, though following a different set of instructions, got the same error as you. It appears it may be an issue with the host's configuration. Have you tried using the LiveCD?

Also, you seem to be using the Development version of the book; is there a reason for that? Especially since as you said this is your first time attempting to build an LFS system, you may want to try following the Stable (6.4) version, at least initially.

cody0416 02-25-2009 09:36 AM

Somehow, I have managed to get past this error, but then when I run make I get

Code:

make[1]: *** No rule to make target `/mnt/lfs/glibc-build/Versions.all', needed by `/mnt/lfs/glibc-build/abi-versions.h'.  Stop.
I did a search, and it seems like this error usually comes up when someone uses mawk instead of gawk, but I checked this, and I appear to have gawk set up correctly. It even shows

Code:

checking for gawk... gawk
in one of the lines, and

Code:

AWK='gawk'
in config.log.

When I tried again, I got the same error I had originally. Then I tried again, and I got this error again. Now I seem to be going back and forth between these two errors, but now I can't get past this one.

Any ideas?

weibullguy 02-25-2009 10:43 AM

Did you verify the host system requirements (Section iv)? Specifically what, is the output of
Code:

gawk --version | head -n1
if [ -e /usr/bin/awk ];
  then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
  else echo "awk not found"; fi

It's hard to tell what is going on because you are only providing a little information; you did read section 1.5 before you started posting, didn't you?

The first problem you've encountered is not likely caused by unusual hardware. It's a problem with glibc finding one of the add-ons that was requested. config.log may have more information. The second problem is often caused by the host system not using gawk and/or having awk as a symlink to something other than the gawk binary.

cody0416 02-25-2009 01:06 PM

Yes I verified the system requirements. The way I read it, the book lists the minimum version needed. The book lists gawk-3.0. When I typed in

Code:

gawk --version | head -n1
it shows

Code:

GNU Awk 3.1.5
and when I type in

Code:

if [ -e /usr/bin/awk ];
>  then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
>  else echo "awk not found"; fi

I get

Code:

/usr/bin/awk -> /usr/bin/gawk
Was I reading the book wrong? Do I need to downgrade to gawk-3.0?



Here is some more info

Code:

make[1]: Failed to remake makefile `/mnt/lfs/glibc-build/config.make'.
rm -f /mnt/lfs/glibc-build/stamp.o; > /mnt/lfs/glibc-build/stamp.o
rm -f /mnt/lfs/glibc-build/stamp.os; > /mnt/lfs/glibc-build/stamp.os
rm -f /mnt/lfs/glibc-build/stamp.oS; > /mnt/lfs/glibc-build/stamp.oS
cd /mnt/lfs/glibc-build && /mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.3.3/../../../../i686-lfs-linux-gnu/bin/ar cruv libc.a `cat stamp.o`
: /mnt/lfs/glibc-build/libc.a
cd /mnt/lfs/glibc-build && /mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.3.3/../../../../i686-lfs-linux-gnu/bin/ar cruv libc_pic.a `cat stamp.os`
: /mnt/lfs/glibc-build/libc_pic.a
cd /mnt/lfs/glibc-build && /mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.3.3/../../../../i686-lfs-linux-gnu/bin/ar cruv libc_nonshared.a `cat stamp.oS`
: /mnt/lfs/glibc-build/libc_nonshared.a
make[1]: *** No rule to make target `/mnt/lfs/glibc-build/Versions.all', needed by `/mnt/lfs/glibc-build/abi-versions.h'.  Stop.
make[1]: Leaving directory `/mnt/lfs/glibc-2.8-20080929'
make: *** [all] Error 2

Does that help any, or do you need more?

Mystican 02-25-2009 06:51 PM

cody, you're not wrong, the book does (unless specifically stated otherwise) list the *minimum* versions of the host packages needed; however, I'll ask again, have you tried using the LiveCD as host to see if you get the same errors? And, again, is there a reason you're using the Development book instead of Stable?

I don't mean to discourage you, and certainly a "bug hunting" process like this can be a great learning experience in and of itself, but it can also be frustrating, particularly for a first time LFSer. The Development book isn't generally recommended to those new to LFS since - by virtue of the name alone - it's a moving target, changing frequently, and as such less thoroughly tested and polished than the Stable, released version.

cody0416 02-26-2009 01:04 AM

No I have not tried the live cd, and since I only have a VERY poor dial-up internet connection, I don't want to take the time to download it; especially when my internet is disconnecting every 20-30 seconds. I am using the development version of the book mostly for the learning experience, and I don't mind the frustration. But, even if I build with the stable version, I will still want to try it with this version also, so instead of building twice, I thought I would just start with this version and build once...if I can.
I also like using newer software.

Fido_PL 02-26-2009 12:57 PM

Hi,

I had identical problem today. I'm using Debian Lenny as host too and stable version of the book. Based on what I found at google, I tried to replace "--enable-add-ons" with "--enable-add-ons=nptl". After that glibc compiled and installed without further errors. I hope there will be no problems in future because of that change.

BTW I couldn't find version 2.8-20080929 of glibc, so I used 2.8-20090223

Mystican 02-26-2009 11:07 PM

cody, I did some more digging on this earlier; in case Fido's solution doesn't work for you (either because he's using a more recent snapshot of glibc and/or because he's using the Stable book), see the following info from the DIY Linux Reference Build:

Quote:

`AUTOCONF=no' is used here for robustness. It simply prevents unnecessary Autoconf invocations when the Makefiles detect a `configure' file older than its respective `configure.in'. This is usually the case when working with CVS snapshots, but it also applies to release tarballs prior to glibc-2.3.5 when the issue was finally addressed. These unnecessary Autoconf invocations have been known to cause build failures on Debian hosts. An alternative approach is to run `find . -name configure | xargs touch' in the src dir before running `configure'. Note: `--without-cvs' does not address the issue.
That issue with Autoconf *might* be the problem here. You could always try that find command on a freshly extracted glibc tarball and hope it solves your second error, at least.

cody0416 03-01-2009 10:28 PM

Quote:

Originally Posted by Fido_PL (Post 3458422)
Hi,

I had identical problem today. I'm using Debian Lenny as host too and stable version of the book. Based on what I found at google, I tried to replace "--enable-add-ons" with "--enable-add-ons=nptl". After that glibc compiled and installed without further errors. I hope there will be no problems in future because of that change.

BTW I couldn't find version 2.8-20080929 of glibc, so I used 2.8-20090223

Thank you Fido. That worked like a charm, and I am now finished with the book. I only ran into a few minor errors the rest of the way through. I had tried doing that with the first error that I got, but it didn't seem to do anything because I was still getting the same error. For some reason, once I got past that one, I never even thought of trying it again for the second error.

Thanks for the help everyone.


All times are GMT -5. The time now is 10:20 PM.