LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Trouble Building glibc chapter 6 (https://www.linuxquestions.org/questions/linux-from-scratch-13/trouble-building-glibc-chapter-6-a-4175465984/)

mreff555 06-14-2013 05:34 AM

Trouble Building glibc chapter 6
 
I am attempting to build glibc in chapter6 book 7.3

Since it reportedly took >17SBU's I walked away, expecting it to take a while. After about 24 hours it was still working. BTW, This is a core i3 notebook with 4gb of ram. I used a j5 make flag.

It appears to be getting stuck in a loop repeating the same thing over and over again, however there doesn't appear to be any errors. I tried it again without make flags and it appears that the problem is still there and occurs within the first few minutes.

Since there is no errors I wasn't sure what I could post. Here are the last few lines before it loops. It appears to iterate about every second or so.
Code:

libc-build/pthread-errnos.h.d /sources/glibc-build/pthread-errnos.h'
sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][
0-9Xxa-fA-F-]*\).*@@@end@@@.*$/#define \1 \2/p' \
        /sources/glibc-build/pthread-errnos.hT3 > /sources/glibc-build/pthre
ad-errnos.hT
rm -f /sources/glibc-build/pthread-errnos.hT3
sed -e 's@ /sources/glibc-build/@ $(common-objpfx)@g' -e 's@^/sources/glibc-
build/@$(common-objpfx)@g' -e 's@  *\.\.\/\([^  \]*\)@ $(..)\1@g' -e 's@^\.\
.\/\([^        \]*\)@$(..)\1@g' \
    /sources/glibc-build/pthread-errnos.h.dT > /sources/glibc-build/pthread-
errnos.h.dT2
rm -f /sources/glibc-build/pthread-errnos.h.dT
mv -f /sources/glibc-build/pthread-errnos.h.dT2 /sources/glibc-build/pthread
-errnos.h.d
mv -f /sources/glibc-build/pthread-errnos.hT /sources/glibc-build/pthread-er
rnos.h
make[4]: Leaving directory `/sources/glibc-2.17/nptl'


business_kid 06-14-2013 06:24 AM

I would rm -rf on the source and build dirs, and start afresh. After the configure, Run
Quote:

make > some_error_file 2>&1
Get on another terminal and view it with
Quote:

tail -fn25 some-error-file
When it has looped a few times, go back and hit Ctrl_C where it is making. Go over the error file and see what you can find.

mreff555 06-17-2013 01:14 PM

I gave it a shot but I don't see any error's. It just repeats. Here is the repeating portion of the code.

Code:

make[4]: Entering directory `/sources/glibc-2.17/nptl'
/tools/bin/install -c -m 644 ../include/limits.h /usr/include/limits.h
gawk -f ../scripts/gen-as-const.awk ../nptl/sysdeps/unix/sysv/linux/structsem.sym \
| gcc -S -o /sources/glibc-build/structsem.hT3 -std=gnu99 -fgnu89-inline  -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes        -I../include -I/sources/glibc-build/nptl -I/sources/glibc-build -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h      -x c - \
        -MD -MP -MF /sources/glibc-build/structsem.h.dT -MT '/sources/glibc-build/structsem.h.d /sources/glibc-build/structsem.h'
sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$/#define \1 \2/p' \
        /sources/glibc-build/structsem.hT3 > /sources/glibc-build/structsem.hT
rm -f /sources/glibc-build/structsem.hT3
sed -e 's@ /sources/glibc-build/@ $(common-objpfx)@g' -e 's@^/sources/glibc-build/@$(common-objpfx)@g' -e 's@  *\.\.\/\([^        \]*\)@ $(..)\1@g' -e 's@^\.\.\/\([^        \]*\)@$(..)\1@g' \
    /sources/glibc-build/structsem.h.dT > /sources/glibc-build/structsem.h.dT2
rm -f /sources/glibc-build/structsem.h.dT
mv -f /sources/glibc-build/structsem.h.dT2 /sources/glibc-build/structsem.h.d
mv -f /sources/glibc-build/structsem.hT /sources/glibc-build/structsem.h
gawk -f ../scripts/gen-as-const.awk ../nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym \
| gcc -S -o /sources/glibc-build/pthread-pi-defines.hT3 -std=gnu99 -fgnu89-inline  -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes        -I../include -I/sources/glibc-build/nptl -I/sources/glibc-build -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h      -x c - \
        -MD -MP -MF /sources/glibc-build/pthread-pi-defines.h.dT -MT '/sources/glibc-build/pthread-pi-defines.h.d /sources/glibc-build/pthread-pi-defines.h'
sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$/#define \1 \2/p' \
        /sources/glibc-build/pthread-pi-defines.hT3 > /sources/glibc-build/pthread-pi-defines.hT
rm -f /sources/glibc-build/pthread-pi-defines.hT3
sed -e 's@ /sources/glibc-build/@ $(common-objpfx)@g' -e 's@^/sources/glibc-build/@$(common-objpfx)@g' -e 's@  *\.\.\/\([^        \]*\)@ $(..)\1@g' -e 's@^\.\.\/\([^        \]*\)@$(..)\1@g' \
    /sources/glibc-build/pthread-pi-defines.h.dT > /sources/glibc-build/pthread-pi-defines.h.dT2
