Author Topic: My Attempts To Build Qt4  (Read 14794 times)

ernestus

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
My Attempts To Build Qt4
« on: July 16, 2007, 07:33:27 am »
Hi
My original idea was porting some old Qtopia apps to Qt4, and building other google-found Qt utilities. The memory resources used by Qt4 and its speed compared to old versions impressed me. Porting the old Qtopia apps would make the Z a kinda Super X PDA Mini Laptop... yes, I know, sometimes I am like a teenager  

Well, I needed Qt4 but it wasn't in the repositories, so...

I've been trying to build the latest Qt4 for pdaXrom for the last two or three weeks. Something that I thought that was going to be a simple cross compiling turned out to be very tricky.

The first problem was Qt itself, it builds a series of tools that are used later in the build process itself , that makes cross compiling really hairy (I would have to tweak their build process, so no way...)

So I went to on Zaurus compiling... The Z is very slow (I have a SL-C3200 and it's speed is that of a 200 Mhz Pentium) And the build takes ages. I launch the build, and I get an error several hours later (Civil says the whole process should take about 50 hours).

A byproduct of this attempt is I've assembled together several parts and "constructed" (not written) a kind of SL-C3200 toy emulator based on qemu that goes well ONLY if you want to do native builds (thanks guys, I took most of my tools from you). The only not so good news are it is not much quicker than the Z running in my laptop (an Intel core duo @ 2Ghz ). BTW the emulated RAM can be as much as 256M, so this speeds the build a little bit, and I don't wear my Z microdrive.

The errors I had in this native build are:
-- Related to the precompiled headers. I think is related to the old version of GCC I am using (gcc 3.4.6). I disabled them when invoking the configure script., and solved that problem.

-- Some errors related to include files and symbol definitions. I've been tweaking one by one, you have to think I launch the build and I have the errors back many hours later, so it goes very slowly. I thought it was related to the qmake spec file I was using to build Qt, but Civil remarked that the glic version included in pdaXrom it's very old (glibc 2.2.5). But more important, he pointed out that, even after succeeding he's found several errors that makes the library unusable (thanks man, you've saved me many hours of trial and error)

