OpenCores
no use no use 1/1 no use no use
toolchain compilation problem with libsim.a
by voodoosound on Nov 28, 2011
voodoosound
Posts: 8
Joined: May 10, 2011
Last seen: Jun 11, 2014
Hello everyone,

i have tried compiling the toolchain all day long, but i didnt make it past the following point...




make[1]: *** No rule to make target `../sim/or32/libsim.a', needed by `gdb'. Stop.
make[1]: *** Waiting for unfinished jobs....
echo 'const char version[] = "'"`sed q ../.././gdb-7.2/gdb/version.in`"'";' >> version.c-tmp
AWK="gawk" \
/bin/bash ../.././gdb-7.2/gdb/features/feature_to_c.sh \
xml-builtin.tmp ../.././gdb-7.2/gdb/features/gdb-target.dtd ../.././gdb-7.2/gdb/features/xinclude.dtd ../.././gdb-7.2/gdb/features/library-list.dtd ../.././gdb-7.2/gdb/features/osdata.dtd ../.././gdb-7.2/gdb/features/threads.dtd
rm objc-exp.c.tmp
rm cp-name-parser.c.tmp
mv cp-name-parser.c.new ./cp-name-parser.c
rm c-exp.c.tmp
mv objc-exp.c.new ./objc-exp.c
echo 'const char host_name[] = "x86_64-unknown-linux-gnu";' >> version.c-tmp
mv c-exp.c.new ./c-exp.c
echo 'const char target_name[] = "or32-linux";' >> version.c-tmp
mv version.c-tmp version.c
/bin/bash ../.././gdb-7.2/gdb/../move-if-change xml-builtin.tmp xml-builtin.c
echo stamp > stamp-xml
make[1]: Leaving directory `~/workspace/or_gnu_toolchain/gnu-src2/bd-linux-gdb/gdb'
make: *** [all-gdb] Error 2
make (all-build all-sim all-gdb) failed.




does anyone have a clou, what mith go wrong?

regards
chris
RE: toolchain compilation problem with libsim.a
by jeremybennett on Nov 29, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

GDB uses Or1ksim as its simulator, so you need to build Or1ksim first, and you need to tell GDB where to find it when configuring.

Jeremy

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

RE: toolchain compilation problem with libsim.a
by voodoosound on Nov 30, 2011
voodoosound
Posts: 8
Joined: May 10, 2011
Last seen: Jun 11, 2014
hi,

i followed all the tutorial steps:
http://opencores.org/openrisc,or1ksim

and
make check

displays the following output:
----
libtool: compile: ~/workspace/or_gnu_toolchain/or1ksim-0.5.0rc2/compile -DHAVE_CONFIG_H -I. -I.. -I../support -I../mc-common -Wall -Werror -g -nostdlib -mhard-div -mhard-mul -MT int.lo -MD -MP -MF .deps/int.Tpo -c int.c -fPIC -DPIC -o .libs/int.o
~/workspace/or_gnu_toolchain/or1ksim-0.5.0rc2/compile: 123: -DHAVE_CONFIG_H: not found
make[4]: *** [int.lo] Error 1
make[4]: Leaving directory `~/workspace/or_gnu_toolchain/or1ksim-0.5.0rc2/testsuite/test-code-or1k/support'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `~/workspace/or_gnu_toolchain/or1ksim-0.5.0rc2/testsuite/test-code-or1k/support'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `~/workspace/or_gnu_toolchain/or1ksim-0.5.0rc2/testsuite/test-code-or1k'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `~/workspace/or_gnu_toolchain/or1ksim-0.5.0rc2/testsuite'
make: *** [check-recursive] Error 1
----


