OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 1:58 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Problem building gcc for cross compiling. [lto1] Error 1
PostPosted: Tue May 12, 2020 12:33 am 
Offline

Joined: Tue May 12, 2020 12:15 am
Posts: 1
Hello. This is my first post. Any help is welcome :D

I am following the tutorial to build gcc for cross compiling:

https://wiki.osdev.org/GCC_Cross-Compiler

I am building in a Lubuntu Virtual Box machine.

I installed all the dependencies listed in the tutorial except:
CLooG (Optional)
ISL (Optional)

Lubuntu doesn't find them.

Since they are optional I tried to build gcc.

To this point all is ok:
---------------------------------------------------------
cd $HOME/src

# The $PREFIX/bin dir _must_ be in the PATH. We did that above.
which -- $TARGET-as || echo $TARGET-as is not in the PATH

mkdir build-gcc
cd build-gcc
../gcc-x.y.z/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --enable-languages=c,c++ --without-headers
---------------------------(All above OK)----------------------------

When I apply:

make all-gcc

after a lot of time I get the following error:

++ -no-pie -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o lto1 \
lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-common.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a -lisl -lmpc -lmpfr -lgmp -rdynamic -ldl -L./../zlib -lz libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
collect2: error: ld returned 1 exit status
make[1]: *** [../../gcc-10.1.0/gcc/lto/Make-lang.in:88: lto1] Error 1
make[1]: Leaving directory '/home/arbol/src/build-gcc/gcc'
make: *** [Makefile:4390: all-gcc] Error 2


I am using and old PC and the building took more than an hour to finally crash because of this error.

Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Problem building gcc for cross compiling. [lto1] Error 1
PostPosted: Fri May 15, 2020 3:17 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5143
You haven't included enough of the log to see the actual error message.

What version of GCC and binutils are you using to build your cross-compiler?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot], Bing [Bot], DotBot [Bot] and 97 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group