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.
configure:1549: checking build system type
configure:1567: result: i686-pc-linux-gnulibc1
configure:1602: checking host system type
configure:1616: result: i686-pc-linux-gnulibc1
configure:1624: checking target system type
configure:1638: result: i686-lfs-linux-gnu
configure:1682: checking for a BSD-compatible install
configure:1748: result: /usr/bin/install -c
configure:1759: checking whether ln works
configure:1781: result: yes
configure:1785: checking whether ln -s works
configure:1789: result: yes
configure:2983: checking for gcc
configure:2999: found /usr/bin/gcc
configure:3009: result: gcc
configure:3255: checking for C compiler version
configure:3258: gcc --version </dev/null >&5
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3261: $? = 0
configure:3263: gcc -v </dev/null >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configure:3266: $? = 0
configure:3268: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:3271: $? = 1
configure:3294: checking for C compiler default output file name
configure:3297: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:3300: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3338: error: in `/mnt/lfs/sources/binutils-2.19.1':
configure:3341: error: C compiler cannot create executables
See `config.log' for more details.
Hi,
first of all post which version of LFS you are trying to build. Secondly, you are supposed to build binutils in a seperate build-directory and NOT in the source directory.
Please try this first and post the results.
I have created the directory /binutils-build. I cd into the directory and then try and prepare binutild for the build and get the following:
lfs@phoenix:/mnt/lfs/binutils-build$ ../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
bash: ../binutils-2.19.1/configure: No such file or directory
The directory has to be in /mnt/lfs/sources/binutils-build.
Alternatively you could also modify your command too
Code:
../sources/binutils-2.19.1/configure ....
However, creating the build directory is also described in the book. You just need to follow the instructions and NOT deviate from them.
At least not for your very first LFS.
I have fallen at the first hurdle! When trying to prepare Binutils for compilation I get the following:
lfs@phoenix:/mnt/lfs/sources/binutils-2.19.1$ ../binutils-2.19.1/configure \
> --target=$LFS_TGT --prefix=/tools \
> --disable-nls --disable-werror
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... configure: error: in `/mnt/lfs/sources/binutils-2.19.1':
configure: error: C compiler cannot create executables
See `config.log' for more detail
Have you installed gcc? configure: error: C compiler cannot create executables seems pretty explicit to me. Also as crts said, don't deviate from the book and then pose noob questions. Follow book, book good.
The noob is actually right. I followed book, book bad... Well on this occasion
In Version 9.1 of the book, and I'm sure in previous ones as well, the configure command in section 5.4.1 begins with two periods instead of just one
../configure <so on and so forth>
^
According to the book this is done in the just unpacked binutils-2.34 directory. This brings the "no such file or directory" error
Using a single period works.
./configure <so on and so forth>
^
In the binutils-2.34 directory that is, after unpacking.
Last edited by Kelvin Munyimbili; 04-27-2020 at 01:08 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.