Author Topic: Qtpoia SDK problems  (Read 29653 times)

lexus

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://
Qtpoia SDK problems
« on: November 24, 2003, 10:23:06 am »
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?    

jay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #1 on: February 12, 2004, 03:25:47 am »
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!

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Qtpoia SDK problems
« Reply #2 on: February 12, 2004, 05:01:41 am »
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  ) - see the Opie-Today application for an example of how to register with the launcher to become an autostart application.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

jdf

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #3 on: February 29, 2004, 02:42:25 pm »
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
JDF
SL-5500; CF MODEM; CF Wireless; CF & SD Storage;
Fedora CORE 1; WinXP

markb

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #4 on: February 29, 2004, 04:50:47 pm »
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: [Select]
[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: [Select]
[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: [Select]
[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]

Anonymous

  • Guest
Qtpoia SDK problems
« Reply #5 on: February 29, 2004, 05:04:29 pm »
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...

markb

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #6 on: February 29, 2004, 05:19:11 pm »
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: [Select]
[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]

Anonymous

  • Guest
Qtpoia SDK problems
« Reply #7 on: February 29, 2004, 05:47:22 pm »
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

markb

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #8 on: February 29, 2004, 06:16:16 pm »
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: [Select]
TMAKE_LIBS              = -ljpeg -luuid

I don\'t know if that\'s the best line to change but it works.

Code: [Select]
[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

jdf

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #9 on: March 01, 2004, 10:20:34 am »
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?
JDF
SL-5500; CF MODEM; CF Wireless; CF & SD Storage;
Fedora CORE 1; WinXP

markb

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #10 on: March 01, 2004, 02:57:01 pm »
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: [Select]
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.

jdf

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #11 on: March 01, 2004, 03:28:51 pm »
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
JDF
SL-5500; CF MODEM; CF Wireless; CF & SD Storage;
Fedora CORE 1; WinXP

jdf

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #12 on: March 01, 2004, 05:50:16 pm »
Success!
Next step: my first ipk and then trying a development environment
Thankx markb
JDF
JDF
SL-5500; CF MODEM; CF Wireless; CF & SD Storage;
Fedora CORE 1; WinXP

jdf

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #13 on: March 01, 2004, 09:34:13 pm »
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
JDF
SL-5500; CF MODEM; CF Wireless; CF & SD Storage;
Fedora CORE 1; WinXP

jay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • http://
Qtpoia SDK problems
« Reply #14 on: March 02, 2004, 02:55:26 am »
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.