OpenCores
no use no use 1/1 no use no use
GNU tool chain installation
by harinath on Jan 13, 2010
harinath
Posts: 4
Joined: Jan 11, 2010
Last seen: Mar 29, 2010
I am trying to install GNU tool chain using the MOF_ORSOC_TCHN_v5c_or32-elf.sh script provided on the http://www.opencores.org/openrisc,gnu_toolchain page. I am getting errors during rebuilding of gcc as shown below.

-------------------------------------------------------------------------------------
...
############################## Re-building or-32 gcc ###########################

Re-building gcc-4.2.2

Re-configuring gcc-4.2.2: --target=or32-elf --prefix=/scratch/harinath/work/or1000/or32-elf --with-local-prefix=/scratch/harinath/work/or1000/or32-elf/or32-elf --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c
Logging output to gcc-4.2.2-rebuild-configure.log

Re-building and re-installing gcc-4.2.2
Logging output to gcc-4.2.2-rebuild-make.log

############################ERROR#############################

Error during toolchain installation.

Please report this to the script maintainers.
...
-------------------------------------------------------------------------------------


The or32-build/b-gcc/gcc-4.2.2-rebuild-make.log file has the following messages.

-------------------------------------------------------------------------------------
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory `/.../or32-build/b-gcc'
make: *** [all] Error 2
-------------------------------------------------------------------------------------

How can I resolved this error?


"gcc -v" shows the following.

-------------------------------------------------------------------------------------
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)
-------------------------------------------------------------------------------------
RE: GNU tool chain installation
by julius on Jan 13, 2010
julius
Posts: 363
Joined: Jul 1, 2008
Last seen: May 17, 2021
configure: error: C compiler cannot create executables

Can you give some details about the distro you're using?

A quick Google suggests the issue is to do with missing libc development libraries. I note that you're gcc indicates that it's some kind of Redhat (or FC), I'm not familiar with it, nor do I have a Redhat/FC box handy so I can't test the exact command, but you could try installing the glibc-devel package via the yum package management tool.

# yum install gcc

or maybe

# yum install glibc-devel

You may also need to get the glibc-headers package. The equivalent apt package management tool command is 'apt-get install libc6-dev'

I'm surprised it built things up that point but failed on the GCC rebuild, the whole point of which is to add the uClibc library. I know we play around with the CC variable somewhere during the uClibc compilation, perhaps this has somehow carried over into the rebuilding of GCC by the system.

RE: GNU tool chain installation
by harinath on Jan 13, 2010
harinath
Posts: 4
Joined: Jan 11, 2010
Last seen: Mar 29, 2010
Can you give some details about the distro you're using?


Here are details on Linux distribution.

$ more /etc/fedora-release
Fedora release 7 (Moonshine)
$ more /proc/version
Linux version 2.6.22.9-91.fc7 (kojibuilder@xenbuilder2.fedora.redhat.com) (gcc version 4.1.2 20070502 (Red Hat 4.1.2-12)) #1 SMP Thu Sep 27 20:47:39 EDT 2007

Is there a way to get around this issue without installing glibc-devel as root? I do not have root permissions on the machine I am running.
RE: GNU tool chain installation
by julius on Jan 14, 2010
julius
Posts: 363
Joined: Jul 1, 2008
Last seen: May 17, 2021
Is there a way to get around this issue without installing glibc-devel as root? I do not have root permissions on the machine I am running.

I doubt it. So it seems your sys admin hasn't got the proper gcc/g++ installed for you to use.
RE: GNU tool chain installation
by harinath on Jan 15, 2010
harinath
Posts: 4
Joined: Jan 11, 2010
Last seen: Mar 29, 2010
Is there a way to get around this issue without installing glibc-devel as root? I do not have root permissions on the machine I am running.

I doubt it. So it seems your sys admin hasn't got the proper gcc/g++ installed for you to use.


I tried numerous suggestions on the web for resolving the config errors on Fedora, which are mentioned earlier in this thread. None of them worked.

At this point, I need the tool chain installation only to generate memory initialization data files for event driven Verilog simulation. Is there a way I can get pre-generated files with memory initialization data? I am assuming that the contents of these files for a given test are independent of the Linux distribution I am using. I appreciate if someone can provide a tarball with those files from their own build. I am running commands like the following.

make rtl-tests TESTS=basic-nocache

I need the *.vmem and *twobyte-sizefirst.hex files in the following dirs under //orpsocv2/sw/ in openrisc tree.

basic/ cbasic/ cust/ dhry/ eth/ except/ fpu/ icm/ mmu/ mul/ syscall/ tick/ uart/

RE: GNU tool chain installation
by julius on Jan 15, 2010
julius
Posts: 363
Joined: Jul 1, 2008
Last seen: May 17, 2021
At this point, I need the tool chain installation only to generate memory initialization data files for event driven Verilog simulation.

It has been suggested that we should make available pre-compiled versions of the toolchain for the different platforms, eliminating the need for people to download and compile the toolchain.

I will put together a couple of versions of the toolchain today and make them available for download somewhere. This allows you to generate the required files and do other development on the OpenRISC platform.
RE: GNU tool chain installation
by julius on Jan 15, 2010
julius
Posts: 363
Joined: Jul 1, 2008
Last seen: May 17, 2021
Ok, as promised, pre-compiled versions of the toolchain for Linux. One for normal x86 (i386 and similar) and one for x86_64 (all those 64-bit distros).

or32-elf-linux-x86.tar.bz2
or32-elf-linux-x86_64.tar.bz2

These are archives of the resulting directory after toolchain compile and install. Put them wherever you like and add the where-you-extracted-it/or32-elf-/bin in your shell's PATH variable.
RE: GNU tool chain installation
by harinath on Jan 15, 2010
harinath
Posts: 4
Joined: Jan 11, 2010
Last seen: Mar 29, 2010
Ok, as promised, pre-compiled versions of the toolchain for Linux. One for normal x86 (i386 and similar) and one for x86_64 (all those 64-bit distros).

or32-elf-linux-x86.tar.bz2
or32-elf-linux-x86_64.tar.bz2

These are archives of the resulting directory after toolchain compile and install. Put them wherever you like and add the where-you-extracted-it/or32-elf-/bin in your shell's PATH variable.


Thank you very much. These pre-built toolchain binaries worked smoothly. I was able to run at least one test successfully.
no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.