LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Glibc make error (https://www.linuxquestions.org/questions/linux-from-scratch-13/glibc-make-error-268912/)

Edgington 12-21-2004 03:46 PM

Glibc make error
 
Having trouble making glibc :( , try to find a solution but can't find one. can anyone help please. Here is the error I get.

Code:

nscd_stat.c:34:30: selinux/selinux.h: No such file or directory
nscd_stat.c:35:26: selinux/avc.h: No such file or directory
nscd_stat.c:81: error: field `cstats' has incomplete type
make[2]: *** [/mylinux/sources/glibc-build/nscd/nscd_stat.o] Error 1
make[1]: *** [nscd/others] Error 2
make: *** [all] Error 2


drowbot 12-21-2004 03:54 PM

Which version of LFS are you building? And what Chapter are you in? 5 or 6?

Edgington 12-21-2004 04:58 PM

I'm in chapter 5 of version 6.0. The first make command gives this error.

Edit: Oh and i'm using fedora core 3

Andrew Benton 12-21-2004 07:16 PM

When you build gcc for the first time in chapter 5 you need to pass gcc the switch CC="gcc -B/usr/bin" like this
Code:

CC="gcc -B/usr/bin" ../gcc-3.4.1/configure \
    --prefix=/tools --libexecdir=/tools/lib \
    --with-local-prefix=/tools --disable-nls \
    --enable-shared --enable-languages=c

They used to describe why in the unstable book but they've recently taken the comments out. It used to say
Quote:

CC="gcc -B/usr/bin"

This parameter fixes a possible problem with building GCC at this stage, first noticed in LFS 5.1.1. If our host uses a new version of Binutils than we compiled, the host compiler may try use features not supported by our new linker, causing compilation errors. By passing the -B flag to gcc, we cause the compiler to temporarily use the host's linker, which solves the problem.

Edgington 12-22-2004 06:30 AM

Just tried it but I still get the same errors

Edgington 12-22-2004 12:46 PM

There is a selinux.h in the nscd directory in the source dir of glibc, but not in a selinux dir. I can't find a avc.h file.

Andrew Benton 12-22-2004 07:29 PM

Sorry, my mistake, that was a different bug. It's actually a lot more simple. Just add --without-selinux to the configure options of glibc . Hope that helps. Sorry for being a balloon.

Edgington 12-23-2004 04:25 AM

I thought it would be something like that. Thak you it compiled fine this time.


All times are GMT -5. The time now is 12:37 PM.