OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: nianderson on July 19, 2004, 09:57:19 am

Title: help with sdk
Post by: nianderson on July 19, 2004, 09:57:19 am
Im trying to get the sdk installed so i can start compiling and testing some apps on the z.
problem is it appears it dosnt want to work for me
I extract to /opt run the sh file then move over to the newvox test source and compiling get this output

Code: [Select]
newvox  newvox.o  -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/lib -lSDL -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so when searching for -lSDL
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libpthread.so when searching for -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libpthread.a when searching for -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libc.so.6 when searching for libc.so.6
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libc_nonshared.a when searching for libc_nonshared.a

then move the bin over to my Z and it cant run the binary obviously.

side note: anyone have an ipk of xkeymouse
Title: help with sdk
Post by: lardman on July 19, 2004, 10:34:15 am
Did you source a script somewhere to set the PATH and various other env-vars (it used to be in /opt/arm/3.3.2/ I think)? It looks like you either didn't do this, or it didn't work.


Si
Title: help with sdk
Post by: nianderson on July 19, 2004, 10:45:58 am
runzgcc.sh is what i ran and tried to compile with those enviorn vars set.

Code: [Select]
#!/bin/sh

export BASEDIR=/opt/arm/3.3.2

export X11DIR=$BASEDIR/armv5tel-cacko-linux/X11R6
export X11INC=$X11DIR/include
export X11LIB=$X11DIR/lib

export QTDIR=$BASEDIR/armv5tel-cacko-linux/qt
#export QMAKEDIR=$QTDIR/mkspecs
#export QMAKESPEC=linux-arm-g++
export PATH=$BASEDIR/bin:$QTDIR/bin:$X11DIR/bin:$PATH
export LD_LIBRARY_PATH=$BASEDIR/lib

export PKG_CONFIG_PATH=$BASEDIR/armv5tel-cacko-linux/lib/pkgconfig:$X11LIB/pkgconfig:$QTDIR/lib/pkgconfig

echo "pdaXrom cross developer tools v0.5"
echo "Type 'exit' for leave shell."
echo
echo

/bin/sh
Title: help with sdk
Post by: jabbath on July 19, 2004, 11:09:52 am
Hi!
I don't know, how you started compiling...
If you used "make", do "LD=armv5tel-cacko-linux-gcc make" instead and it should compile fine.

grusz, jabbath
Title: help with sdk
Post by: nianderson on July 19, 2004, 11:52:47 am
LD=armv5tel-cacko-linux-gcc make

gave the same output?

i must be doing something wrong.
Title: help with sdk
Post by: jabbath on July 19, 2004, 12:16:06 pm
Could you write, what you did (step by step)?

Another possibility is, to edit the Makefile.. And to be sure, the binary is available, do the following:
Open the makefile in an editor.
Search for LD=
if the LD variable isn't set, add the following line:
LD=/opt/arm/3.3.2/armv5tel-cacko-linux/bin/gcc

then start compiling again, by doing "make"

If that doesn't work, please show me, what you've done excactly

grusz, jabbath
Title: help with sdk
Post by: lardman on July 19, 2004, 12:45:25 pm
Quote
LD=armv5tel-cacko-linux-gcc make

What about:

LD=armv5tel-cacko-linux-ld make

???


Si
Title: help with sdk
Post by: jabbath on July 19, 2004, 12:47:18 pm
That should do the same as setting LD to gcc.
The problem is, that at the moment LD seems to be set as
/usr/i686-pc-linux-gnu/bin/ld

jabbath
Title: help with sdk
Post by: nianderson on July 19, 2004, 01:07:14 pm
It looks like the script thats supposed to set the enviorn vars isnt working?
its using my gcc and make.conf settings i guess.
 exactly what i did
Code: [Select]
cd /opt
wget http://cacko.spy.org/downloads/pdaXrom-sdk-1.0.5.tar.bz2
tar jxf pdaXrom-sdk-1.0.5.tar.bz2
rm pdaXrom-sdk-1.0.5.tar.bz2
cd arm/3.3.2/
./runzgcc.sh
cd ~/
wget http://www.pdaxrom.org/downloads/misc/newvox-1.0.tar.gz
tar zxsfv newvox-1.0.tar.gz
rm newvox-1.0.tar.gz
cd newvox-1.0
//HERE IS MAKE PART
//I used the configure command from the tutorial
./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
//all on one line of course
//then make
make
scp newvox root@ip:/root
//switch over to z
./newvox
//returns
cannot execute binary file
Title: help with sdk
Post by: jabbath on July 19, 2004, 01:12:36 pm
What's the output of doing "file newvox"  on your PC?

jabbath
Title: help with sdk
Post by: nianderson on July 19, 2004, 01:14:52 pm
also adding that path to the make file just created an error when i ran make

Code: [Select]
ipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libc_nonshared.a when searching for libc_nonshared.a
make: *** [newvox] Error 1
Title: help with sdk
Post by: jabbath on July 19, 2004, 01:15:56 pm
Could you join #cacko on irc.freenode.net ?