rm -f /sources/glibc-build/pthread-pi-defines.h.dT
mv -f /sources/glibc-build/pthread-pi-defines.h.dT2 /sources/glibc-build/pthread-pi-defines.h.d
mv -f /sources/glibc-build/pthread-pi-defines.hT /sources/glibc-build/pthread-pi-defines.h
gawk -f ../scripts/gen-as-const.awk ../nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.sym \
| gcc -S -o /sources/glibc-build/lowlevelrobustlock.hT3 -std=gnu99 -fgnu89-inline  -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes        -I../include -I/sources/glibc-build/nptl -I/sources/glibc-build -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h      -x c - \
        -MD -MP -MF /sources/glibc-build/lowlevelrobustlock.h.dT -MT '/sources/glibc-build/lowlevelrobustlock.h.d /sources/glibc-build/lowlevelrobustlock.h'
sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$/#define \1 \2/p' \
        /sources/glibc-build/lowlevelrobustlock.hT3 > /sources/glibc-build/lowlevelrobustlock.hT
rm -f /sources/glibc-build/lowlevelrobustlock.hT3
sed -e 's@ /sources/glibc-build/@ $(common-objpfx)@g' -e 's@^/sources/glibc-build/@$(common-objpfx)@g' -e 's@  *\.\.\/\([^        \]*\)@ $(..)\1@g' -e 's@^\.\.\/\([^        \]*\)@$(..)\1@g' \
    /sources/glibc-build/lowlevelrobustlock.h.dT > /sources/glibc-build/lowlevelrobustlock.h.dT2
rm -f /sources/glibc-build/lowlevelrobustlock.h.dT
mv -f /sources/glibc-build/lowlevelrobustlock.h.dT2 /sources/glibc-build/lowlevelrobustlock.h.d
mv -f /sources/glibc-build/lowlevelrobustlock.hT /sources/glibc-build/lowlevelrobustlock.h
gawk -f ../scripts/gen-as-const.awk pthread-errnos.sym \
| gcc -S -o /sources/glibc-build/pthread-errnos.hT3 -std=gnu99 -fgnu89-inline  -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes        -I../include -I/sources/glibc-build/nptl -I/sources/glibc-build -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h      -x c - \
        -MD -MP -MF /sources/glibc-build/pthread-errnos.h.dT -MT '/sources/glibc-build/pthread-errnos.h.d /sources/glibc-build/pthread-errnos.h'
sed -n 's/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$/#define \1 \2/p' \
        /sources/glibc-build/pthread-errnos.hT3 > /sources/glibc-build/pthread-errnos.hT
rm -f /sources/glibc-build/pthread-errnos.hT3
sed -e 's@ /sources/glibc-build/@ $(common-objpfx)@g' -e 's@^/sources/glibc-build/@$(common-objpfx)@g' -e 's@  *\.\.\/\([^        \]*\)@ $(..)\1@g' -e 's@^\.\.\/\([^        \]*\)@$(..)\1@g' \
    /sources/glibc-build/pthread-errnos.h.dT > /sources/glibc-build/pthread-errnos.h.dT2
