Author Topic: How Do I Compile Libqpe.a  (Read 5068 times)

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
How Do I Compile Libqpe.a
« on: November 28, 2004, 02:25:42 am »
I followed the readme.html in the qtopia source but it only created libqte.a.  I also need libqpe.

Thanks.
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
How Do I Compile Libqpe.a
« Reply #1 on: December 03, 2004, 11:01:14 am »
You need to build both qt-embedded 2.3.7 and qtopia free 1.7.

OH btw you need to patch qt-embedded to get it built with gcc 3.4, OE carries this patch.

I followed your instructions, got crosstool, man that makes things easier (unfortunately I had a duff host GCC that kept segfaulting ) finally built qte, qpe, libSDL (from ZPorts) ... all static, built quake and got a nice 4MB (AND THATS STRIPPED) binary.

It runs as long as I don't zoom it. If I run the script from the command line I get it rotated in the middle of my screen and I can say I am getting ~14fps. Unfortunately when I try it zoomed at the moment I only get the left 2/3 of the screen painted and the executable dumps a sigsegv.
« Last Edit: December 03, 2004, 11:02:03 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
How Do I Compile Libqpe.a
« Reply #2 on: December 03, 2004, 10:55:00 pm »
Hey, thats great!  Can you give me the link to the OE patch to qt ?

Thanks.

On a side note, I was able to compile mplayer statically with soft float.  Dont know what the benefits are though.  I am hoping that it will be faster.
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
How Do I Compile Libqpe.a
« Reply #3 on: December 04, 2004, 08:28:44 am »
It's part of the OE build, to save you having to build an OE environment here's the patch.

Sorry, had to uuencode it to post it.
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
How Do I Compile Libqpe.a
« Reply #4 on: December 05, 2004, 01:18:36 pm »
Thanks again.  qt-embedded now compiles cleanly with gcc-3.4.2.

However  I am running into problems compileing qpe.  I have edited the config file for linux-sharp-g++-static for both qt-embedded and qtopia-free in which I included the -msoft-float  and -fpermissive option.

Some libraries dont seem to get built for  qpe.

My configure options for qt-embedded:

./configure -qconfig qpe -qvfb -depths 4,8,16,32 -platform linux-x86-g++ -xplatform linux-sharp-g++   -static

My configure options for qtopia-free:

./configure -xplatform linux-sharp-g++ -static

->none of the supported applications want to compile
->the supported games need -lm added to compile
->needed to compile e2fsprogs for uuid
->atd will not compile


I built an xscale toolchain  and quake now runs at 21.5 fps instead of 18.8 but still outside qtopia.

Can you share your configure options for qtopia-embedded and qtopia-free?

Thanks.
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
How Do I Compile Libqpe.a
« Reply #5 on: December 05, 2004, 01:50:26 pm »
Ah, yes, forgot to mention that uuid was needed from e2fsprogs.

Well you got there anyway.

I think the compiler options match what I did, however, the documents suggest building QT X11 stuff. I just copied moc from /opt/Qtopia/bin to the qt-embedded bin directory.

What you won't get to fully compile when building with -static are things like QLibraryPrivate::loadLibrary since ld.so stuff isn't built (if you did the same as me and only built the static libraries in the toolchain) so it's possible that quite a lot of the default stuff won't build because it uses some of these classes to load plugins etc.

It does, however, seem to produce a perfectly useable libqpe.a

I think the -lm bits needed to use libm.a are often built into the SPECS of the toolchain so you don't need to include -lm for the maths.h stuff to work. Unfortunately I think the crosstool stuff misses this so yes you will have to specify -lm.

I think you are just about there.

Incidentally, I think you are going to run into the libSDL issue that I have hit next.

It seems that there may be a bug in the qtopia stuff in libSDL which isn't addressed in any of the patched versions. I have posted a query on this on the zports Developer forum on sourceforge as follows (although I have also tried libSDL 1.25 and libSDL 1.27 unpatched - with the same result).

