Author Topic: Porting Applictions  (Read 11139 times)

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #15 on: December 17, 2005, 09:04:48 pm »
I decided to try using the cross-sdk method but i keep getting this error messege.

checking for SDL - version >= 1.0.1... no
*** Could not run SDL test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding SDL or finding the wrong
*** version of SDL. If it is not finding SDL, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location  Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH
configure: error: *** SDL version 1.0.1 not found!

Any ideas. The host system is a 1.2 ghz pentium running gentoo.
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Porting Applictions
« Reply #16 on: December 17, 2005, 09:19:28 pm »
it says it all

The program compiled but did not run.
because you are crosscompiling, the test program is compiled for arm, and did not run because it runs it on x86.

not all configure script are made or tested to behave correctly in the case of cross-compilation.

In this case I usually hack the configure script to bypass the test ( ie making it to return true all the time, if I know the answer)
SLC-860 cacko / senao wifi

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #17 on: December 17, 2005, 09:31:32 pm »
The newvox program had a --disable-sdltest function so i used that and it passed the ./configure. Now when i "make" i get this

if gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKA                                                         GE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"newvox\" -DVERSION=\"1.0\"                                                           -I. -I.     -g -O2 -I/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/inc                                                         lude/SDL -D_REENTRANT -MT newvox.o -MD -MP -MF ".deps/newvox.Tpo" \
  -c -o newvox.o `test -f 'newvox.c' || echo './'`newvox.c; \
then mv ".deps/newvox.Tpo" ".deps/newvox.Po"; \
else rm -f ".deps/newvox.Tpo"; exit 1; \
fi
gcc  -g -O2 -I/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/include/SD                                                         L -D_REENTRANT   -o newvox  newvox.o  -L/opt/cross/arm/3.3.6-sa1100-softvfp/arm-                                                         cacko-linux-gnu/lib -Wl,-rpath,/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-lin                                                         ux-gnu/lib -lSDL -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: s                                                         kipping incompatible /opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/lib                                                         /libSDL.so when searching for -lSDL
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: s                                                         kipping incompatible /opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/lib                                                         /libpthread.so when searching for -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: s                                                         kipping incompatible /opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/lib                                                         /libpthread.a when searching for -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: s                                                         kipping incompatible /opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/lib                                                         /libc.so.6 when searching for libc.so.6
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/../../../../i686-pc-linux-gnu/bin/ld: s                                                         kipping incompatible /opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/lib                                                         /libc_nonshared.a when searching for libc_nonshared.a

It compiles fine but wont execute on the zaurus i get an "cannot execute this binary" the permissions are set fine on it.

So far this whole experince has been extremly educational. I want to thank you pgas for all your help and patients.
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Porting Applictions
« Reply #18 on: December 18, 2005, 01:28:38 am »
thanks.

It seems that your compilation does not use the cross compiler.

did you run configure with  something like
Code: [Select]
LDFLAGS="-Wl,-rpath-link,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib" ./configure --host=armv5tel-cacko-linux --build=i686-linux --x-includes=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/include --x-libraries=/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib --disable-debug --prefix=/usr/local  
 replacing the path used by the one of your cross sdk?
 and replacing --host=armv5tel-cacko-linux by host=arm-cacko-linux (note that besides the path /opt/arm... in your sdk the X11R6/include might be just include)
SLC-860 cacko / senao wifi

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #19 on: December 18, 2005, 12:21:07 pm »
Heres my config and make output.

Code: [Select]
confused newvox-1.0 # LDFLAGS="-Wl,-rpath-link,/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux/lib" ./configure --host=arm-cacko-linux --build=i686-linux --x-includes=/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux/include --x-libraries=/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux/lib --disable-debug --prefix=/usr/local                  
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/root/newvox-1.0/missing: Unknown `--run' option
Try `/root/newvox-1.0/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-cacko-linux-strip... no
checking for strip... strip
checking for arm-cacko-linux-gcc... no
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.0.1... cross compiling; assumed OK...
yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands

confused newvox-1.0 # make
if gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"newvox\" -DVERSION=\"1.0\"  -I. -I.     -g -O2 -I/usr/include/SDL -D_REENTRANT -MT newvox.o -MD -MP -MF ".deps/newvox.Tpo" \
  -c -o newvox.o `test -f 'newvox.c' || echo './'`newvox.c; \
then mv ".deps/newvox.Tpo" ".deps/newvox.Po"; \
else rm -f ".deps/newvox.Tpo"; exit 1; \
fi
gcc  -g -O2 -I/usr/include/SDL -D_REENTRANT  -Wl,-rpath-link,/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux/lib -o newvox  newvox.o  -lSDL -lpthread
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Porting Applictions
« Reply #20 on: December 18, 2005, 12:55:44 pm »
is there no arm-cacko-linux-gcc in /opt/cross/arm/3.3.6-sa1100-softvfp/bin/ ?

do you run /opt/cross/arm/3.3.6-sa1100-softvfp/runsdk.sh before compiling?
SLC-860 cacko / senao wifi

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #21 on: December 18, 2005, 01:09:56 pm »
I did run runsdk.sh before hand. I dont have arm-cacko-linux-gcc but i do have g++, gcc, c++. Should i make a symbolic ling from gcc to arm-cacko-linux-gcc?
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #22 on: December 18, 2005, 08:40:52 pm »
Scratch that i was in /opt/cross/a/opt/cross/arm/3.3.6-sa1100-softvfp/arm-cacko-linux-gnu/bin/ instead of
 /opt/cross/arm/3.3.6-sa1100-softvfp/bin. SO yeah its there.
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Porting Applictions
« Reply #23 on: December 19, 2005, 03:03:28 am »
hmm, I guess I will have to download the cross sdk and try out to see If I can find what's wrong...

is it arm-cacko-linux-gnu or arm-cacko-linux ?

maybe you should pass --host=arm-cacko-linux-gnu ?
SLC-860 cacko / senao wifi

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #24 on: December 19, 2005, 11:11:27 am »
Ill give that a try and let ya know.
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone

VoiDeR

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Porting Applictions
« Reply #25 on: December 19, 2005, 11:34:18 am »
That was the problem. Everything works great now. Now its time to try and figure out the kernel stuff.

VoiDeR
Zaurus model: None looking to buy.
Location: Eastern Standard Time Zone