thanks, jabbath
Title: help with sdk
Post by: nianderson on July 19, 2004, 01:16:32 pm
Code: [Select]
file newvox

newvox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), not stripped
Title: help with sdk
Post by: nianderson on July 19, 2004, 07:45:29 pm
jabbath sorry about that earlier today Supervisor came breathing down my neck and had to end that shell. i tried those scripts copied over the file still dosnt run.
file output is same as above post. any more ideas why cross compiling isnt wanting to work out.
Title: help with sdk
Post by: jabbath on July 19, 2004, 09:00:57 pm
Do the following
Code: [Select]
# cd /opt
# rm -r arm
# wget http://cacko.spy.org/downloads/pdaXrom-sdk-1.0.5.tar.bz2
# tar xjvf pdaXrom-sdk-1.0.5.tar.bz2
# wget http://zaurus.spy.org/feeds/jabbath/pdaXrom
# mv pdaXrom /usr/local/bin;chmod +x /usr/local/bin/pdaXrom
# cd ~
# wget http://www.pdaxrom.org/downloads/misc/newvox-1.0.tar.gz
# tar xzvf newvox-1.0.tar.gz
# cd newvox-1.0
# wget http://zaurus.spy.org/feeds/jabbath/script
# reset;pdaXrom
Now your shell shoud look like this:
Code: [Select]
pdaXrom cross developer tools v0.5
Type 'exit' for leave shell.


sh-2.05b$
If it looks like this, do
Code: [Select]
# sh script
# make

If it doesn't look like this, look at the pdaXrom script (/usr/local/bin/pdaXrom) and copy the exports into the script file, then run "sh script&&make"

grusz, jabbath
Title: help with sdk
Post by: nianderson on July 19, 2004, 09:08:20 pm
Yeah i did that it changed my shell but i still get
Code: [Select]
sh-2.05b# make
if gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"newvox\" -DVERSION=\"1.0\"  -I. -I.     -g -O2 -I/opt/arm/3.3.2/armv5tel-cacko-linux/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/opt/arm/3.3.2/armv5tel-cacko-linux/include/SDL -D_REENTRANT  -Wl,-rpath-link,/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib -o newvox  newvox.o  -L/opt/arm/3.3.2/armv5tel-cacko-linux/lib -Wl,-rpath,/opt/arm/3.3.2/armv5tel-cacko-linux/lib -lSDL -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so when searching for -lSDL
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libpthread.so when searching for -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libpthread.a when searching for -lpthread
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libc.so.6 when searching for libc.so.6
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: skipping incompatible /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libc_nonshared.a when searching for libc_nonshared.a
Title: help with sdk
Post by: lardman on July 20, 2004, 06:31:26 am
Try running 'export' and see what PATH says.

Then, assuming it has worked okay, you need to look at which path the shell script is trying to put on the front. For my toolchain I set various env vars:

CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-g++
G77=arm-linux-g77
F77=arm-linux-g77
PATH=/usr/local/arm/3.3.2/bin:/usr/local/arm/3.3.2/arm-linux/bin:$PATH

Now I've also added /usr/local/arm/3.3.2/arm-linux/bin which contains (for example) a file called gcc which is linked to ../../bin/arm-linux-gcc and the same for the rest. This means that even if the compiler just tries to call gcc, it'll get the cross toolchain version.

It looks like your script only adds the one containing the commands with prefixes (like arm-linux-gcc, etc.) to the path, this means that when make tries to call gcc, it'll get your default version.

Therefore, either edit the script to add the extra bin directory, or set the CC, CXX, etc. env vars in the script (and they will/should be picked up in the configure and Makefile scripts).

Regards,


Simon
Title: help with sdk
Post by: jabbath on July 20, 2004, 10:02:52 am
Hi  
lardman:
We solved the problem over irc.
The configure script didn't work right, so the Makefile had to be edited
GCC = armv5tel-cacko-linux-gcc
instead of
GCC = gcc
and
LDFLAGS = [...] -L/usr/X11R6/lib [...]
replaced, by
LDFLAGS = [...] -L/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib [...]

i think, that was all... have been a bit dizzy yesterday... (solved the problem at about 2am)

jabbath
Title: help with sdk
Post by: fabianE on August 26, 2004, 04:57:30 pm
Hello,

I also tried to get the sdk 1.05 newvox sample to compile.

I got the same error as mentioned in this thread and then changed the CC to your suggestion. Now I have a new error:

/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libX11.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/opt/arm/3.3.2/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libXext.so.6, needed by /opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMProtocols'
/opt/arm/3.3.2/armv5tel-cacko-linux/lib/libSDL.so: undefined reference to `XSetWMIconName'
and more undefined references.

My LDFLAGS was empty, adding the LDFLAGS = [...] -L/opt/arm/3.3.2/armv5tel-cacko-linux/X11R6/lib [...] didn't help.

Any ideas?

With best regards,

Fabian