Error while compiling gcc (pass2)..
hey mates,
I'm compiling a cross-toolchain for ARM and i get error on compiling gcc in pass2. ERROR:- configure: error: in `/home/toolchain/Control-project/build-tools/build-gcc/arm-linux/libgomp': configure: error: C compiler cannot create executables See `config.log' for more details. make[1]: *** [configure-target-libgomp] Error 1 make[1]: Leaving directory `/home/toolchain/Control-project/build-tools/build-gcc' make: *** [all] Error 2 configure it with: ../gcc-4.5.1/configure --target=${TARGET} --prefix=$PREFIX --enable-languages="c,c++" --disable-shared --disable-threads And im using these packages:- linux-2.6.18 (headers) gcc-4.5.1 gmp-5.0.1 mpc-0.8.2 mpfr-3.0.0 binutils-2.20.1 glibc-2.13 glibc-ports-2.13 working on- fedora15 + linux-2.6.38. I've no idea whats wrong with this. plzzzzzz... help me find a solution as soon as possible. Thnk you |
What is the tail of config.log?
|
build-gcc2/arm-linux/libgomp/config.log :-
This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU OpenMP Runtime Library configure 1.0, which was generated by GNU Autoconf 2.64. Invocation command line was $ /home/toolchain2/build-tools/gcc-4.5.1/libgomp/configure --cache-file=./config.cache --enable-multilib --with-cross-host=i686-pc-linux-gnu --prefix=/home/toolchain2/tools --disable-shared --disable-threads --enable-languages=c,c++ --program-transform-name=s&^&arm-linux-& --disable-option-checking --with-target-subdir=arm-linux --build=i686-pc-linux-gnu --host=arm-linux --target=arm-linux --srcdir=../../../gcc-4.5.1/libgomp Code:
## --------- ## Code:
## ----------- ## Code:
## ---------------- ## Code:
## ----------------- ## Code:
## ----------- ## |
hmmm.. i've solved this problem by separately configuring and compiling libgomp, libmudflap ,libssp.I dont know if this is a good solution but it does the trick.
But now i get some error with libgcc when i configure gcc with --enable-shared. Error is: crti.o could not read symbols |
Not an easy task to build a new cross toolchain.
You may pick up "non arm" components from your OS. Looks like you you have some kind of mix-up concerning crti.o. The proof way is said to be crosstool-ng http://crosstool-ng.org/ > http://crosstool-ng.org/download/cro...1.18.0.tar.bz2 > crosstool-ng-1.18.0.tar.bz2 : 31 Jan 2013. ( crosstool-ng is constantly maintained, unlike other available tool-chains.) Remark : You can use the 'Report' button for asking the thread moved to the 'Embedded Forum', where you can get expert help. - |
Hey knudfl , thnx for ur reply but this doesnt help me solve my problem :( :(
|
specifically the error i get is:
/home/toolchain2/tools/arm-linux/bin/ld: /home/toolchain2/tools/arm-linux/lib/crti.o: Relocations in generic ELF (EM: 3) /home/toolchain2/tools/arm-linux/bin/ld: /home/toolchain2/tools/arm-linux/lib/crti.o: Relocations in generic ELF (EM: 3) /home/toolchain2/tools/arm-linux/lib/crti.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[2]: *** [libgcc_s.so] Error 1 make[2]: Leaving directory `/home/toolchain2/build-tools/build-gcc2/arm-linux/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/home/toolchain2/build-tools/build-gcc2' make: *** [all] Error 2 |
One thing i came across is, when i type the command :
file /home/toolchain2/tools/arm-linux/lib/*.o /home/toolchain2/tools/arm-linux/lib/crt1.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, not stripped /home/toolchain2/tools/arm-linux/lib/crti.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped /home/toolchain2/tools/arm-linux/lib/crtn.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped /home/toolchain2/tools/arm-linux/lib/gcrt1.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, not stripped /home/toolchain2/tools/arm-linux/lib/Mcrt1.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped /home/toolchain2/tools/arm-linux/lib/Scrt1.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, not stripped i think all these .o files must be of ARM specific, am i right??? If yes the problem is here. Plzzzz help me solve this problem, its almost 10days and i still dont hv the solution :( :( |
There is a very good reason why packages such as the aforementioned crosstool-NG exist. It's because there is a lot of knowledge required to build a cross toolchain. Do yourself a favor and use the knowledge that is embedded in the package (and there are others, as well). Especially for ARM architectures where there are so many combinations and permutations of various CPUs, library types, ABIs, FPUs, etc, you should make use of all the hard work that others have done to produce a quality toolchain.
|
I've successfully build the cross-toolchain for ARM.
But now i want to enable soft-float support in it, any ideas how to do that??? thnx smith :) |
aaahh.. succesfully build the cross-toolchain with softfloat enable :) :)
Just apply the patch to gcc-4.5.1 ( 810-arm-softfloat-libgcc.patch ) and add --with-float=soft configuration option in each step. And ur Done!!! :D |
when i compile u-boot for beagle board like this:
cd u-boot-2011.06-rc3/ make ARCH=arm CROSS_COMPILE=arm-linux- distclean make ARCH=arm CROSS_COMPILE=arm-linux- omap3_beagle_config make ARCH=arm CROSS_COMPILE=arm-linux- i get this error: /home/toolchain3/tools/lib/gcc/arm-linux/4.5.1/libgcc.a(_dvmd_lnx.o): In function `__div0': /home/toolchain3/build-tools/build-gcc2/arm-linux/libgcc/../../../gcc-4.5.1/libgcc/../gcc/config/arm/lib1funcs.asm:1265: undefined reference to `raise' arm-linux-ld: BFD (GNU Binutils) 2.20.1.20100303 assertion fail ../../binutils-2.20.1/bfd/elf32-arm.c:12191 arm-linux-ld: BFD (GNU Binutils) 2.20.1.20100303 assertion fail ../../binutils-2.20.1/bfd/elf32-arm.c:12425 /bin/sh: line 1: 18242 Segmentation fault (core dumped) arm-linux-ld -pie -T u-boot.lds -Bstatic -Ttext 0x80008000 $UNDEF_SYM arch/arm/cpu/armv7/start.o --start-group api/libapi.o arch/arm/cpu/armv7/libarmv7.o arch/arm/cpu/armv7/omap-common/libomap-common.o arch/arm/cpu/armv7/omap3/libomap3.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/libpower.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/spi/libspi.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.a drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cramfs/libcramfs.o fs/ext2/libext2fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/reiserfs/libreiserfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o lib/zlib/libz.o net/libnet.o post/libpost.o board/ti/beagle/libbeagle.o --end-group -L /home/toolchain3/tools/lib/gcc/arm-linux/4.5.1 -lgcc -Map u-boot.map -o u-boot make: *** [u-boot] Error 139` Any idea whats wrong??? :/ |
All times are GMT -5. The time now is 08:43 PM. |