![]() ![]() |
Mar 16 2004, 11:44 AM
Post
#1
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
I'm trying to cross-compile just the basic Qtopia example. I followed the instructions for "Red Hat 9" and am able to get the qvfb x86 version working, but when I source the dev-arm-qpe.sh script, I can't do anything.
I try to build the Makefile using "tmake -o Makefile example.pro" and get the message: /usr/bin/perl: error while loading shared libraries: /opt/Qtopia/sharp/lib/libc.so.6: ELF file OS ABI invalid Even just doing an "ls" I get errors! ls: error while loading shared libraries: /opt/Qtopia/sharp/lib/libc.so.6: ELF file OS ABI invalid I'm sure it is a path problem, when I run the dev-x86-qpe.sh script, everything works just fine and my paths look like: echo $LD_LIBRARY_PATH /opt/Qtopia/lib:/usr/local/lib:/home/mcdoc/lib: echo $PATH /opt/Qtopia/bin:/opt/Qtopia/bin:/home/mcdoc/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/java/j2re1.4.2_02/bin:.:/opt/Embedix/tools/arm-linux/bin When I run the dev-arm-qpe.sh script my paths look like: echo $LD_LIBRARY_PATH /opt/Qtopia/sharp/lib:/usr/local/lib:/home/mcdoc/lib: echo $PATH /opt/Qtopia/sharp/bin:/opt/Qtopia/sharp/bin:/opt/Embedix/tools/arm-linux/bin:/home/mcdoc/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/java/j2re1.4.2_02/bin:. Am I seriously overlooking something??? Can anyone clue me in??? Thanks, Doc |
|
|
|
Mar 16 2004, 12:00 PM
Post
#2
|
|
|
Group: Members Posts: 70 Joined: 9-March 04 From: Albany, Oregon USA Member No.: 2,232 |
It sounds to me like your linker is only using the $LD_LIBRARY_PATH variable to find libraries, and the dev-arm script is overwriting this variable with a value that doesn't include your ordinary library directories. Try running this as root (without having run any of the dev- scripts):
# /sbin/ldconfig -v This will update /etc/ld.so.conf so the linker knows where your libraries are. This only needs to be done when you install any new libraries. Then $LD_LIBRARY_PATH just adds additional directories for the linker in specific situations. |
|
|
|
Mar 16 2004, 12:04 PM
Post
#3
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
That didn't seem to work, but it sounds like that is a starting point to look.
|
|
|
|
Mar 16 2004, 12:17 PM
Post
#4
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
Hi Doc,
You're not the 1st to have this problem. Welcome to the club. :-) There's a discussion here that should help you out: http://www.zaurususergroup.com/index.php?n...viewtopic&t=431 In a nutshell, the dev-arm-qpe.sh script has a bug in it. It sets LD_LIBRARY_PATH incorrectly, which then stops you from running commands in the shell. It shouldn't change LD_LIBRARY_PATH at all, so you could just comment out that line from the dev-arm-qpe.sh script. - Mark |
|
|
|
Mar 16 2004, 02:17 PM
Post
#5
|
|
|
Group: Members Posts: 4,515 Joined: 25-October 03 From: Bath, UK Member No.: 464 |
Hear hear to markb's post.
Where are people getting this file from? Someone should change it or inform whoever is hosting the file that it needs correction. Si |
|
|
|
Mar 16 2004, 02:47 PM
Post
#6
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
I can't remember where I got my setup scripts from.
But it could have been from this website. I just checked, and the script you get from the developer how-to is broken. :-( See this page: http://www.zaurususergroup.com/modules.php...ompiler%20Setup The link to the script is a bit hard to spot. See this line in section 2 (the file names are links): QUOTE Batch file #1, dev-x86-qpe.sh Batch file #2, dev-arm-qpe.sh The problem with the script has been mentioned before. I'm not sure who we speak to to get it fixed. (I guess I was lazy and just hoped a moderator would pick up on it and be able to sort it out). I have just submitted a file to the download area, with a request that it replaces the current version. - Mark |
|
|
|
Mar 16 2004, 03:33 PM
Post
#7
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
I'll try it asap, and post again tomorrow.
I was on the right track, and would have figured it out sooner or later, I was just going to try commenting out various differences in the arm vs. the x86 script and once I got a compile send it on down and try the executable. This will definitely save time. Doc |
|
|
|
Mar 17 2004, 05:25 AM
Post
#8
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
Ok, no go still. The script may be wrong but here is what I found...
If I comment out LD_LIBRARY_PATH in the dev-x86-qpe.sh script, it will compile but when I try to run it using ./example -qws it doesn't work...so I put it back in. If I comment out LD_LIBRARY_PATH in the dev-arm-qpe.sh script, it still gets link errors, but different ones... arm-linux-gcc -o example main.o example.o examplebase.o moc_example.o moc_examp lebase.o -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -lqpe -lqtopia -lqte /opt/Embedix/tools/arm-linux/bin/ld: warning: libuuid.so.1, needed by /opt/Qtopi a/sharp/lib/libqtopia.so, not found (try using -rpath or -rpath-link) /opt/Embedix/tools/arm-linux/bin/ld: warning: libjpeg.so.62, needed by /opt/Qtop ia/sharp/lib/libqte.so, not found (try using -rpath or -rpath-link) /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_read_scanlines' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_set_defaults' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_start_decompress' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_destroy_decompress ' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_std_error' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_CreateDecompress' /opt/Qtopia/sharp/lib/libqtopia.so: undefined reference to `uuid_generate' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_read_header' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_start_compress' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_destroy_compress' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_finish_decompress' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_resync_to_restart' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_CreateCompress' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_finish_compress' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_set_quality' /opt/Qtopia/sharp/lib/libqte.so: undefined reference to `jpeg_write_scanlines' collect2: ld returned 1 exit status make: *** [example] Error 1 My scripts now look like this: #!/bin/bash # dev-x86-qpe.sh script CROSSCOMPILE=/opt/Embedix/tools/arm-linux/bin:/opt/Embedix/tools/bin QPEDIR=/opt/Qtopia QTDIR=/opt/Qtopia PATH=${QTDIR}/bin:${QPEDIR}/bin:${PATH}:${CROSSCOMPILE} TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-x86-g++/ LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH} export QPEDIR QTDIR PATH TMAKEPATH LD_LIBRARY_PATH echo "Altered environment for Sharp Zaurus Development x86" #!/bin/bash # dev-arm-qpe.sh script CROSSCOMPILE=/opt/Embedix/tools/arm-linux/bin:/opt/Embedix/tools/bin QPEDIR=/opt/Qtopia/sharp QTDIR=/opt/Qtopia/sharp PATH=${QTDIR}/bin:${QPEDIR}/bin:${CROSSCOMPILE}:${PATH} TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++/ #LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH} export QPEDIR QTDIR PATH TMAKEPATH LD_LIBRARY_PATH echo "Altered environment for Sharp Zaurus Development ARM" Thanks again for your help guys! Doc |
|
|
|
Mar 17 2004, 06:26 AM
Post
#9
|
|
|
Group: Members Posts: 4,515 Joined: 25-October 03 From: Bath, UK Member No.: 464 |
So do you have libuuid.so.1 and libjpeg.so.62 in /opt/Embedix/tools/arm-linux/lib (the path's a guess)?
|
|
|
|
Mar 17 2004, 06:35 AM
Post
#10
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
yes/no
libuuid.so is in /opt/Qtopia/sharp/lib which is in the -L on the compile... /opt/Qtopia/sharp/lib/libuuid.sh -> libuuid.so.1.2 /opt/Qtopia/sharp/lib/libuuid.so.1 -> libuuid.so.1.2 /opt/Qtopia/sharp/lib/libuuid.so.1.2 Same with libjpeg... /opt/Qtopia/sharp/lib/libjpeg.so -> libjpeg.so.62 /opt/Qtopia/sharp/lib/libjpeg.so.62 How in the heck do you guys that actually cross-compile do it? |
|
|
|
Mar 17 2004, 07:21 AM
Post
#11
|
|
![]() Group: Members Posts: 191 Joined: 16-March 04 From: Indianapolis Member No.: 2,346 |
I should have paid more attention to:
http://www.zaurususergroup.com/index.php?n...viewtopic&t=431 Basically I got it to compile by commenting out the LD_LIBRARY_PATH in the dev-arm-qpe.sh script, and adding the following line to the example.pro file: TMAKE_LIBS = -luuid -ljpeg I didn't change the tmake.conf in either directory (x86 or arm) and it works with qt 1.7 right out of the tar file. Now...on to more interesting matters... Thanks again for your help. I wonder when Sharp is going to have their developers web back up again????? Doc |
|
|
|
Mar 17 2004, 09:43 AM
Post
#12
|
|
|
Group: Members Posts: 70 Joined: 9-March 04 From: Albany, Oregon USA Member No.: 2,232 |
You know, instead of just commenting out the LD_LIBRARY_PATH lines you can change them to append library paths to an existing LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/more/paths/to/libs:/yet/another/lib/path |
|
|
|
Mar 17 2004, 12:32 PM
Post
#13
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
The fixed env setup script dev-arm-qpe.sh has been put in the downloads section.
The fiile linked from the compiler setup how-to has been updated too. So hopeffully a few less people will be caught out by the LD_LIBRARY_PATH problem now. I don't know if we can get the tmake.conf file fixed so it includes the missing libraries. I think I got my QT sdk direct from Trolltech, and it had the problem. - Mark |
|
|
|
Mar 18 2004, 04:32 AM
Post
#14
|
|
|
Group: Members Posts: 4,515 Joined: 25-October 03 From: Bath, UK Member No.: 464 |
@blackcardinal: But LD_LIBRARY_PATH should never be changed for a cross compile. LD_LIBRARY_PATH is not a search path for the gcc linker but rather a search path for the dynamic library loader, and you certainly don't want to try to load any ARM libs on an x86 machine, etc.
Si |
|
|
|
Mar 18 2004, 07:48 PM
Post
#15
|
|
|
Group: Members Posts: 70 Joined: 9-March 04 From: Albany, Oregon USA Member No.: 2,232 |
lardman,
That's a very good point. Why would you need to change dynamic libraries for cross compiling? Sorry, I guess wasn't thinking very thoroughly here. I just saw there were library paths being changed and jumped to a conclusion. :oops: |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 04:28 PM |