Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
This is the 3rd time i am trying to follow the LFS book and each time i fail miserably.
I'm trying to build the gcc as described in seciton 5.5.
I keep on running into errors, rather then posting the entire config.log file i'm going to post the relevant snippets. I can't seem to figure out why the error is occuring, i have a functioning gcc complier (i executed a simple helloworld.c file). This error message doesn't make sense to a noob like me. Hopefully someone can help me out
Code:
configure:4394: $? = 0
configure:4383: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.2.0-5ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12)
configure:4394: $? = 0
configure:4383: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4394: $? = 1
configure:4383: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:4394: $? = 1
configure:4414: checking for C compiler default output file name
configure:4436: gcc conftest.c >&5
configure:4440: $? = 0
configure:4477: result: a.out
configure:4493: checking whether the C compiler works
configure:4502: ./a.out
configure:4506: $? = 0
configure:4521: result: yes
configure:4528: checking whether we are cross compiling
configure:4530: result: no
configure:4533: checking for suffix of executables
configure:4540: gcc -o conftest conftest.c >&5
configure:4544: $? = 0
configure:4566: result:
configure:4572: checking for suffix of object files
configure:4594: gcc -c conftest.c >&5
configure:4598: $? = 0
configure:4619: result: o
configure:4623: checking whether we are using the GNU C compiler
configure:4642: gcc -c conftest.c >&5
configure:4642: $? = 0
configure:4651: result: yes
configure:4660: checking whether gcc accepts -g
configure:4680: gcc -c -g conftest.c >&5
configure:4680: $? = 0
configure:4721: result: yes
configure:4738: checking for gcc option to accept ISO C89
configure:4802: gcc -c -g -O2 conftest.c >&5
configure:4802: $? = 0
configure:4815: result: none needed
configure:4893: checking for g++
configure:4909: found /usr/bin/g++
configure:4920: result: g++
configure:4947: checking for C++ compiler version
configure:4956: g++ --version >&5
g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
Copyright (C) 2016 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:4967: $? = 0
configure:4956: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.2.0-5ubuntu12' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12)
configure:4967: $? = 0
configure:4956: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:4967: $? = 1
configure:4956: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
g++: fatal error: no input files
compilation terminated.
configure:4967: $? = 1
configure:4971: checking whether we are using the GNU C++ compiler
configure:4990: g++ -c conftest.cpp >&5
configure:4990: $? = 0
configure:4999: result: yes
configure:5008: checking whether g++ accepts -g
configure:5028: g++ -c -g conftest.cpp >&5
configure:5028: $? = 0
configure:5069: result: yes
configure:5118: checking whether g++ accepts -static-libstdc++ -static-libgcc
configure:5135: g++ -o conftest -g -O2 -static-libstdc++ -static-libgcc conftest.cpp >&5
configure:5135: $? = 0
configure:5136: result: yes
configure:5200: checking for gnatbind
configure:5230: result: no
configure:5292: checking for gnatmake
configure:5322: result: no
configure:5341: checking whether compiler driver understands Ada
configure:5364: result: no
configure:5373: checking how to compare bootstrapped objects
configure:5398: result: cmp --ignore-initial=16 $$f1 $$f2
configure:5458: checking for objdir
configure:5473: result: .libs
configure:6024: checking for isl 0.16, 0.15, or deprecated 0.14
configure:6037: gcc -o conftest -g -O2 -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src -I$$s/mpc/src -lisl -L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/mpfr/src/.libs -L$$r/$(HOST_SUBDIR)/mpc/src/.libs -lmpc -lmpfr -lgmp conftest.c -lisl -lgmp >&5
conftest.c:10:21: fatal error: isl/ctx.h: No such file or directory
#include <isl/ctx.h>
This is the 3rd time i am trying to follow the LFS book and each time i fail miserably.
I'm trying to build the gcc as described in seciton 5.5.
I keep on running into errors, rather then posting the entire config.log file i'm going to post the relevant snippets.
I can't seem to figure out why the error is occuring, i have a functioning gcc complier (i executed a simple helloworld.c file).
This error message doesn't make sense to a noob like me. Hopefully someone can help me out
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
somewhere within that code that is something calling for -V that is not within the code to take such a call. look through your code to find it then comment it out.
check over your code again to see what it is you are doing with it and why it has such a thing in there, it maybe needed just not properly defined and coded to take a argv '-V'
example
Code:
int main (int argc, char **argv){
if (strcmp (argv[i], "-alpha") == 0)
.....
..........
return 0;
}
Or are you passing a -V in the command line for configure? if yes then stop that. rethink how it is to be ran.
I do not know why you're using a configre file for a simple hello world
Oh sorry I didn't catch the LFS. it didn't click in my brain. I keep forgetting what that acronym stands for. by bag
PS and please take that long line in your first post that is really long and slice it up a bit, it is making this post in here rather wider then it needs to be.
That -V error isn't serious. During the configure stage of a gcc build, all sorts of things are tried out to see whether
or not your system can build them. If not, that particular test gives an error. As you can see from the overall output, the
configuration process goes on normally after that.
The error that has stopped configuration is the one at the end. isl is part of something called graphite, but your system
shouldn't be trying to build that since you haven't asked for it. At least, I assume you haven't; it's not part of the
gcc build instructions in 5.5.
Are you building out of Ubuntu? It's not a very good host for LFS. In particular, it uses dash and mawk instead of bash and
gawk. It may also have later versions of gcc and binutils than the recommended ones. Did you go carefully through the
system requirements at the beginning of the book?
Apologies all for the late reply, before posting any replies i wanted to make sure i hadn't been stupid and missed out a step. So i pulled up LFS 8.0 (making sure i was using the latest LFS book) and repeated everything. Still got the same error.
Also thanks all for the replies, much appreciated
Quote:
Originally Posted by BW-userx
somewhere within that code that is something calling for -V that is not within the code to take such a call. look through your code to find it then comment it out.
check over your code again to see what it is you are doing with it and why it has such a thing in there, it maybe needed just not properly defined and coded to take a argv '-V'
for that second line why are you trying to compile a gcc whats wrong with the one you got?
I had a look through the code i was entering and no where do i pass a variable "-V". If it is passed it is passed by a file that i have gotten in accordance to the LFS pdf.
Quote:
Originally Posted by knudfl
@bahjat93 : Welcome to LQ.
? Which LFS version ? (8.0 ?) And which OS are you using ? Name and version, please.
Note : Please do not use 'php code'.
Hit the 'Edit' button in post #1 and change to [code]code text[/code]
-
Apologies for that, i have corrected my mistake. In the future i will be more mindful.
uname -r gives me "4.8.0-45-generic", this tells me it's kernel 4xxxx
cat /etc/*-release, telss me i'm running Ubuntu 16.10
Quote:
Originally Posted by hazel
That -V error isn't serious. During the configure stage of a gcc build, all sorts of things are tried out to see whether
or not your system can build them. If not, that particular test gives an error. As you can see from the overall output, the
configuration process goes on normally after that.
The error that has stopped configuration is the one at the end. isl is part of something called graphite, but your system
shouldn't be trying to build that since you haven't asked for it. At least, I assume you haven't; it's not part of the
gcc build instructions in 5.5.
Are you building out of Ubuntu? It's not a very good host for LFS. In particular, it uses dash and mawk instead of bash and
gawk. It may also have later versions of gcc and binutils than the recommended ones. Did you go carefully through the
system requirements at the beginning of the book?
When checking system requirements i ensured that i had all the required packages.
It's worth me pointing out that in section 5.5 it does not tell you how to extract the gcc-6.3.0.tar.bz2. I extracted this by entering the command tar -xvf gcc-6.3.0.tar.bz2 which created the gcc-6.3.0 folder and i went in that to prepare gcc for compilation.
I am using Ubuntu unfortunately because it was the easiest one to load onto my system. I tried fatdog64 but for some reason it wasn't saving data onto my HDD so my fall back was Ubuntu
When checking system requirements i ensured that i had all the required packages.
It's worth me pointing out that in section 5.5 it does not tell you how to extract the gcc-6.3.0.tar.bz2. I extracted this by entering the command tar -xvf gcc-6.3.0.tar.bz2 which created the gcc-6.3.0 folder and i went in that to prepare gcc for compilation.
I am using Ubuntu unfortunately because it was the easiest one to load onto my system. I tried fatdog64 but for some reason it wasn't saving data onto my HDD so my fall back was Ubuntu
Your extraction command is fine. Did you remember to create a build subdirectory to work in?
The reason I mentioned Ubuntu is that I know that people who use it to build LFS have run into problems before now. Apparently if you don't have an existing LFS to build from, the best build host is supposed to be Slackware.
Your extraction command is fine. Did you remember to create a build subdirectory to work in?
The reason I mentioned Ubuntu is that I know that people who use it to build LFS have run into problems before now. Apparently if you don't have an existing LFS to build from, the best build host is supposed to be Slackware.
Yeah, the sub directory gets built for me when i open the .tar file. I go into that directory and then the build directory to compile the source code.
Quote:
Originally Posted by knudfl
Re #7, #1.
"4.8.0-45-generic" : Kernel version doesn't matter.
Ubuntu 16.10 : May be usable ?
? What's the output from ./version-check.sh
My output is shown below. I can't seem to see a problem with it but if there is please let me know. Also you mentioned a few packages. How can i download them from the command line?
Code:
sh version-check.sh
bash, version 4.3.46(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.27
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.25
diff (GNU diffutils) 3.3
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.1)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
(Ubuntu GLIBC 2.24-3ubuntu1) 2.24
grep (GNU grep) 2.25
gzip 1.6
Linux version 4.8.0-46-generic (buildd@lcy01-16) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #49-Ubuntu SMP Fri Mar 31 13:57:14 UTC 2017
m4 (GNU M4) 1.4.17
GNU Make 4.1
GNU patch 2.7.5
Perl version='5.22.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.29
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
I can already see one thing that is definitely wrong: /bin/sh points to dash and not bash. This is standard on all Debian-based systems nowadays, but it's no good for LFS. There may be other things too. You should check each line of your output against the specifications in Section 2.2 and make corrections where necessary. Then start again from the beginning.
;-) You often have to do that with LFS, especially if it's your first one. Think of it as a learning experience.
been a long time since i used debian but unless things have changed you should use the update-alternative command to change your default shell otherwise a system update may overwrite your changes, and yes Slackware is the best distro to use for building LFS.
P.S.
this thread really needs to go in the LFS forum.
I can already see one thing that is definitely wrong: /bin/sh points to dash and not bash. This is standard on all Debian-based systems nowadays, but it's no good for LFS. There may be other things too. You should check each line of your output against the specifications in Section 2.2 and make corrections where necessary. Then start again from the beginning.
;-) You often have to do that with LFS, especially if it's your first one. Think of it as a learning experience.
I deleted the binutils folder and started the build again. Unfortunately i still got the same error message.
Is there anything else i missed, in my output for version-check.sh
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.