[SOLVED]Problems with i686-elf-gcc
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
[SOLVED]Problems with i686-elf-gcc
Hello again, I am having problems with my cross-compiled version of gcc. Just like the tutorial I cross-compiled gcc and binutils(and had to build some packages from the source). Whenever I try to compile something with it it says it that ld can not find certain files and the build fails. Any help? I am currently using GNU/Linux(Pinguy 14.04) and I don't know what to do. Please help?
Last edited by bashcommando on Wed Jan 21, 2015 4:25 pm, edited 1 time in total.
Building an operating system is like building an airplane, you don't want it to crash.
Re: Problems with i686-elf-gcc
Please read your post. Do you really think that there is enough information there to guarantee that someone can provide constructive help ?bashcommando wrote:Hello again, I am having problems with my cross-compiled version of gcc. Just like the tutorial I cross-compiled gcc and binutils(and had to build some packages from the source). Whenever I try to compile something with it it says it that ld can not find certain files and the build fails. Any help? I am currently using GNU/Linux(Pinguy 14.04) and I don't know what to do. Please help?
Hint: The answer is not "Yes".
If a trainstation is where trains stop, what is a workstation ?
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
Re: Problems with i686-elf-gcc
I don't need the hint, what else can I provide? Oh wait, I am using gcc 4.9.2, binutils 2.25 and here is a error log(I got a different error this time):gerryg400 wrote:Please read your post. Do you really think that there is enough information there to guarantee that someone can provide constructive help ?bashcommando wrote:Hello again, I am having problems with my cross-compiled version of gcc. Just like the tutorial I cross-compiled gcc and binutils(and had to build some packages from the source). Whenever I try to compile something with it it says it that ld can not find certain files and the build fails. Any help? I am currently using GNU/Linux(Pinguy 14.04) and I don't know what to do. Please help?
Hint: The answer is not "Yes".
Code: Select all
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 20 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 21 has invalid symbol index 22
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
Building an operating system is like building an airplane, you don't want it to crash.
Re: Problems with i686-elf-gcc
Did you compile withbashcommando wrote:Code: Select all
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
Code: Select all
-ffreestanding
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Problems with i686-elf-gcc
Why is the only instance of "elf" in the thread title, and everything else "linux-gnu"? There's no cross-compiler involved anywhere.cross-compiler
Re: Problems with i686-elf-gcc
Minimalism is all very well in its place, but you are still not providing enough information. At the least we need to know the contents of your $PATH variable and the command line that you are using to compile your program. The fact that it is trying to link against your normal library files rather than the cross-compiler ones indicates some fairly fundamental mistake.
Also note that whatever you are trying to compile does not contain a "main" function which C assumes exists (crt1.o will call it) unless you tell it otherwise. What are you trying to compile? A kernel, a user program, a library, or what?
Also note that whatever you are trying to compile does not contain a "main" function which C assumes exists (crt1.o will call it) unless you tell it otherwise. What are you trying to compile? A kernel, a user program, a library, or what?
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
Re: Problems with i686-elf-gcc
Combuster wrote:Why is the only instance of "elf" in the thread title, and everything else "linux-gnu"? There's no cross-compiler involved anywhere.cross-compiler
Thanks for replying, no I didn't compile it with -ffreestanding and yes I am using a cross-compiler. It is located in ~/opt/cross/bin/i686-elf-gcc.ExeTwezz wrote:Did you compile withbashcommando wrote:Code: Select all
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
?Code: Select all
-ffreestanding
A program to test if it would work, my path was just like it said in the tutorial.iansjack wrote:Minimalism is all very well in its place, but you are still not providing enough information. At the least we need to know the contents of your $PATH variable and the command line that you are using to compile your program. The fact that it is trying to link against your normal library files rather than the cross-compiler ones indicates some fairly fundamental mistake.
Also note that whatever you are trying to compile does not contain a "main" function which C assumes exists (crt1.o will call it) unless you tell it otherwise. What are you trying to compile? A kernel, a user program, a library, or what?
Code: Select all
void main() {
asm volatile("nop");
}
Building an operating system is like building an airplane, you don't want it to crash.
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
Re: Problems with i686-elf-gcc
So I compiled with -ffreestanding and it gave me the error I had before:ExeTwezz wrote:Did you compile withbashcommando wrote:Code: Select all
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
?Code: Select all
-ffreestanding
Code: Select all
ffreestanding
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.9.2/../../../../i686-elf/bin/ld: cannot find crt0.o: No such file or directory
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.9.2/../../../../i686-elf/bin/ld: cannot find crtbegin.o: No such file or directory
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.9.2/../../../../i686-elf/bin/ld: cannot find -lgcc
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.9.2/../../../../i686-elf/bin/ld: cannot find -lc
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.9.2/../../../../i686-elf/bin/ld: cannot find -lgcc
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.9.2/../../../../i686-elf/bin/ld: cannot find crtend.o: No such file or directory
collect2: error: ld returned 1 exit status
Edit: I figured it out. I don't have libgcc for i686-elf.
Building an operating system is like building an airplane, you don't want it to crash.
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
Re: Problems with i686-elf-gcc
I tried to recompile but:ExeTwezz wrote:Did you compile withbashcommando wrote:Code: Select all
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
?Code: Select all
-ffreestanding
Code: Select all
⏚ [bashcommando:/home … 86-elf-gcc/gcc-4.9.2] $ make all-target-libgcc
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty'
make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin'
make all-am
make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin'
make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin'
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/intl'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/intl'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty'
make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/fixincludes'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/fixincludes'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-static-libstdc++ -static-libgcc " "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/home/bashcommando/opt/cross" "infodir=/home/bashcommando/opt/cross/share/info" "libdir=/home/bashcommando/opt/cross/lib" "prefix=/home/bashcommando/opt/cross" "tooldir=/home/bashcommando/opt/cross/i686-elf" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/zlib'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace'
make all-am
make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace'
true DO=all multi-do # make
make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace'
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libcpp'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libdecnumber'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libdecnumber'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/fixincludes'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/fixincludes'
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/gcc'
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/gcc'
Checking multilib configuration for libgcc...
make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/i686-elf/libgcc'
Makefile:165: ../.././gcc/libgcc.mvars: No such file or directory
make[1]: *** No rule to make target `../.././gcc/libgcc.mvars'. Stop.
make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/i686-elf/libgcc'
make: *** [all-target-libgcc] Error 2
Building an operating system is like building an airplane, you don't want it to crash.
-
- Posts: 21
- Joined: Mon Feb 03, 2014 12:52 pm
Re: Problems with i686-elf-gcc
bashcommando wrote:I tried to recompile but:ExeTwezz wrote:Did you compile withbashcommando wrote:Code: Select all
/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
?Code: Select all
-ffreestanding
Code: Select all
⏚ [bashcommando:/home … 86-elf-gcc/gcc-4.9.2] $ make all-target-libgcc make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty' make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty/testsuite' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty/testsuite' make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libiberty' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin' make all-am make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin' make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin' make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/lto-plugin' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/intl' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/intl' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty' make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty/testsuite' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty/testsuite' make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/libiberty' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/fixincludes' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/build-i686-pc-linux-gnu/fixincludes' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/zlib' true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-static-libstdc++ -static-libgcc " "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/home/bashcommando/opt/cross" "infodir=/home/bashcommando/opt/cross/share/info" "libdir=/home/bashcommando/opt/cross/lib" "prefix=/home/bashcommando/opt/cross" "tooldir=/home/bashcommando/opt/cross/i686-elf" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/zlib' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace' make all-am make[2]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace' true DO=all multi-do # make make[2]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace' make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libbacktrace' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libcpp' test -f config.h || (rm -f stamp-h1 && make stamp-h1) make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libcpp' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libdecnumber' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/libdecnumber' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/fixincludes' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/fixincludes' make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/gcc' make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/host-i686-pc-linux-gnu/gcc' Checking multilib configuration for libgcc... make[1]: Entering directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/i686-elf/libgcc' Makefile:165: ../.././gcc/libgcc.mvars: No such file or directory make[1]: *** No rule to make target `../.././gcc/libgcc.mvars'. Stop. make[1]: Leaving directory `/home/bashcommando/Desktop/Projects/i686-elf-gcc/gcc-4.9.2/i686-elf/libgcc' make: *** [all-target-libgcc] Error 2
You did not follow gcc build recomendations.
Try to exit gcc directory and create another directory for call the make.
More instructions: http://wiki.osdev.org/GCC_Cross-Compiler
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
Re: Problems with i686-elf-gcc
So I have to re-download gcc again? I already followed the instructions. I'll try again.gardinirafael wrote: You did not follow gcc build recomendations.
Try to exit gcc directory and create another directory for call the make.
More instructions: http://wiki.osdev.org/GCC_Cross-Compiler
Building an operating system is like building an airplane, you don't want it to crash.
-
- Posts: 21
- Joined: Mon Feb 03, 2014 12:52 pm
Re: Problems with i686-elf-gcc
No, you haven't. re-extract GCC files and call make out of GCC dirbashcommando wrote:So I have to re-download gcc again? I already followed the instructions. I'll try again.gardinirafael wrote: You did not follow gcc build recomendations.
Try to exit gcc directory and create another directory for call the make.
More instructions: http://wiki.osdev.org/GCC_Cross-Compiler
Example:
cd /home/user
extract command
mkdir build_dir
cd build_dir
Inside of build dir, you call the make
../gccdir/make
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: Problems with i686-elf-gcc
No, you don't do it like this, because it doesn't matter from where you 'make' the project, but from/to where you 'configure'd it.gardinirafael wrote:... call make out of GCC dir
Example:
cd /home/user
extract command
mkdir build_dir
cd build_dir
Inside of build dir, you call the make
../gccdir/make
You call the binutils/gcc/whatever configure scripts from within the build dir and then call make within the build dir.
Code: Select all
mkdir gcc-4.x-build
cd gcc-4.x-build
../gcc-4.x/configure yourflags
make
make install
- bashcommando
- Member
- Posts: 62
- Joined: Mon Jan 06, 2014 4:23 pm
Re: Problems with i686-elf-gcc
max wrote:No, you don't do it like this, because it doesn't matter from where you 'make' the project, but from/to where you 'configure'd it.gardinirafael wrote:... call make out of GCC dir
Example:
cd /home/user
extract command
mkdir build_dir
cd build_dir
Inside of build dir, you call the make
../gccdir/make
You call the binutils/gcc/whatever configure scripts from within the build dir and then call make within the build dir.
Code: Select all
mkdir gcc-4.x-build cd gcc-4.x-build ../gcc-4.x/configure yourflags make make install
I followed the tutorial as accurate as possible and downgraded to gcc 4.8.3 and binutils 2.24. I got this:gardinirafael wrote:No, you haven't. re-extract GCC files and call make out of GCC dirbashcommando wrote:So I have to re-download gcc again? I already followed the instructions. I'll try again.gardinirafael wrote: You did not follow gcc build recomendations.
Try to exit gcc directory and create another directory for call the make.
More instructions: http://wiki.osdev.org/GCC_Cross-Compiler
Example:
cd /home/user
extract command
mkdir build_dir
cd build_dir
Inside of build dir, you call the make
../gccdir/make
Code: Select all
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.8.3/../../../../i686-elf/bin/ld: cannot find crt0.o: No such file or directory
/home/bashcommando/opt/cross/lib/gcc/i686-elf/4.8.3/../../../../i686-elf/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
Building an operating system is like building an airplane, you don't want it to crash.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Problems with i686-elf-gcc
Reading, as usual:What else am I doing wrong?
GCC Cross-Compiler wrote:Note how this compiler is not able to compile normal C programs.