And now my questions:
-- Does anybody know if there is any plan to introduce an newer compiler in pdaxrom? (I've seen a bug report about this)
-- Is it possible to build a newer glibc? mind that this point may need a rebuild of the repositories.

Before I finish a remark:
In my crappy-good-for-nothing-but-at-least-it-compiles emulator I am mixing some pdaxrom and some openzaurus, and they work very well together. Won't make sense to make pdaxrom a kinda usability-oriented angstrom flavour? those guys have a really slick distro (technically speaking), but not as friendly as pdaxrom.

Of course, thanks again.

E
« Last Edit: July 16, 2007, 01:15:47 pm by ernestus »
Zaurus SL-C3200 running pdaxii13.

Civil

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #1 on: July 16, 2007, 03:45:25 pm »
Quote
-- Does anybody know if there is any plan to introduce an newer compiler in pdaxrom? (I've seen a bug report about this)
-- Is it possible to build a newer glibc? mind that this point may need a rebuild of the repositories.
Compilation of gcc-4.1.2 took me around 10h (natively). But it won't solve all problems.

Quote
But more important, he pointed out that, even after succeeding he's found several errors that makes the library unusable (thanks man, you've saved me many hours of trial and error)
This errors becouse of glibc. In fact there was a small warnings like that:
Quote
qlocale.o(.text+0x116e4): In function `qdtoa(double, int, int, int*, int*, char**, char**)':
: warning: warning: feholdexcept is not implemented and will always fail
This is glibc warning (fixed in glibc 2.3.6), and that's why Qt have all those symbol errors, and etc (and that's why binary won't work). You can google it, if you don't belive. So main problem is very old glibc, not gcc.
« Last Edit: July 16, 2007, 03:45:45 pm by Civil »
Zaurus C-3100 ( Gentoo 2007.0 eabi, kernel 2.6.21.6)
http://www.zavrik.info - Russian Zaurus Site.

ernestus

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #2 on: July 16, 2007, 04:32:01 pm »
Quote
You can google it, if you don't belive. So main problem is very old glibc, not gcc.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164994\"][{POST_SNAPBACK}][/a][/div]

Of course I believe you  

Well, then the thing to do is recompiling glibc, it shouldn't be any problem to have both glibc in my system (I hope so).
Zaurus SL-C3200 running pdaxii13.

Civil

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #3 on: July 16, 2007, 05:00:05 pm »
Maybe, but glibc is very big library. On my PC it took more time to compile glibc then to compile qt... So it will be rather hard I think.
Zaurus C-3100 ( Gentoo 2007.0 eabi, kernel 2.6.21.6)
http://www.zavrik.info - Russian Zaurus Site.

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
My Attempts To Build Qt4
« Reply #4 on: July 17, 2007, 05:25:26 pm »
I would love qt4 for the zaurus ...

last time I paid $100 to get it (Qt3?) compiled for pdaxrom.

I'll do it again for Qt4.

Scott

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #5 on: July 17, 2007, 09:18:28 pm »
Quote
I would love qt4 for the zaurus ...

last time I paid $100 to get it (Qt3?) compiled for pdaxrom.

I'll do it again for Qt4.

Scott
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165071\"][{POST_SNAPBACK}][/a][/div]
any chance we can impose on lpotter to help us wth this (for pdaxrom)?
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

ernestus

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #6 on: July 18, 2007, 06:36:18 am »
Hi all.

As Civil remarked before, there is an issue with glibc, the one included in pdaxrom is quite old. Yesterday I downloaded the latest stable glibc and I expect to compile it in the weekend. I will trigger another Qt build and I hope there are no more issues.

I think some key components in pdaxrom need a revamp, the present ones are a little aged and interfere with the porting of the latest cool app I-cannot-live-without, the best I can do is offering those components packed and ready to install. If I have time (I am going on hols in two weeks) I will assemble together an updated toolchain, with the latest stable GCC and glibc.

There is no problem in linux having multiple versions of a dll (a shared object in linux jargon, or a so file), but glibc is bulky and this may leave out the people with models without a microdrive.

Hmm, I suspect Civil may have done all of this before, ...
« Last Edit: July 18, 2007, 06:42:23 am by ernestus »
Zaurus SL-C3200 running pdaxii13.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
My Attempts To Build Qt4
« Reply #7 on: July 18, 2007, 07:35:40 am »
when I tried building qtopia 1.x when I was doing cacko stuff, what I had to do was build it natively on x86 completely, then start in a new directory and kick off the cross compilation build.

when it then barfed trying to run things like moc and other trolltech tools, I copied over the x86 binaries into position (moving the arm ones out of the way) and fiddled with the file dates so that when I restarted the build it didn't kill the x86 binaries.

it worked fine, and I ended up with x6 binaries of the design tool and so on... I was able to then build and test my programs entirely in x86 space (using qvfb to emulate the handheld's display - that's the virtual frame buffer application), and then build them for zaurus and copy the binary to zaurus and run it there.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Civil

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #8 on: July 18, 2007, 08:53:27 am »
Quote
Hmm, I suspect Civil may have done all of this before, ...
I haven't tried to build glibc - it is too big for native compile. And my 2-nd PC is too weak to have pdaX86 on vmware/qemu for cross-compilation

Quote
There is no problem in linux having multiple versions of a dll (a shared object in linux jargon, or a so file), but glibc is bulky and this may leave out the people with models without a microdrive.
Linux distro can have multiple copies of glibc and you can compile software against one of them. At least something like that was done in OpenOffice 1.x thread (on oesf of course). The main problem is gcc is a very large lib to be native-compiled (I think it'll took 4-5 days to compile it on Z)
Zaurus C-3100 ( Gentoo 2007.0 eabi, kernel 2.6.21.6)
http://www.zavrik.info - Russian Zaurus Site.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
My Attempts To Build Qt4
« Reply #9 on: July 18, 2007, 09:09:09 am »
Quote
I would love qt4 for the zaurus ...
last time I paid $100 to get it (Qt3?) compiled for pdaxrom.
I'll do it again for Qt4.
Scott
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
There [a href=\"https://www.oesf.org/forums/index.php?showtopic=16885&hl=qt4]already is[/url] qt4 for pdaxrom.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

kkazakov13

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
My Attempts To Build Qt4
« Reply #10 on: July 18, 2007, 09:36:55 am »
but too old version of QT4


How Angstrom do it ? they have 4.3.0 version ...
SL-C3200 ** FOR SALE :( **
https://www.oesf.org/forum/index.php?showtopic=25969

Canon K30225 CF wireless card
Taxan iTax-LAN10 wired card
My packages for customized pdaXrom beta 3

Civil

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #11 on: July 18, 2007, 12:58:40 pm »
Quote
How Angstrom do it ? they have 4.3.0 version ...
They have rather up-to-date environment (glibc 2.5, gcc 4.1.2, etc.)
Zaurus C-3100 ( Gentoo 2007.0 eabi, kernel 2.6.21.6)
http://www.zavrik.info - Russian Zaurus Site.

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #12 on: July 18, 2007, 05:25:20 pm »
The question that comes to mind, though, is whether the existing qt4 is sufficient to begin work on WebKit and maybe qlwm?
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
My Attempts To Build Qt4
« Reply #13 on: July 18, 2007, 10:59:56 pm »
Quote
Quote
I would love qt4 for the zaurus ...
last time I paid $100 to get it (Qt3?) compiled for pdaxrom.
I'll do it again for Qt4.
Scott
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
There [a href=\"https://www.oesf.org/forums/index.php?showtopic=16885&hl=qt4]already is[/url] qt4 for pdaxrom.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165104\"][{POST_SNAPBACK}][/a][/div]

*laugh* and I even mirrored it.  :->  WE just need one with the new canvas -- etc --> 4.3.x +

Scott

ernestus

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://
My Attempts To Build Qt4
« Reply #14 on: July 19, 2007, 06:58:38 am »
Interesting enough we already have one... I will have a look at it later, but, anyway, I think a new set of libs and tools may easy the port of new apps...

Will see what I do.
Zaurus SL-C3200 running pdaxii13.