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.
I just started following LFS, but i'm having some issues compiling glibc. I ran the books' scripts, but when i do make, it gives me an error.
This is make' s error:
Code:
if test -r /mnt/lfs/sources/glibc-build/csu/abi-tag.h.new; then mv -f /mnt/lfs/sources/glibc-build/csu/abi-tag.h.new /mnt/lfs/sources/glibc-build/csu/abi-tag.h; \
else echo >&2 'This configuration not matched in ../abi-tags'; exit 1; fi
make[2]: *** No rule to make target `/mnt/lfs/sources/glibc-build/bits/stdio_lim.st', needed by `/mnt/lfs/sources/glibc-build/bits/stdio_lim.h'. Stop.
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.19/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.19'
make: *** [all] Error 2
looking through the make log, i get a lot of file not found errors like
Code:
In file included from ./sysdeps/unix/sysdep.h:20:0,
from ./sysdeps/unix/i386/sysdep.h:18,
from sysdeps/unix/sysv/linux/i386/sysdep.h:23,
from <stdin>:1:
sysdeps/unix/sysv/linux/sys/syscall.h:24:24: fatal error: asm/unistd.h: No such file or directory
#include <asm/unistd.h>
^
compilation terminated.
In file included from ./sysdeps/unix/sysdep.h:20:0,
from ./sysdeps/unix/i386/sysdep.h:18,
from sysdeps/unix/sysv/linux/i386/sysdep.h:23,
from <stdin>:1:
sysdeps/unix/sysv/linux/sys/syscall.h:24:24: fatal error: asm/unistd.h: No such file or directory
#include <asm/unistd.h>
^
compilation terminated.
In file included from ./sysdeps/unix/sysdep.h:20:0,
from ./sysdeps/unix/i386/sysdep.h:18,
from sysdeps/unix/sysv/linux/i386/sysdep.h:23,
from <stdin>:1:
sysdeps/unix/sysv/linux/sys/syscall.h:24:24: fatal error: asm/unistd.h: No such file or directory
#include <asm/unistd.h>
...
I just started following LFS, but i'm having some issues compiling glibc. I ran the books' scripts, but when i do make, it gives me an error.
This is make' s error:
Code:
if test -r /mnt/lfs/sources/glibc-build/csu/abi-tag.h.new; then mv -f /mnt/lfs/sources/glibc-build/csu/abi-tag.h.new /mnt/lfs/sources/glibc-build/csu/abi-tag.h; \
else echo >&2 'This configuration not matched in ../abi-tags'; exit 1; fi
make[2]: *** No rule to make target `/mnt/lfs/sources/glibc-build/bits/stdio_lim.st', needed by `/mnt/lfs/sources/glibc-build/bits/stdio_lim.h'. Stop.
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.19/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.19'
make: *** [all] Error 2
looking through the make log, i get a lot of file not found errors like
Code:
In file included from ./sysdeps/unix/sysdep.h:20:0,
from ./sysdeps/unix/i386/sysdep.h:18,
from sysdeps/unix/sysv/linux/i386/sysdep.h:23,
from <stdin>:1:
sysdeps/unix/sysv/linux/sys/syscall.h:24:24: fatal error: asm/unistd.h: No such file or directory
#include <asm/unistd.h>
^
compilation terminated.
In file included from ./sysdeps/unix/sysdep.h:20:0,
from ./sysdeps/unix/i386/sysdep.h:18,
from sysdeps/unix/sysv/linux/i386/sysdep.h:23,
from <stdin>:1:
sysdeps/unix/sysv/linux/sys/syscall.h:24:24: fatal error: asm/unistd.h: No such file or directory
#include <asm/unistd.h>
^
compilation terminated.
In file included from ./sysdeps/unix/sysdep.h:20:0,
from ./sysdeps/unix/i386/sysdep.h:18,
from sysdeps/unix/sysv/linux/i386/sysdep.h:23,
from <stdin>:1:
sysdeps/unix/sysv/linux/sys/syscall.h:24:24: fatal error: asm/unistd.h: No such file or directory
#include <asm/unistd.h>
...
Is the chapter 5 build? It looks like it. I see at least two problems. First off, the cross gcc is not in the PATH. Also, it seems that the kernel headers are not being found correctly, but this may be due to the first issue. This is just a cursory look, but I'd say that there was possibly a build or install failure in GCC pass 1 (chapt 5.5). The GCC pass 1 logs would probably help.
bash, version 4.2.45(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils; openSUSE 13.1) 2.23.2
bison (GNU Bison) 2.7
/usr/bin/yacc -> /usr/bin/yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.21
diff (GNU diffutils) 3.3
find (GNU findutils) 4.5.12
GNU Awk 4.1.0, API: 1.0
/usr/bin/awk -> /usr/bin/gawk
gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
g++ (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
(GNU libc) 2.18
grep (GNU grep) 2.14
gzip 1.6
Linux version 3.11.10-7-default (geeko@buildhost) (gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux) ) #1 SMP Mon Feb 3 09:41:24 UTC 2014 (750023e)
m4 (GNU M4) 1.4.16
GNU Make 3.82
GNU patch 2.7.1
Perl version='5.18.1';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.26
xz (XZ Utils) 5.0.5
g++ compilation OK
libgmp.la: not found
libmpfr.la: not found
libmpc.la: not found
The book stated that libgmp/libmpfr and libmpc might be in an inconsistent location, but they are missing in both /usr/lib/ and /usr/lib64/. I think i misinterpited the text and went on as if that's not an issue. (kinda stupid in retrospect).
However, when i go to the package manager, it does say those libraries are installed in /usr/lib/. Their names are different though: libgmp is called libgmp.so.10 and libgmp.so.10.1.2. The same goes for libmpfr and libmpc.
As per the books instructions, i've deleted GCC's build folder, and i can't find a make log (or any kind of log for that matter) for GCC
Unfortunately the checker script targets the host system. You will need to run SUSE's packager and retrieve the mpc, mpfr, and gmp static library packages to resolve the dependency issues.
Because OpenSuSE has to be made compliant for LFS construction, and the fact SuSE has a reputation of using variations in file installation locations, until you can build the bootstrap system from Chapter 5 successfully, there's no way to determine if it will be a successful build.
phoenix, I personally tried using SUSE to build a LFS system awhile ago, and I was unable to successfully do it either. I would personally recommend slackware as a host system.
Slackware and SalixOS (a Slackware spinoff) are the most recommended distributions confirmed to work out-of-the-box.
Some people have had success with other distributions, but they've had to work to make them compliant, and it's not worth the time and trouble honestly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.