[SOLVED] Errors trying to compile glibc 2.21 book version 7.7 (Not the mawk-gawk problem)
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Errors trying to compile glibc 2.21 book version 7.7 (Not the mawk-gawk problem)
As the title states, i'm having issues with compiling glibc. I've tried googling for a solution, but all I could see were people that just didn't have gawk installed, which I don't understand, as they tell you at the beginning of the book to have those basic programs installed. But I digress. Either way, here is the output of "sudo make" inside the glibc-build directory (didn't compile it in the source directory since it told me not to)
The only thing I can see that might be some sort of error is "x86_64-lfs-linux-gnu-gcc not found" i'm not 100% sure what that's referring to, I do already have gcc compiled and installed, if that's what it's looking for. Then I get to the line "no rule to make target ..." I tried to look up information on that init-first.o file, but I couldn't find anything, that seems to be what's stopping it from finishing. Any help would be appreciated. I should also note that i've had no problems compiling and installing any other program up until this point, and i've followed the book to a T. I'll also post my ".configure/..." output, in case that might help.
Code:
lfs@debian:/mnt/lfs/sources/glibc-build$ ../glibc-2.21/configure \
> --prefix=/tools \
> --host=$LFS_TGT \
> --build=$(../glibc-2.21/scripts/config.guess) \
> --disable-profile \
> --enable-kernel=2.6.32 \
> --with-headers=/tools/include \
> libc_cv_forced_unwind=yes \
> libc_cv_ctors_header=yes \
> libc_cv_c_cleanup=yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-lfs-linux-gnu
checking for x86_64-lfs-linux-gnu-gcc... x86_64-lfs-linux-gnu-gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-lfs-linux-gnu-gcc accepts -g... yes
checking for gcc... gcc
checking for x86_64-lfs-linux-gnu-g++... x86_64-lfs-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-lfs-linux-gnu-g++ accepts -g... yes
checking for x86_64-lfs-linux-gnu-readelf... x86_64-lfs-linux-gnu-readelf
checking for sysdeps preconfigure fragments... aarch64 alpha arm hppa i386 m68k microblaze mips nios2 powerpc s390 sh sparc tile x86_64 checking whether x86_64-lfs-linux-gnu-gcc compiles in -mx32 mode by default... no
configure: running configure fragment for add-on libidn
checking for assembler and linker STT_GNU_IFUNC support... yes
checking whether .text pseudo-op must be used... yes
checking sysdep dirs... sysdeps/unix/sysv/linux/x86_64/64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86 sysdeps/unix/sysv/linux/wordsize-64 sysdeps/x86_64/nptl sysdeps/unix/sysv/linux sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/x86_64 sysdeps/unix sysdeps/posix sysdeps/x86_64/64 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu sysdeps/x86/fpu sysdeps/x86_64/multiarch sysdeps/x86_64 sysdeps/x86 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/wordsize-64 sysdeps/ieee754 sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/as is GNU as... yes
checking whether /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/ld is GNU ld... yes
checking for /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/as... /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/as
checking version of /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/as... 2.25, ok
checking for /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/ld... /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/ld
checking version of /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.9.2/../../../../x86_64-lfs-linux-gnu/bin/ld... 2.25, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.81, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 4.13, ok
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for gawk... gawk
checking version of gawk... 4.0.1, ok
checking if x86_64-lfs-linux-gnu-gcc is sufficient to build libc... yes
checking for x86_64-lfs-linux-gnu-nm... x86_64-lfs-linux-gnu-nm
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: msgfmt
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/bash
checking for perl... /usr/bin/perl
checking for install-info... /usr/bin/install-info
checking for bison... bison
checking version of bison... 2.5, bad
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking for .set assembler directive... yes
checking for assembler gnu_unique_object symbol type... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... yes
checking whether to use .ctors/.dtors header and trailer... (cached) yes
checking for libunwind-support in compiler... no
checking for linker that supports -z nodelete... yes
checking for linker that supports -z nodlopen... yes
checking for linker that supports -z initfirst... yes
checking for -Bgroup option... yes
checking whether --noexecstack is desirable for .S files... yes
checking for -z combreloc... yes
checking for linker that supports -z execstack... yes
checking for -fpie... yes
checking for --hash-style option... yes
checking for sufficient default -shared layout... no
checking linker output format... elf64-x86-64
checking for -fno-toplevel-reorder -fno-section-anchors... yes
checking for -fstack-protector... yes
checking for -fgnu89-inline... yes
checking whether cc puts quotes around section names... no
checking for assembler .weak directive... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking for __builtin_memset... yes
checking for redirection of built-in functions... yes
checking for __thread... yes
checking for tls_model attribute... yes
checking for compiler option to disable generation of FMA instructions... -ffp-contract=off
checking if x86_64-lfs-linux-gnu-gcc accepts -fno-tree-loop-distribute-patterns with __attribute__ ((__optimize__))... yes
checking for libgd... no
checking for is_selinux_enabled in -lselinux... no
checking size of long double... 16
checking for _FORTIFY_SOURCE predefine... no
checking whether x86_64-lfs-linux-gnu-gcc implicitly enables -fstack-protector... no
checking whether the linker provides working __ehdr_start... yes
checking for __builtin_trap with no external dependencies... yes
running configure fragment for sysdeps/unix/sysv/linux/x86_64/64
running configure fragment for sysdeps/unix/sysv/linux/x86_64
running configure fragment for sysdeps/unix/sysv/linux
checking installed Linux kernel header files... 2.6.32 or later
checking for kernel header at least 2.6.32... ok
checking for linux/fanotify.h... yes
running configure fragment for sysdeps/nptl
checking for forced unwind support... (cached) yes
checking for C cleanup handling... (cached) yes
running configure fragment for sysdeps/gnu
running configure fragment for sysdeps/x86_64
checking for cpuid.h... yes
checking for SSE4 support... yes
checking for AVX support... yes
checking for AVX512 support in assembler... yes
checking for AVX512 support... yes
checking for AVX encoding of SSE instructions... yes
checking for FMA4 support... yes
checking for -mno-vzeroupper support... yes
checking for Intel MPX support... yes
checking for AVX2 support... yes
checking for old glibc 2.0.x headers... no
checking whether -fPIC is default... no
configure: creating ./config.status
config.status: creating config.make
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
I'm skimming through the ./configure and I see some things that stick out. First, the line "checking version of bison... 2.5, bad" Does that mean I have a bad/corrupt version of bison? or that I have too old/new of a version or something? also, I noticed I don't have some programs installed, like gnumake, gmake, as well as gnumsgfmt, gmsgfmt, etc. I don't think I need those since I have the normal make and msgfmt installed, but i'm not sure. It should also be noted that the "warning message" it gives me about msgfmt is apparently nothing to worry about, according to the book, and I can ignore it. Any help is appreciated guys.
You're using 'sudo make' to compile? I believe you should be logged in as the LFS user to get the correct compile environment.
I would also think that Bison needs to be updated from that error.
I am, as seen by the "lfs@debian" at the command prompt. I just used sudo in case I have some problems with permission errors.
And possibly, i'll check what version I have and see what version they're recommending.
Edit: It seems I have Bison version 2.5, and LFS 7.7 says I need at least Bison version 2.3, so i'm good on that. Not sure why it's saying bad though, I didn't even install bison manually, I guess it came with Debian when I first installed it.
Last edited by Xenanthropy; 03-26-2015 at 02:58 PM.
Reason: Adding updated info
That's probably why I didn't catch that error, Bash and Dash, I wasn't looking for something so simple lol. Didn't even know dash was a thing. And you're right, it does run the command as root, but I was having trouble with permissions earlier so I was using sudo, but this time it worked without it, guess I don't need it.
Any idea why that would cause such obscure errors? I don't really have any idea on what the different between bash and dash is, since i've always just used what's provided with whatever distro I decide to run. And thanks for the help. Much appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.