![]() ![]() |
Nov 24 2003, 07:23 AM
Post
#1
|
|
|
Group: Members Posts: 2 Joined: 23-November 03 Member No.: 986 |
Hello
I have tryed out http://doc.trolltech.com/qtopia1.7/html/start.html (the qtopia start guide). But after tmake -o Makefile example.pro (for the PDA), i get an error: /usr/bin/perl: error while loading shared libraries: /opt/Qtopia/sharp/lib/libc.so.6: ELF file OS ABI invalid . Could you help me? Please, mabye it`s a newby question, but I`am a newby and have to start somewhere. Bye the way does Opie have the possibility of autostarting applications? |
|
|
|
Feb 12 2004, 12:25 AM
Post
#2
|
|
|
Group: Members Posts: 3 Joined: 11-February 04 Member No.: 1,806 |
I tried my first cross compile last evening on a RedHat 9.0 desktop using this page's notes:
http://www.zaurususergroup.com/modules.php...ompiler%20Setup I used the latest TrollTech binaries distribution: - Qtopia 1.7.0 GPL SDK Linux for Red Hat 9 Installed the RPM, which includes tmake. (Note, if you install this RPM, don't copy the tmake.conf file as indicated in step 1 of the How-To. The Qtopia package is configured to work witth the RedHat 9 gcc installation as is.) I had a similar error message from Perl when I tried to compile. I then realized that /usr/bin/perl requires the *desktop* libc.so.6 file to run. (Actually, so did "ls" and every other command I tried to run on the command line!) It was trying to reference the ARM compiled libc.so.6 as your message indicates. After sourcing the arm dev setup script in section 3, step 4 of the ARM compile, I set the following variable on the command line: LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH} This gave me back my basic command line commands and allowed me to compile example.pro without problems. Transfered this wirelessly to my SL-5600 and started it on the command line as per the instructions. Worked like a charm! I can't say for sure if this is the best idea in general because I don't know if the library search order will pick something out of here first instead of the Qtopia area for the final arm binary. Bit of a chicken and egg problem. Perhaps using dynamically linked binaries solves this by having an equivalent path to libc.so.6 on the Z? Just a guess. Don't know about OPIE. I'm using the Sharp 3.1 ROM on the SL-5600. Happy compiling! |
|
|
|
Feb 12 2004, 02:01 AM
Post
#3
|
|
|
Group: Members Posts: 1,497 Joined: 12-November 03 From: Germany Member No.: 907 |
QUOTE /usr/bin/perl: error while loading shared libraries: /opt/Qtopia/sharp/lib/libc.so.6: ELF file OS ABI invalid . Stay away vom scripts tinkering with LD_LIBRARY_PATH. The people who invented those didn't understand about cross compiling. Changing the LD_LIBRARY_PATH is _neither_ necessary _nor_ effective when cross compiling. QUOTE Bye the way does Opie have the possibility of autostarting applications? Yes (of course |
|
|
|
Feb 29 2004, 11:42 AM
Post
#4
|
|
|
Group: Members Posts: 33 Joined: 28-February 04 Member No.: 2,078 |
I am using Fedora1 core, which I guess is similar toRedhat9 , following jay's post above I have compiled and run the x86 qtopia environment and examplpe application successfully. I get the same problem jay had when I tried it for the ARM develeopment enviroment. I tried jay's suggestion by typing this at the shell prompt.:
LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH} But this did not change anything, and I still have the same problem running any command such as "ls" etc.... I am not great at Linux, but I can follow directiosn pretty good! Anyone have a suggestion to try? Yhankx John |
|
|
|
Feb 29 2004, 01:50 PM
Post
#5
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
I just tried cross-compiling and hit the same problems.
I tried putting /usr/lib at the start of my LD_LIBRARY_PATH but that didn't help much. So I went to another shell, and did "ldd /bin/ls" to find out where it usually finds the libraries. CODE [mark@dhcp-205-216491 application]$ ldd /bin/ls
libtermcap.so.2 => /lib/libtermcap.so.2 (0x40014000) libacl.so.1 => /lib/libacl.so.1 (0x40019000) libc.so.6 => /lib/i686/libc.so.6 (0x42000000) libattr.so.1 => /lib/libattr.so.1 (0x4001f000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ So I added /lib at the start of my LD_LIBRARY_PATH and that fixed the problem. CODE [mark@dhcp-205-216491 application]$ echo $LD_LIBRARY_PATH
/lib:/usr/lib:/usr/X11R6/lib:/usr/X11R6/lib/modules:/opt/Qtopia/sharp/lib [mark@dhcp-205-216491 application]$ Now I can use normal shell commands and do the make. The example app (/opt/Qtopia/examples/application) compiles OK, but won't link. Has anybody come across these errors before: CODE [mark@dhcp-205-216491 application]$ make
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/ Qtopia/sharp/include -o main.o main.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/ Qtopia/sharp/include -o example.o example.cpp /opt/Qtopia/sharp/bin/uic examplebase.ui -i examplebase.h -o examplebase.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/ Qtopia/sharp/include -o examplebase.o examplebase.cpp /opt/Qtopia/sharp/bin/moc example.h -o moc_example.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/ Qtopia/sharp/include -o moc_example.o moc_example.cpp /opt/Qtopia/sharp/bin/moc examplebase.h -o moc_examplebase.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/ Qtopia/sharp/include -o moc_examplebase.o moc_examplebase.cpp arm-linux-gcc -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -lqpe -l qtopia -lqte /opt/Embedix/tools/arm-linux/bin/ld: warning: libuuid.so.1, needed by /opt/Qtopia/sharp/lib/libqtopia.so, not found (try using -rpath or -rpath-li nk) /opt/Embedix/tools/arm-linux/bin/ld: warning: libjpeg.so.62, needed by /opt/Qtopia/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 Any help would be greatly appreciated. If I fiind a solution myself I'll post it here. - markb [/code] |
|
|
|
Feb 29 2004, 02:04 PM
Post
#6
|
|
|
Group: Posts: 0 Joined: -- Member No.: 0 |
I get the exact same problem, while compilling snes9x/SDL.
I'm looking into it at the moment, if I find a solution I'll post. If anyone else knows what it's due to Ill greatly apreciate the answer... |
|
|
|
Feb 29 2004, 02:19 PM
Post
#7
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
I've found a partial answer.
If I copy and paste the liine that does the linking and add two missing libraries (uuid and jpeg) then it works OK. CODE [mark@dhcp-205-216491 application]$
[mark@dhcp-205-216491 application]$ arm-linux-gcc -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -lqpe -lqtopia -lqte -luuid -ljpeg So that works, but I can't work out why those libraries don't get put in the makefile automatically. I tried recreating the Makefile and it didn't make any difference. So I have a workaround but not a proper solution. Anyone got any ideas? - markb [/code] |
|
|
|
Feb 29 2004, 02:47 PM
Post
#8
|
|
|
Group: Posts: 0 Joined: -- Member No.: 0 |
OK markb.....you solved my original question.... I also added the /usr/lib and /lib to the LD_LIBRARY_PATH and I am progressin g to the same point you are with the missing uuid and jpeg libraryies. My output looks exactly like yours. I hope you all figure out the next step!!
Sorry I can't help with a solution, but I appreciate you knowledgeable people sharing your insite with us new linux users. (Fedora Core 1) JDF |
|
|
|
Feb 29 2004, 03:16 PM
Post
#9
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
I now how have a full solution.
It works for me, but I can't guarantee this is the *RIGHT* way to do it. Look at your environment and see what $TMAKEPATH is set to. That tells you where tmake picks up the tmake.conf file. You can then edit that file and add the missing libraries. (You'll need to be root to edit the file) Then you need to run tmake again to recreate your makefile. I edit tmake.conf and change this line: CODE TMAKE_LIBS = -ljpeg -luuid
I don't know if that's the best line to change but it works. CODE [mark@dhcp-205-216491 application]$
[mark@dhcp-205-216491 application]$ echo $TMAKEPATH /opt/Qtopia/tmake/lib/qws/linux-sharp-g++/ [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ cd /opt/Qtopia/tmake/lib/qws/linux-sharp-g++/ [mark@dhcp-205-216491 linux-sharp-g++]$ [mark@dhcp-205-216491 linux-sharp-g++]$ ls -ltr total 16 -r--r--r-- 1 root root 76 Sep 20 2002 subdirs.t -r--r--r-- 1 root root 72 Sep 20 2002 lib.t -r--r--r-- 1 root root 72 Sep 20 2002 app.t -r--r--r-- 1 root root 1813 Feb 29 22:59 tmake.conf [mark@dhcp-205-216491 linux-sharp-g++]$ [mark@dhcp-205-216491 linux-sharp-g++]$ [mark@dhcp-205-216491 linux-sharp-g++]$ vi tmake.conf [mark@dhcp-205-216491 linux-sharp-g++]$ [mark@dhcp-205-216491 linux-sharp-g++]$ cd ~/dev/z [mark@dhcp-205-216491 z]$ [mark@dhcp-205-216491 z]$ cd application [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ rm Makefile [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ tmake -o Makefile example.pro [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ make clean rm -f main.o example.o examplebase.o moc_example.o moc_examplebase.o moc_example.cpp moc_examplebase.cpp examplebase.cpp examplebase.h example rm -f *~ core [mark@dhcp-205-216491 application]$ [mark@dhcp-205-216491 application]$ make /opt/Qtopia/sharp/bin/uic examplebase.ui -o ./examplebase.h arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o main.o main.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o example.o example.cpp /opt/Qtopia/sharp/bin/uic examplebase.ui -i examplebase.h -o examplebase.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o examplebase.o examplebase.cpp /opt/Qtopia/sharp/bin/moc example.h -o moc_example.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o moc_example.o moc_example.cpp /opt/Qtopia/sharp/bin/moc examplebase.h -o moc_examplebase.cpp arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o moc_examplebase.o moc_examplebase.cpp arm-linux-gcc -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -ljpeg -luuid -lqpe -lqtopia -lqte [mark@dhcp-205-216491 application]$ I hope that helps. - markb |
|
|
|
Mar 1 2004, 07:20 AM
Post
#10
|
|
|
Group: Members Posts: 33 Joined: 28-February 04 Member No.: 2,078 |
OK! markb...you are the man! by changing that tmake.conf everything works great for me. I'd appreciate if you can help with the next step or direct me to a link that would help.
Here's what is working fine right now on my Fedora Core Linux: 1) in the x86 environment, compile make example 2) load the frame buffer and run the example successfully 3) switch to ARM environment 4) compile and link and produce "example" executable for arm with no errors. Now, not sure if I have to make an ipk, but I just copied the "example" to my Zaurus 5500 and went to a shell using "terminal". I then try to run "example" from the command line on Zaurus. It starts and then indicates that it cannot find several libraries for QT. My next step would be to make an ipk, but I haven't read everything yet about ipk. I really was hoping I could get a quick test from the Zaurus command line. Any thoughts? |
|
|
|
Mar 1 2004, 11:57 AM
Post
#11
|
|
|
Group: Members Posts: 54 Joined: 28-February 04 From: Birmingham, UK Member No.: 2,080 |
Happy to hear things are working for you!
It's been a while since I've actually tried running anything on the zaurus itself. But I blew the dust off my old 5000D and gave it a try. I got the same problem as you. I thought a quick fix would be to set the LD_LIBRARY_PATH on the zaurus, but that didn't work. I had a look around and couldn't find that missing library anywhere on the Zaurus. It turns out that you don't actually need it! I recompiled the example application and missed off that library. It still compiled and linked OK. And it now runs on the Zaurus. So all you need to do is change your tmake.conf file again, and take out the bit that specifies "-lqtopia". I just left it blank: CODE TMAKE_LIBS_QTOPIA =
If you do a "make clean" and use tmake to regenerate your Makefile, it should all build properly, and run on the Zaurus. When I did some Z development ages ago I don't remember needing to tweak things so much. It all seemed to work first time. I wonder if anyone tested these things? Or maybe it's just us two that are having these problems? :-) Let me know how you get on. - Mark p.s. You said several libraries weren't found. It only mentioned one when I tried it. If you still have problems could you let me know what the other libraries are. Thanks. |
|
|
|
Mar 1 2004, 12:28 PM
Post
#12
|
|
|
Group: Members Posts: 33 Joined: 28-February 04 Member No.: 2,078 |
markb,
Great I'll try it when I get home tonight. I really appreciate you walking me through these problems. I'd be dead in the water due to my lack of experience and knowledge right now. Thankx a lot. Once it does all work I'll put a HOW TO based on my Fedora Core and your tweaks and share it. jdf |
|
|
|
Mar 1 2004, 02:50 PM
Post
#13
|
|
|
Group: Members Posts: 33 Joined: 28-February 04 Member No.: 2,078 |
Success!
Next step: my first ipk and then trying a development environment Thankx markb JDF |
|
|
|
Mar 1 2004, 06:34 PM
Post
#14
|
|
|
Group: Members Posts: 33 Joined: 28-February 04 Member No.: 2,078 |
the directions for making the ipk worked as written. I was able to make it and install on the 5500. I am now off to try an make my own progs.
I did have one problem: I couldn't find ipkg-build.sh But I found it here. Looks like an old mirror of all the Zaurus docs. I tried finding them on ZUG, but no success. http://ossh.com/zaurus/mirrors/docs.zaurus...downloads.shtml Thankx mark for all you help!! Hopefully I can develop something intersting! John |
|
|
|
Mar 1 2004, 11:55 PM
Post
#15
|
|
|
Group: Members Posts: 3 Joined: 11-February 04 Member No.: 1,806 |
Hi All,
Been travelling a bit. Looks like a lot of progress has been made. Just wanted to make two clarifications. First, in my original posting, the LD_LIBRARY_PATH should indeed be set to /lib, not /usr/lib. Sorry for the mistake. Also, I ended up just adding "-ljpeg -luuid" to the generated Makefile under the $(LIBS) section, but adding it to TMAKE_LIBS looks like a more consistant solution. You guys have inspired me to try and compile some more things! Congratulations on getting it all to work. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 11:07 PM |