OpenCores
no use no use 1/1 no use no use
problem when building GNU tool chain
by avamsi on Apr 23, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,
This this the log I got when building the GNU tool chain on ubuntu10.4 64-bit OS.
First I checked out all the tool chain stuff from SVN. Initially OR1KSIM was built and installed properly(/opt/OR1KSIM/bin). When I am building tool chain for newlib, it is giving following error. Though I follow the steps given on the GNU tool chain page, it is not building the tool chain. Please look into the log and point out where it is wrong.

../../.././gdb-7.2/sim/or32/wrapper.c: In function �sim_open�:
../../.././gdb-7.2/sim/or32/wrapper.c:175: warning: passing argument 1 of �or1ksim_init� makes pointer from integer without a cast
/opt/or1ksim/include/or1ksim.h:49: note: expected �const char *� but argument is of type �int�
../../.././gdb-7.2/sim/or32/wrapper.c:175: warning: passing argument 2 of �or1ksim_init� from incompatible pointer type
/opt/or1ksim/include/or1ksim.h:49: note: expected �const char *� but argument is of type �char **�
../../.././gdb-7.2/sim/or32/wrapper.c:189: warning: cast to pointer from integer of different size
../../.././gdb-7.2/sim/or32/wrapper.c: In function �sim_resume�:
../../.././gdb-7.2/sim/or32/wrapper.c:650: error: �OR1KSIM_RC_HALTED� undeclared (first use in this function)
../../.././gdb-7.2/sim/or32/wrapper.c:650: error: (Each undeclared identifier is reported only once
../../.././gdb-7.2/sim/or32/wrapper.c:650: error: for each function it appears in.)
make[2]: *** [wrapper.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/avamsi/OpenRISC/gnu-src/bd-elf-gdb/sim/or32'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/avamsi/OpenRISC/gnu-src/bd-elf-gdb/sim'
make: *** [all-sim] Error 2
make (all-build all-sim all-gdb) failed.


Thanks,
A,Vamsi
RE: problem when building GNU tool chain
by julius on Apr 23, 2012
julius
Posts: 363
Joined: Jul 1, 2008
Last seen: May 17, 2021
Did you pass this or1ksim install directory with --or1ksim-dir to bld-all.sh?
RE: problem when building GNU tool chain
by avamsi on Apr 23, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,

I followed the steps from the following page. I did not build it from the bld-all.sh.

http://opencores.org/openrisc,or1ksim#downloading

Can you correct me if my procedure is wrong.

Thanks,
A.vamsi
RE: problem when building GNU tool chain
by avamsi on Apr 23, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
Hi,

I followed the steps to install or1ksim from the following page.
http://opencores.org/openrisc,or1ksim#downloading

or1ksim got installed at /opt/or1ksim.

Than I am giving the following commandsto build the tool chain,


To build and install both newlib (or32-elf-) and uClibc-based (or32-linux-) toolchains:

./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --uclibc-dir uClibc --linux-dir linux


To build and install only the newlib (or32-elf-) toolchain:

./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim --no-uclibc --no-or32-linux


Can you correct me if my procedure is wrong.

Thanks,
A.vamsi
RE: problem when building GNU tool chain
by jeremybennett on Apr 24, 2012
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi A Vasami

I tried this on a 64-bit machine running Fedora 16 and it worked for me. These are the versions:

    $ uname -a
    Linux mauli 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    $ gcc --version
    gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
    

I downloaded the latest versions of Or1ksim and the GNU tools from SVN and uClibc and Linux from git. Here is how I built Or1ksim from within the or1ksim directory.

    mkdir bd
    cd bd
    ../configure --target=or32-elf --prefix=/opt/or1ksim-new
    make
    make install
    

Here is how I built the tool chains from the GNU tools directory. I had downloaded uClibc and Linux into the same directory.

    ./bld-all.sh --force --prefix /opt/openrisc --or1ksim-dir /opt/or1ksim-new --uclibc-dir uClibc --linux-dir linux
    

The tools appear to have built correctly

    $ PATH=/opt/openrisc/bin:$PATH
    $ or32-elf-gcc --version
    or32-elf-gcc (OpenRISC 32-bit toolchain for or32-elf (built 20120424)) 4.5.1-or32-1.0rc4
    

I can only think you do not have the latest source from SVN. If it is still not working, would you post the results of uname -a and gcc --version here.

HTH

Jeremy

--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com

RE: problem when building GNU tool chain
by avamsi on Apr 25, 2012
avamsi
Posts: 54
Joined: Apr 16, 2012
Last seen: Jul 30, 2014
hi Jeremy,

Thank you for your replay,

I found where the problem is coming. Actually, earlier I installed the or1ksim in the /opt/or1ksim. That path was not being taken when I tried to build GNU newlib tool chain. Now I installed the or1ksim somewhere in my home directory. I provided this path. GNU tool chain got built. Now I am able to run some bare-metal apps on simulator.

Earlier I faced two issues.
1) The binaries(or1ksim and or32elf) which are available for download, will not run directly on my machine. I had to checkout all the tool chain source code and build here itself.
2) Though we install or1ksim in /opt/or1ksim, this path is not being taken though we provide it to bld-all.sh when building.

Thanks,
A.vamsi
RE: problem when building GNU tool chain
by jeremybennett on Apr 25, 2012
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

  1. The binaries(or1ksim and or32elf) which are available for download, will not run directly on my machine. I had to checkout all the tool chain source code and build here itself.
  2. Though we install or1ksim in /opt/or1ksim, this path is not being taken though we provide it to bld-all.sh when building.

Hi A Vamsi,

Glad you have solved the problem.

The first issue you raise is a generic problem for binaries. It is why it is always best to compile from source.

Your second issue is a bug. Would you file it in Bugzilla, so it does not get forgotten (http://bugzilla.opencores.org/). If you could also update the Wiki build instructions to note that you should add Or1ksim to the PATH before building the tool chain, that will be helpful.

Best wishes,

Jeremy

no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.