Author Topic: Help me get started cross-compiling for OZ  (Read 4381 times)

fsjws4

  • Newbie
  • *
  • Posts: 17
    • View Profile
Help me get started cross-compiling for OZ
« on: October 26, 2004, 03:33:24 pm »
As I mentioned in another thread, I'm trying to get Frotz (and some of my other favorite apps) working in OZ. I don't have a linux box, so I have to cross-compile from a Cygwin environment on Windows. I haven't done this before, so I'm trying to get to a state where I know everything's set up right and works properly, then figure out what I need to do to get the new apps working.

I'm sure there's someone out there who could easily compile this for me, but I'm using this as a learning experience as much as anything else. I want some fishing lessons, so to speak.

So far, I've followed the instructions here: http://takahr.dhis.portside.net/cgi-bin/rw...+on+Cygwin%3Aen

Before I try to compile something that doesn't necessarily work, I want to compile something that should already work. This way I can verify that my setup is correct. So I got source for a random app from the software index. I chose "zuc", a unit converter. (for those playing along at home: http://prdownloads.sourceforge.net/zuc/zuc-1.1.tar.gz)

Here's where I'm stuck. I ran the environment setup script from the cross-compile page. I did a 'make' from the zuc directory, and it gave a few warnings, but seemed to work. I'm left with a 'zuc' file, among other compilation results. I put the binary on the Z and tried running it from the shell. I get this error:

./zuc: symbol lookup error: ./zuc: undefined symbol: _7QString.shared_null

So I must have missed something. I'm thinking:
* There's some other library that I need to install on the Z
* There's a support file that I need to copy along with just 'zuc'
* Some of those compile warnings were serious enough to break the app
* Something isn't set up right in my build environment

Could someone give me a push in the right direction?

Incidentally, I think a HOWTO on cross-compiling would be of great help. Especially if it used an existing app and walked through step-by-step how to set up the environment, build, and package it. I'd be happy to write something like this, once I get to that point...
5500 w/ OZ v3.5.1
64 MB Kodak CF
Linksys WCF12 CF wifi

alienz

  • Newbie
  • *
  • Posts: 14
    • View Profile
Help me get started cross-compiling for OZ
« Reply #1 on: October 26, 2004, 05:25:00 pm »
Not sure if this will help but that error is the same one I get with qpdf on 3.5.1. So perhaps your cross-compiling environment needs some updating.

Teletubbie

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • http://
Help me get started cross-compiling for OZ
« Reply #2 on: October 26, 2004, 07:05:10 pm »
Well, you are following a wrong path. The crosscompiler mentioned above uses a gcc295 toolchain. OZ used gcc 3.3.2 toolchain for the 3.3.6-pre1 and gcc3.4.2 toolchain for the current 3.5.1
The good thing is that is much more easier to get a working toolchain. You have to install openembedded and it will build the required toolchain.
It is all described on openembedded.org
After you get it running, you can add you package to the buildsystem and start to compile. After you get your package running you can provide you package as metadata to the openembedded repository so your package can be maintained and crosscompiled by also other people, for example people working on other devices (ipaq, simpad etc.).
That is very briefly the process. I dont know if it works also on cygwin, but think it should. For further questions please consult the openembedded mailing list, or use the irc, or help working on the openembedded wiki.This is the wrong place for openembedded discussion, since it addresses not only zaurus developers/people, and it is a claim of the project to let all participate. And thats maybe you didnt found informations about openembedded here.
Cheers,
Sam
PS: I builded a lot of packages with the framework and can say it is easy to use and very productive/flexible  
SL-5500G
OZ 3.3.6-pre1
Opie 1.1.4

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help me get started cross-compiling for OZ
« Reply #3 on: October 27, 2004, 04:37:02 am »
You may have troubles with cygwin due to Windows not differentiating between upper- and lowercase filenames.

I'd invest in a second HDD and dual boot, if I were you - makes life so much easier.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ninsei

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help me get started cross-compiling for OZ
« Reply #4 on: November 25, 2004, 01:05:14 pm »
where exactly do we get the toolchain for gcc 3.4.2 / OZ 3.5.1 ?

semen

  • Newbie
  • *
  • Posts: 18
    • View Profile
Help me get started cross-compiling for OZ
« Reply #5 on: November 28, 2004, 12:53:02 am »
Quote
zuc: symbol lookup error: ./zuc: undefined symbol: _7QString.shared_null
Try installing the compatibility libraries (oz-compat) and relinking the binary against them (runcompat or makecompat). This has helped me many a time in compiler library version differences.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help me get started cross-compiling for OZ
« Reply #6 on: November 28, 2004, 05:57:26 am »
Quote
where exactly do we get the toolchain for gcc 3.4.2 / OZ 3.5.1 ?

Download OE and it will automatically build your cross-toolchain from source.

Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

radioz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Help me get started cross-compiling for OZ
« Reply #7 on: November 28, 2004, 01:12:17 pm »
Quote
Download OE and it will automatically build your cross-toolchain from source.

Of course, but can you tell us where to download OE from?

radioz
5600 PXA-255
Hentges OZ 3.5.4.2
PQI 1G SD
PQI 256M SD
Socket LP 10/100 Ethernet
Ambicom WL1100C Wifi

ninsei

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help me get started cross-compiling for OZ
« Reply #8 on: November 28, 2004, 03:33:38 pm »
and which toolchain does it build?  for gcc i see many .oe files:

gcc_3.3.3.oe, ..., gcc_3.4.3.oe

can i pick which one i want (cause i want the exact one OZ 3.5.1 was built with, 3.4.2 i think).  Also, does OE set up all the env vars needed to build a QT/QPE pkg?  Does it build the QT/QPE toolchain?  I guess i'm looking for detailed step by step instructions on how to buld a QT/QPE pkg using a freshly downloaded OE.  Hopefully openembedded.org will have this info when it comes up.

Teletubbie

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • http://
Help me get started cross-compiling for OZ
« Reply #9 on: November 28, 2004, 03:40:33 pm »
By "default" (this means just configuring the basic needs) it will build the newest gcc toolchain. Otherwise you have to do some configuration. Please wait. When the site is up look at the wiki please, assign the mailinglist and get the mailing list archives. After that you will know everything  
Cheers,
Sam
SL-5500G
OZ 3.3.6-pre1
Opie 1.1.4

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Help me get started cross-compiling for OZ
« Reply #10 on: November 29, 2004, 05:54:05 am »
Oh well, I'm having a coffee break so I'll have a go at explaining a few bits and bobs.

Quote
can i pick which one i want (cause i want the exact one OZ 3.5.1 was built with, 3.4.2 i think). Also, does OE set up all the env vars needed to build a QT/QPE pkg? Does it build the QT/QPE toolchain? I guess i'm looking for detailed step by step instructions on how to buld a QT/QPE pkg using a freshly downloaded OE. Hopefully openembedded.org will have this info when it comes up.

Yes you can choose, but it shouldn't matter which version you use as long as it's GCC3.xx. (GCC2.9X is included as it's still needed to build the kernels). You source a file (much like the Sharp ROM development system) which sets up all the various paths which you need to deal with; everything needed to build Opie (which is equivalant to  Qtopia) is built for you - you don't have to mess around with it.

As Teletubbie said, take a look at the oe.org wiki, I followed the "getting started" docs there and it was painless.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ninsei

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Help me get started cross-compiling for OZ
« Reply #11 on: November 29, 2004, 09:31:25 am »
thx very much.  I'm getting less afraid  ;-)  I'll read all the docs when the site is up.