LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Chapter 6, Glibc: configure fails while testing CPP (https://www.linuxquestions.org/questions/linux-from-scratch-13/chapter-6-glibc-configure-fails-while-testing-cpp-82978/)

Electrode 08-17-2003 10:31 PM

Chapter 6, Glibc: configure fails while testing CPP
 
For some reason, either Glibc's configure script or my CPP refuses to work correctly. If I don't specify CPP=/static/bin/cpp, then the script thinks it's in /lib/cpp, and if I DO tell it where it is (or symlink it):

Quote:

configure:3374: checking how to run the C preprocessor
configure:3492: result: /static/bin/cpp
configure:3517: /static/bin/cpp conftest.c
In file included from /static/lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.1/include/syslimits.h:7,
from /static/lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.1/include/limits.h:11,
from configure:3512:
/static/lib/gcc-lib/x86_64-unknown-linux-gnu/3.3.1/include/limits.h:122:75: limits.h: No such file or directory
So what gives?

LFS: 4.1
GCC: 3.3.1
Glibc: 2.3.2
Host: SuSE 8.2 Pro x86-64

leonscape 08-17-2003 11:05 PM

I don't actually have a /static, thats a new one on me.

but /lib/cpp is usually a symlink too /usr/bin/cpp-3.3 (3.3 is just an example it may just be cpp which is then a symlink to the current version).

So it may be looking in the wrong place?

/usr/lib/ instead of /static/lib/ ?

Electrode 08-17-2003 11:15 PM

/usr/lib only contains an empty directory called locale. This is very early in chapter 6, so everything is still in /static, except for a few symlinks, headers and man pages.

leonscape 08-17-2003 11:43 PM

Ah linux from scratch (didn't notice at first) your braver than me :)

I 've got this

Quote:

i.e. add "/static/bin:/static/usr/bin" at the _end_ of PATH.
from the top of chapter 6 I downloaded, but since configure didn't find cpp in /static/bin I presume that you may have missed this and may be this:

Quote:

2. Before we install glibc, we need to install the Linux kernel headers.
If you exited chroot for some reason, enter it again (we're doing
everything from inside chroot, remember!) and don't forget to remount
/proc if it was unmounted.

Now install the Linux kernel headers with the following commands
(from inside a freshly untarred /usr/src/linux):

yes "" | make config &&
make include/linux/version.h &&
cd include &&
cp -a linux /usr/include/ &&
chown -R 0.0 /usr/include/linux &&
mkdir /usr/include/asm &&
cp -a asm/* /usr/include/asm &&
chown -R 0.0 /usr/include/asm
but I'm guessing here....

Electrode 08-18-2003 12:08 AM

/static/bin is at the end of my PATH, and I did install the kernel headers as instructed.

leonscape 08-18-2003 12:20 AM

It may sound strange but try

touch /usr/include/assert.h

It will force the re-evaluation of some files.

Electrode 08-18-2003 12:36 AM

That worked! I have absolutely no idea how or why though, someone care to explain?

leonscape 08-18-2003 12:49 AM

touch reset the date of assert.h

This caused a re-evaluation of things assert.h is included in. because it was newer than them, so the configure script had to re-write things rather than just look for them.

I think thats right, but having never tried LFS I won't comment further in case I'm wrong :)

titovanton 08-31-2003 02:09 PM

Hi!
I do all like you write i LFS book, but after configuring a glibc 2.3.1 in chapter 6 when I run make I get errors:
I have no name!:/glibc-build# make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.3.1 objdir=`pwd` all
make[1]: Entering directory `/glibc-2.3.1'
sysdeps/i386/elf/configure.in > sysdeps/i386/elf/configure.new
/bin/sh: line 1: sysdeps/i386/elf/configure.in: Permission denied
make[1]: *** [sysdeps/i386/elf/configure] Error 126
make[1]: Leaving directory `/glibc-2.3.1'
make: *** [all] Error 2

I change permissions of file sysdeps/i386/elf/configure.in to 777 and get errors again:
I have no name!:/glibc-build# make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.3.1 objdir=`pwd` all
make[1]: Entering directory `/glibc-2.3.1'
sysdeps/i386/elf/configure.in > sysdeps/i386/elf/configure.new
sysdeps/i386/elf/configure.in: line 1: GLIBC_PROVIDES: command not found
sysdeps/i386/elf/configure.in: line 7: syntax error near unexpected token `for'
sysdeps/i386/elf/configure.in: line 7: `AC_CACHE_CHECK(for i386 TLS support, libc_cv_386_tls, [dnl'
make[1]: *** [sysdeps/i386/elf/configure] Error 2
make[1]: Leaving directory `/glibc-2.3.1'
make: *** [all] Error 2

Can you help me?

titovanton 08-31-2003 02:38 PM

You - leonscape :)


All times are GMT -5. The time now is 08:17 AM.