Disko Forum logo Login  |  Register  |  Lost Password
Problem cross compiling disko for ARM

nahsah
Posts: 24
graphgraph

Problem cross compiling disko for ARM 5 Years, 2 Months ago  
I have some problems getting disko to work for my ARM board.


Here is my setup:
Host OS: Debian Lenny
Cross Compiler: CodeSourcery arm-none-linux-gnueabi
Target Board: Mini2440 (http://www.friendlyarm.net/products/mini2440)
Disko: actual git repository


I successfully cross compiled all required libraries (alsalib, openssl, ...)
I was also able to cross compile the disko framework.
Here's how I build the disko framework:

Code:

scons prefix=/home/user/disko/build debug=true messages=true cross=true graphics=fbdev scons install
But now I'm getting errors when trying to build the tutorial applications 01 - 04. Below is the output when I run 'make' for firststeps application 01.
Code:

user@debian:~/disko/disko-tutorials/firststeps$ make check for disko version >= 1.1.1 make -C 01 all check for disko version >= 1.1.1 make[1]: Entering directory `/home/user/disko/disko-tutorials/firststeps/01' /home/user/CodeSourcery/bin/arm-none-linux-gnueabi-g++ -g -D__ENABLE_LOG__ -O0 -g -Wall -D__ENABLE_DEBUG__ -D__HAVE_FBDEV__ -D__HAVE_MMSMEDIA__ -D__HAVE_MIXER__ -D__ENABLE_SQLITE__ -D__HAVE_MMSCRYPT__ -I/home/user/disko/build/include/disko/ -I/home/user/curl/build/include -I/home/user/zlib/build/include -I/home/user/sqlite/build/include -I/home/user/openssl/build/include -I/home/user/libsigc++/build/include/sigc++-2.0 -I/home/user/libsigc++/build/lib/sigc++-2.0/include -I/home/user/libxml2/build/include/libxml2 -I/home/user/libpng/build/include/libpng12 -I/home/user/freetype/build/include/freetype2 -I/home/user/freetype/build/include -I/home/user/alsalib/build/include -I/home/user/alsalib/build/include/alsa main.cpp -L/home/user/disko/build/lib/disko -L/home/user/libsigc++/build/lib -L/home/user/curl/build/lib -L/home/user/zlib/build/lib -L/home/user/libxml2/build/lib -L/home/user/libpng/build/lib -L/home/user/freetype/build/lib -L/home/user/alsalib/build/lib -L/home/user/sqlite/build/lib -L/home/user/openssl/build/lib -lmmsinfo -lmmsconfig -lmmstools -lmmsgui -lmmsinput -lmmsbase -lmmscore -lmmsmedia -lxml2 -lcurl -lsigc-2.0 -lpng12 -lfreetype -lasound -lssl -lcrypto -ldl -lsqlite3 -Wl,-rpath=/home/user/disko/build/lib/disko -Wl,-rpath=/home/user/libsigc++/build/lib -Wl,-rpath=/home/user/curl/build/lib -Wl,-rpath=/home/user/zlib/build/lib -Wl,-rpath=/home/user/libxml2/build/lib -Wl,-rpath=/home/user/libpng/build/lib -Wl,-rpath=/home/user/freetype/build/lib -Wl,-rpath=/home/user/alsalib/build/lib -Wl,-rpath=/home/user/sqlite/build/lib -Wl,-rpath=/home/user/openssl/build/lib -o 01 /home/user/CodeSourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: 01: hidden symbol `__dso_handle' in /home/user/CodeSourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/crtbegin.o is referenced by DSO /home/user/CodeSourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/user/disko/disko-tutorials/firststeps/01' make: *** [all] Error 2

It seems to be a problem with __dso_handle.

I googled for a solution and also checked the forum but I can't find a solution. My suggestion is that building the shared libs of the disko framework is incorrect for my cross-compiling environment. Doing
Code:

file /home/user/disko/build/lib/disko/libmmsbase.so

results in
Code:

/home/user/disko/build/lib/disko/libmmsbase.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

This seems to be ok for me.

Doing
Code:

/home/user/CodeSourcery/bin/arm-none-linux-gnueabi-nm /home/user/disko/build/lib/disko/libmmsbase.so | grep __dso_handle

results in
Code:

U __dso_handle

-> __dso_handle of all disko libs are external references.

For all other cross-compiled libraries the same 'nm' command results in local definitions for __dso_handle (e.g.
Code:

000c573c d __dso_handle
for libasound.so)

Could this be the problem that linking fails? If yes, what can I do to tell disko to a local definition of __dso_handle. I found hints in google that building shared libraries should be done with 'gplusplus' (sorry, I'm unable to write correct positive signs in this forum ) instead of ld (http://rachid.koucha.free.fr/tech_corner/shared_libs_tests.html). How is disko built?
Any help would be greatly appreciated.

Btw: Please replace 'gplusplus' with $(CXX) in the git tree (git://diskohq.org/disko-tutorials.git) in all Makefiles of the firststeps tutorial applications 01-04. This was already done by 'mah' for the flash tutorial.
 
  The administrator has disabled public write access.
Problem cross compiling disko for ARM

nahsah
Posts: 24
graphgraph

Re:Problem cross compiling disko for ARM 5 Years, 2 Months ago  
Sorry for the ugly formatting. In the preview the post didn't look so bad.
 
  The administrator has disabled public write access.
Problem cross compiling disko for ARM

Matthias
Posts: 64
graphgraph

Gender: Male Disko Location: Berlin, Germany Birthdate: 1979-04-25
Re:Problem cross compiling disko for ARM 5 Years, 2 Months ago  
Hi nahsah,

we stumbled across this problem some time ago (look here).
As you correctly guessed this can be solved by using g++ for linking.

As we are using LD from the environment, you can set it to the value of your cross-compiler.

Best regards,
Matthias
 
  The administrator has disabled public write access.
Problem cross compiling disko for ARM

nahsah
Posts: 24
graphgraph

Re:Problem cross compiling disko for ARM 5 Years, 2 Months ago  
Hi Matthias

Thanks for the fast reply. I will try building with LD later today.

Have you noticed my bug fix request for the firststeps tutorial applications?
Please replace
g++ -g $(DISKO_INC) main.cpp $(DISKO_LIBS) -o main
with
$(CXX) -g $(DISKO_INC) main.cpp $(DISKO_LIBS) -o main
in all Makefile of firststeps/01 - 04.
This was already fixed for the tutorials/flash makefile but not for the firststeps.

Thanks for your help again.

Regards
Nahsah
 
  The administrator has disabled public write access.
Problem cross compiling disko for ARM

René
Admin
Posts: 11
graphgraph

Re:Problem cross compiling disko for ARM 5 Years, 2 Months ago  
Hi nahsah,

I fixed the Makefiles. Thanks for your request

Best regards,
René
 
  The administrator has disabled public write access.
Powered by FireBoard
get the latest posts directly to your desktop