if i try to run the toolchain script the compilation aborts with the following messages:
----
ar: creating libgdb.a
ranlib libgdb.a
rm -f gdb
rm -f gdbtui
gcc -g -O2 -Wl,-rpath -Wl,/opt/or1ksim/lib -L/opt/or1ksim/lib \
-o gdbtui tui-main.o libgdb.a \
../sim/or32/libsim.a ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lncurses -lz -lm -lsim -lexpat ../libiberty/libiberty.a gnulib/libgnu.a
gcc -g -O2 -Wl,-rpath -Wl,/opt/or1ksim/lib -L/opt/or1ksim/lib \
-o gdb gdb.o libgdb.a \
../sim/or32/libsim.a ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lncurses -lz -lm -lsim -lexpat ../libiberty/libiberty.a gnulib/libgnu.a
gcc: ../sim/or32/libsim.a: No such file or directory
make[1]: *** [gdbtui] Error 1
make[1]: *** Waiting for unfinished jobs....
gcc: ../sim/or32/libsim.a: No such file or directory
make[1]: *** [gdb] Error 1
make[1]: Leaving directory `~/workspace/or_gnu_toolchain/gnu-src/bd-linux-gdb/gdb'
make: *** [all-gdb] Error 2
make (all-build all-sim all-gdb) failed.
----


then i manually copied the libsim.a from the builddir_or1ksim/.libs to gdb-7.2/sim/or32 but that didnt have any effect


what am i doing wrong?
RE: toolchain compilation problem with libsim.a
by jeremybennett on Dec 1, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019

Hi voodoosound

You cannot test Or1ksim until you have a tool chain, but you cannot build the tool chain until you have Or1ksim. So you have to build and install Or1ksim, then build and install the tool chain, then you can go back and test Or1ksim with make check. You will almost certainly need to configure Or1ksim a second time, to make sure it finds the compiler.

It is not entirely satisfactory. GDB is not really geared up to having external simulators with this sort of dependency. Long term it would be better to have GDB use a simulator based on CGEN by default.

HTH

Jeremy

RE: toolchain compilation problem with libsim.a
by voodoosound on Dec 1, 2011
voodoosound
Posts: 8
Joined: May 10, 2011
Last seen: Jun 11, 2014
That the test cases wont succed was my assumption too.

But my problem is, that gdb wont succed because it misses libsim.a. even though i compiled or1ksim (v0.4.0, v0.5.0rc2 and or1ksim_svn) first.
a manual copy from builddir didnt work eather...

What am i doing wrong?
RE: toolchain compilation problem with libsim.a
by jeremybennett on Dec 1, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019
That the test cases wont succed was my assumption too.

But my problem is, that gdb wont succed because it misses libsim.a. even though i compiled or1ksim (v0.4.0, v0.5.0rc2 and or1ksim_svn) first.
a manual copy from builddir didnt work eather...

What am i doing wrong?

Hi voodoosound,

You have to tell GDB configure where the Or1ksim library can be found. The bld-all.sh script has an option for this (default /opt/or1ksim-new). Of if you are working manually you can specify it using --with-or1ksim in the GDB configuration command.

HTH

Jeremy

RE: toolchain compilation problem with libsim.a
by voodoosound on Dec 1, 2011
voodoosound
Posts: 8
Joined: May 10, 2011
Last seen: Jun 11, 2014
Im stupid, that i didnt post the commands i have used...

in ~/workspace/or_gnu_toolchain/builddir_or1ksim:

../or1ksim-0.5.0rc2/configure --target=or32-elf --prefix=/opt/or1ksim5rc2
make all
sudo make install
export PATH=/opt/or1ksim5rc2/bin:$PATH


in ~/workspace/or_gnu_toolchain/gnu-src:

sudo nice -n -13
./bld-all.sh --force
--prefix ~/workspace/or_gnu_toolchain/openrisc
--or1ksim-dir /opt/or1ksim5rc2
--uclibc-dir uClibc
--linux-dir linux
--no-newlib
--no-or32-elf

with the option "--with-or1ksim" i get the output: unrecognized option "--with-or1ksim"

isnt "--or1ksim-dir" the option for the simulator?
RE: toolchain compilation problem with libsim.a
by jeremybennett on Dec 2, 2011
jeremybennett
Posts: 815
Joined: May 29, 2008
Last seen: Jun 13, 2019
Im stupid, that i didnt post the commands i have used...

in ~/workspace/or_gnu_toolchain/builddir_or1ksim:

../or1ksim-0.5.0rc2/configure --target=or32-elf --prefix=/opt/or1ksim5rc2
make all
sudo make install
export PATH=/opt/or1ksim5rc2/bin:$PATH


in ~/workspace/or_gnu_toolchain/gnu-src:

sudo nice -n -13
./bld-all.sh --force
--prefix ~/workspace/or_gnu_toolchain/openrisc
--or1ksim-dir /opt/or1ksim5rc2
--uclibc-dir uClibc
--linux-dir linux
--no-newlib
--no-or32-elf

with the option "--with-or1ksim" i get the output: unrecognized option "--with-or1ksim"

isnt "--or1ksim-dir" the option for the simulator?

Hi voodoosound,

I didn't make myself clear. You are correct --or1ksim-dir is the option for the script. --with-or1ksim is the option if you are manually configuring the individual tools yourself.

What is the result of ls /opt/or1ksim5rc2/lib?

You may find it quicker to use IRC (freenode.net, channel #opencores) to ask these questions.

HTH

Jeremy

RE: toolchain compilation problem with libsim.a
by voodoosound on Dec 5, 2011
voodoosound
Posts: 8
Joined: May 10, 2011
Last seen: Jun 11, 2014
The new toolchain compiled perfectly!!!

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