Screen region initialises incorrectly
Using the current CVS of libSDL, and repro this with the prebuilt binaries, however, the error turns fatal in my project.
 
 To see this error start an application such as PRBOOM in an unzoomed mode on an SL-C860, you will note that instead of the whole screen being blanked to black only approximately 2/3 is blanked. In fact the blanking only effects the left 480 pixels.
 
 It seems that there is something related to the rotation stuff that doesn't rotate to blanking routine correctly (can't find it yet). My particular project is a statically linked quake with a softfloat library. I have built the toolchain for GCC 3.4.2, GLIBC 2.3.3, QTE 2.3.7, Qtopia Free 1.7.0 and zports libSDL all for static linking to suit a sharp ROM.
 
 I can happily build the quake binary which runs perfectly unzoomed, rotated to 90deg, with the right 160 pixels uninitialised (rest of the screen blanks correctly). As soon as I run in zoomed mode 320x240 I get the left 240 pixels painted correctly with the right 80 pixels blanked (actually to white, not initialised) and the application segfaults.
 
 I think for some reason when running with standard shared libraries using GCC 2.95 the error is generally less fatal and allows apps to run un-noticed.
 
 As I say you can repro this with the steps earlier in this posting without having to do anything extravagant. I have a feeling that it may just be the code that blanks the screen to black. I have had a trawl through SDL_sysvideo.cc and SDL_QWin.cc but japanese comments in the files don't help me much.
 
 Any pointers ?



...so if _Psycho or mtiera are listening, do you guys have any suggestions ?

- Andy
« Last Edit: December 05, 2004, 01:51:51 pm by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
How Do I Compile Libqpe.a
« Reply #6 on: December 05, 2004, 05:04:36 pm »
I was able to finally compile a quake binary with qtopia support.  Thanks for your help.

As expected, it is running slower in qtopia.   However since I am using an xscale toolchain, it runs at 18.4 fps.

qt rotation allows me to run it in rotation 2 which puts the buttons on the right side.  I will post the howto asap.

Thanks for your help.
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
How Do I Compile Libqpe.a
« Reply #7 on: December 05, 2004, 05:49:00 pm »
Just out of curiousity, could you say which libSDL and patch sets you used ? + how big, I'm guessing around the 4Mb mark.

Cheers,

Andy
« Last Edit: December 05, 2004, 05:50:29 pm by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
How Do I Compile Libqpe.a
« Reply #8 on: December 05, 2004, 06:11:01 pm »
I used a patched SDL 1.2.5.  The details are on my website:

http://home.comcast.net/~cmisip/zaurus.htm#SDL

The quake binary is 4408980 size.

Good luck.
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
How Do I Compile Libqpe.a
« Reply #9 on: December 07, 2004, 12:23:30 am »
I uploaded the howto for compiling the toolchain, qtopia, sdl, quake and the quake binary in the website below.  You might want to try the ipk.

 
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

lpotter

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
    • http://qtopia.net
How Do I Compile Libqpe.a
« Reply #10 on: December 10, 2004, 01:52:22 pm »
Quote
You need to build both qt-embedded 2.3.7 and qtopia free 1.7.

OH btw you need to patch qt-embedded to get it built with gcc 3.4, OE carries this patch.
You only need that patch for gcc3.4, if you are not using the latest, greatest and bug fixed qt-2.3.9
Qtopia 1.7 compiles fine with qte-2.3.9 (snapshots). You might also look for the qtopia 1.7.1 snapshots.
And Qtopia -2.1.0 free will be released in the next few days, likely by the end of next week.
« Last Edit: December 10, 2004, 02:14:30 pm by lpotter »
Software Engineer, Systems Group, MES, Trolltech
irc.freenode.net #qtopia
http://qtopia.net

qengli

  • Newbie
  • *
  • Posts: 1
    • View Profile
How Do I Compile Libqpe.a
« Reply #11 on: February 19, 2006, 09:53:51 pm »
Quote
It's part of the OE build, to save you having to build an OE environment here's the patch.

Sorry, had to uuencode it to post it.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=54946\"][{POST_SNAPBACK}][/a][/div]
can't find the attachement. please give me a help. I do need it.