rm -f /sources/glibc-build/pthread-errnos.h.dT
mv -f /sources/glibc-build/pthread-errnos.h.dT2 /sources/glibc-build/pthread-errnos.h.d
mv -f /sources/glibc-build/pthread-errnos.hT /sources/glibc-build/pthread-errnos.h
make[4]: Leaving directory `/sources/glibc-2.17/nptl'


druuna 06-17-2013 01:30 PM

Quote:

Originally Posted by mreff555 (Post 4971631)
I am attempting to build glibc in chapter6 book 7.3

Since it reportedly took >17SBU's I walked away, expecting it to take a while. After about 24 hours it was still working. BTW, This is a core i3 notebook with 4gb of ram. I used a j5 make flag.

Is this a dual core i3? If it is: -j5 is way to high. Use -j2.

Anyway: Maybe you should try building it without the -j flag and see what happens.

mreff555 06-17-2013 02:06 PM

Since the problem occurred I have not been using the j flag at all. Also, I confirmed that MAKEOPTS is not defined.

BTW, not to argue, but LFS as well as many other sources recommend (# of cores) +1.

---------- Post added 06-17-13 at 03:07 PM ----------

Since the problem occurred I have not been using the j flag at all. Also, I confirmed that MAKEOPTS is not defined.

BTW, not to argue, but LFS as well as many other sources recommend (# of cores) +1.

druuna 06-17-2013 02:45 PM

Quote:

Originally Posted by mreff555 (Post 4973639)
Since the problem occurred I have not been using the j flag at all. Also, I confirmed that MAKEOPTS is not defined.

That's the safe thing to do.

Quote:

BTW, not to argue, but LFS as well as many other sources recommend (# of cores) +1.
I'm not arguing, just asking. You _still_ have not mentioned how many cores your i3 CPU has..... We can only assume it has 4 cores.

mreff555 06-17-2013 02:55 PM

Yes, it has 4 cores. regardless I am only using one thread.
So I don't suppose you see anything in the posted output that looks wrong? Other than the fact that it repeats, I don't see the problem.

business_kid 06-17-2013 03:18 PM

It's looping in the build script, and they are not supposed to loop, ergo something is wrong.

Remove the -j option as has been suggested, A parallel build can cause errors, and at 17 sbus, you won't be there more than an hour. When you followed the instructions in post 2, did you grep the some_error_file for words like warning, error, found, and missing?

mreff555 06-17-2013 04:53 PM

Quote:

Originally Posted by business_kid (Post 4973673)
It's looping in the build script, and they are not supposed to loop, ergo something is wrong.

Remove the -j option as has been suggested, A parallel build can cause errors, and at 17 sbus, you won't be there more than an hour. When you followed the instructions in post 2, did you grep the some_error_file for words like warning, error, found, and missing?

The -j option has been removed since before the first post.

as for your the error, found, missing and warning.

found and missing return nothing.
error and warning but nothing that actually appears to be an error or a warning. For example, below is a few lines from the bottom of the results for greping the output file. There are a lot of files containing the words error and warning.


Code:

include ../include/libc-symbols.h  -DPIC -DSHARED  -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld    -o /sources/glibc-build/elf/dl-error.os -MD -MP -MF /sources/glibc-build/elf/dl-error.os.dt -MT /sources/glibc-build/elf/dl-error.os
gcc  -nostdlib -nostartfiles -r -o /sources/glibc-build/elf/dl-allobjs.os /sources/glibc-build/elf/rtld.os /sources/glibc-build/elf/dl-load.os /sources/glibc-build/elf/dl-lookup.os /sources/glibc-build/elf/dl-object.os /sources/glibc-build/elf/dl-reloc.os /sources/glibc-build/elf/dl-deps.os /sources/glibc-build/elf/dl-hwcaps.os /sources/glibc-build/elf/dl-runtime.os /sources/glibc-build/elf/dl-error.os /sources/glibc-build/elf/dl-init.os /sources/glibc-build/elf/dl-fini.os /sources/glibc-build/elf/dl-debug.os /sources/glibc-build/elf/dl-misc.os /sources/glibc-build/elf/dl-version.os /sources/glibc-build/elf/dl-profile.os /sources/glibc-build/elf/dl-conflict.os /sources/glibc-build/elf/dl-tls.os /sources/glibc-build/elf/dl-origin.os /sources/glibc-build/elf/dl-scope.os /sources/glibc-build/elf/dl-execstack.os /sources/glibc-build/elf/dl-caller.os /sources/glibc-build/elf/dl-open.os /sources/glibc-build/elf/dl-close.os /sources/glibc-build/elf/dl-trampoline.os /sources/glibc-build/elf/dl-cache.os /sources/glibc-build/elf/dl-sysdep.os /sources/glibc-build/elf/dl-environ.os /sources/glibc-build/elf/dl-minimal.os /sources/glibc-build/elf/dl-brk.os /sources/glibc-build/elf/dl-sbrk.os /sources/glibc-build/elf/dl-getcwd.os /sources/glibc-build/elf/dl-openat64.os /sources/glibc-build/elf/dl-opendir.os /sources/glibc-build/elf/dl-fxstatat64.os /sources/glibc-build/elf/tlsdesc.os /sources/glibc-build/elf/dl-tlsdesc.os
a - stdio-common/perror.os
a - libio/ferror.os
a - libio/ferror_u.os
a - string/strerror.os
a - string/_strerror.os
a - string/xpg-strerror.os
a - string/strerror_l.os
a - posix/gai_strerror.os
a - misc/error.os
a - resolv/herror.os


druuna 06-18-2013 01:36 AM

Can you post the config.log file and the make command?

BTW: Just to make sure (business_kid already mentioned this); You did remove both the source and build directory before trying again?

Lennie 06-18-2013 09:50 AM

Grep for Error (capital E!) instead.

business_kid 06-18-2013 10:55 AM

Or also make -S > logfile 2>&1

Stops it on the first error. I'm fairly sure there is a mistake, and it's being repeated, which is the way things happen on LFS. Do check the md5sum, or sha1sum of the file

mreff555 06-18-2013 07:45 PM

Ok, tried it again. clean build directory. Freshly extracted source.
from the build directory.

config command.
Code:

../glibc-2.17/configure --prefix=/usr --disable-profile --enable-kernel=2.6.25 --libexecdir=/usr/lib/glibc

make command.
Code:

make -S > glibc-logfile 2>&1
After 2 hours it is still looping at the exact same point as indicated above.

The md5 and sha1 check out. (all of them do). I have also deleted the archive and downloaded a copy from gnu.org. Same problem.

druuna 06-19-2013 03:35 AM

I've already asked (post #10), but you might have overlooked it:

Can you post the config.log file and the (output of the) make command?

mreff555 06-20-2013 10:34 AM

I apologize, where would this config.log file be? It's not in the source directory. Also, I'm not sure how to post the entire make output as the error doesn't occur until the log file is over 6 MB.


All times are GMT -5. The time now is 06:47 AM.