OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: ScottYelich on March 28, 2005, 09:44:27 am
-
Hi --
I have successfully used the SDK to compile programs on an x86 for the zaurus...
but I would like to compile programs natively on the zaurus.
Has anyone managed to do this with programs that use Qt?
ie: Is there anyone out there with a working native SDK?
Scott
-
Hi Scott
I've been trying hard to native compile on a Z sl-5500 the last days. Finally, I managed to have ZGCC working. It compiles fine with a test "hello world" script. But trying to compile a quite more complex program, I get strange errors at "make" time like :
undefined reference to '__ctype_b'
undefined reference to '__ctype_tolower'
I am far from a C-guru. I found a trick to get ride of this error, but finally, my program doesn't run ok. What I have understood is that these errors happen because of missing or bad versions of the compiler libraries (libc ? other ?) (seems that zgcc compiler is version 2.95.2).
Before, I had tryed also the dev_img-1.5 tool but could not mount the cramfs. But now, with my zgcc experience, I am going to go back to it, see if I get better results than with zgcc.
good luck !
-
I use the zgcc-3.3.2.img from here:http://mirror1.pdaxrom.org/rc9.1/developer/
To compile qt you will need to install the qt-headers package.
This package is declared as dependent to the packages gcc binutils etc, so if you choose to use the image, I suggest that you install this package by hand with -force-depends (not to have a second gcc that fills your disk space, like me.....)
I tried to compile the HelloWorld from the tutorial.
you will need to export QMAKESPEC=/usr/lib/qt/mkspecs/default/
the qmake.conf is wrong, I attached a modified qmake.conf.
then qmake -projects; qmake; make -> works
* edit the problem I had was in fact that qmake doesn't like project in a directory named "qt"
-
Here:
http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/ (http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/)
You will find a squashfs image (cramfs may follow soon) containing the native sdk and a full qt install (with documentation assistant designer moc, ui etc...)
You will probably have to use a swap file if you start to compile c++ project with designer assistant and firefox open
-
I get strange errors at "make" time like :
undefined reference to '__ctype_b'
undefined reference to '__ctype_tolower'
If you run on this error, you should have a c-File with these lines in your project:
#ifndef QT_QWS_SL5XXX
#include
__const unsigned short int *__ctype_b;
__const __int32_t *__ctype_tolower;
__const __int32_t *__ctype_toupper;
void ctSetup()
{
__ctype_b = *(__ctype_b_loc());
__ctype_toupper = *(__ctype_toupper_loc());
__ctype_tolower = *(__ctype_tolower_loc());
}
#endif
and this in your main():
#ifndef QT_QWS_SL5XXX
extern "c" void ctSetup();
ctSetup();
#endif
regards,
Silvio
-
@Silvio what are you compiling on which rom?
This native sdk is gcc 3.3.2 + qt-free-x11-3.3.4? for pdaxrom
edit: oh you are responding to blaise, whose post is not relevant in this thread...
-
cramfs mirrored to same URL: http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/ (http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/)
I put a sample/test Qt program in there (that I wrote)... instructions for compiling are in the
source code.
The program basically makes a GUI popup window and prompts you with a question that requires a Yes or No answer.
Scott
ps: pgas says it compiles and runs.... the shortcut keys (without ALT) seem to work when compiled natively -- although they DO NOT work when cross compiled!
pps: THANKS AGAIN, PGAS!
-
how does one mount the zgcc-3.3.2.img from here:http://mirror1.pdaxrom.org/rc9.1/developer/ ?... I tried ZGCC but I kept getting errors and symlink fuckups with busybox. I am not really interested in compiling Qt apps. Just would like to learn in the console at first. I tried the Gcc install in the stable feed but the headers didn't install correctly. AGH. If anyone can help me get setup with a workin Gcc I would truly be grateful.
-
like this:
mount -o loop /path/to/zgcc-3.3.2.img /opt/native/arm/3.3.2-xscale-softvfp
Or put the image in /home/root and reboot if you have enough space.
-
hmmm. can't seem to run egrep on my pda... it's been up for 24 days :->
doesn't it also check /mnt/card etc?
if not, could you use a symlink from /home/root?
I'll have to test these.
Scott
-
op, pgas... trying this out.
I eraed /home/root/zgcc-3.3.2.img
did a wget of yours...
mount -o loop
set PATH and QTDIR... mkdir gync, got gync.cpp while in that dir...
qmake -project
qmake
make
and I get this:
g++ -c -pipe -Wall -W -O2 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/local/qt/mkspecs/default -I. -I. -I/usr/local/qt/include -o gync.o gync.cpp
/opt/arm/3.3.2-vfp/bin/../lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/as: error while loading shared libraries: libopcodes-2.15.so: cannot open shared object file: No such file or directory
also, in the readme, I don't have an /opt/native ...
and if I do ln -s /opt/arm/3.3.2-vfp -- I have to link to 3.3.2-vfp/qt -- not just -vfp or things like
qmake wont find make.spec and /usr/local/qt/bin etc... won't work.
# find . -name libopcode\*
./arm/3.3.2-vfp/lib/libopcodes-2.15.so
./arm/3.3.2-vfp/lib/libopcodes.so
I see the file... so I think it's probably just some sort of path issue.
let me take a guess that /native/ is hard coded....
nope
ok, I'll try mounting it where you said.
bingo... path is hard coded.. same with /usr/local/qt! so I have to link to xscale-softvfp/qt (not just softvfp) ...
compiling gync now.
it's just sitting there... I don't have firefox open, but I am in X... if it doesn't complete, I'll try
killing X. it would suck if I had to get out of X to compile... I'm sure I could add a swap on CF
or something.
ok, it compiled and went to linking:
/opt/native/arm/3.3.2-xscale-softvfp/lib/gcc-lib/armv5tel-cacko-linux/3.3.2/../../../../armv5tel-cacko-linux/bin/ld: warning: libGL.so.1, needed by /opt/native/arm/3.3.2-xscale-softvfp/qt/lib/libqt-mt.so, not found (try using -rpath or -rpath-link)
/opt/native/arm/3.3.2-xscale-softvfp/qt/lib/libqt-mt.so: undefined reference to `glXQueryServerString'
/opt/native/arm/3.3.2-xscale-softvfp/qt/lib/libqt-mt.so: undefined reference to `glColor3ub'
not sure why I need GL ...
I don't seem to have this lib anywhere -- do I need to install more libs?
Scott
-
hmm, I compiled qt with all optinons, including openGL.
if you install libmesa3d it should go on.
hmm maybe I should recompile qt without gl. (I didn't thought it will asks for the lib when compiling)
for the link, there is indeed a little typo in the readme and it should be something like this:
ln -s /opt/native/arm/3.3.2-xscale-softvfp/qt /usr/local/qt
As for the swap, yes compilations might require more ram than availale on the Z, especially when you run X
-
This isn't a general solution -- it's pretty much the exact opposite of an SDK -- but if all you're looking for is pdaXrom-compatible QT libraries to link a certain program against, you can try the ones I compiled (http://interstel.net/~girash/zaurus/#konq) (natively) for Konqueror. There's QT3.3.3 (which required Debian's diffs) as well QT2.3.1 there. To get Konq to compile against these libs I had to use a lot of the binary utilies from sarge; you may find the same with your app. Similarly QT3 expected pdaXrom's Xft.h to be named XftFreetype.h, so you might expect to have to do some analogous symlinking of your own.
I have no idea if this helps, but I figure it can't hurt.
-
hmm, a general solution to what?
how is this the opposite of an SDK?
you can happily link against the qt libs given by pdaxrom, see my first posts.
When i compiled Qt3 i didn' t have to rename anything.
-
hmm, a general solution to what?
how is this the opposite of an SDK?
you can happily link against the qt libs given by pdaxrom, see my first posts.
When i compiled Qt3 i didn' t have to rename anything.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=74810\"][{POST_SNAPBACK}][/a][/div]
Ah, I was replying to both of the original post's questions at once, to wit: "yes I've managed to compile programs that use Qt natively on the zaurus (and here's how I did it)", but "no I don't have a working native SDK (and thus it's not a general solution)".
For what it's worth I wasn't able to link Konq against the qt libs provided by pdaxrom. It was awhile ago so I don't recall why, but my guess is that Konq required some defs that weren't turned on by default. And I only had to rename Xft.h if I wanted Qt's configure to find it; Qt did build quite happily without it.
-
oh, now I understand!
I was wondering how a compiler + all the qt tools was the opposite of an sdk!
-
me too, and I still don't get it... but I guess it's not an issue. :->
I'll install the mesa libs and give it another try. thanks!
Scott
-
OK, I'm in the middle of setting up the cramfs zgcc on my c860, kathrin. After reading this thread and making a few changes, I can compile and build binaries. But compiling a Qt app gives me:
make[1]: /usr/local/bin/moc: Command not found
So where am I supposed to acquire moc? I thought I had everything I needed already, including qt-headers and the cramfs image, but clearly I've missed something.
j
-
what did you use?
if you use the native sdk from pdaxrom and the qtheader ipk, then you don't have moc.
If you use the image with qt and follow the readme (and my errata ie link the qt dir in /opt/native../qt to /opt/usr/local/qt. you should have moc in /usr/local/qt/bin/moc
-
[DELETED]
-
what did you use?
if you use the native sdk from pdaxrom and the qtheader ipk, then you don't have moc.
If you use the image with qt and follow the readme (and my errata ie link the qt dir in /opt/native../qt to /opt/usr/local/qt. you should have moc in /usr/local/qt/bin/moc
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=75003\")
Yes, I used native SDK cramfs, qt-headers installed. [a href=\"http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/]http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/[/url]
mount -oloop,ro /mnt/card/zgcc-3.3.2.img /opt/native/arm/3.3.2-xscale-softvfp
ln -s /opt/native/arm/3.3.2-xscale-softvfp /usr/local/qt
I'll try the other approach this evening, if I have a chance.
j
-
The link command should be something like:
ln -s /opt/native/arm/3.3.2-xscale-softvfp/qt /usr/local/qt
moc is in /opt/native/arm/3.3.2-xscale-softvfp/qt/bin and after linking
in /usr/local/qt/bin.
/usr/local/qt/bin should be then added to your path
-
ok, mounted... and added mesa3d.*.ipk
now I can compile locally -- and it actually works...
with qmake -project && qmake && make
(moc, etc).
[compiled gync]
The only thing is the qt gcc seems to seriously break normal
things like egrep -- etc... I get messages about missing
libpcre.*.so.*
where does one get libpcre? I thought that was a python regular
expression? why would egrep need that. strange.
so, I mount, compile, and umount. :-> but it works.
Thanks again, PGAS!
Scott
-
install pcre
Laze: this should go in the faq or in the base install.
-
heheh...
uh, ya, but I was remote at the time of annoyance 8^[]
Scott
-
Here:
http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/ (http://zaurus.spy.org/feeds/cacko/pdaXrom/misc/pgas/gcc-qt/)
You will find a squashfs image (cramfs may follow soon) containing the native sdk and a full qt install (with documentation assistant designer moc, ui etc...)
Is this offline, I couldn't access this site the whole day today. Can't find any mirrors on the web.
The current RC12 SDK doesn't contain moc and ui and is thus problematic.
Can I download this image somewhere else?
-
Hey, here you go:
http://rapidshare.de/files/8173700/zgcc-3.3.2.zip.html (http://rapidshare.de/files/8173700/zgcc-3.3.2.zip.html)
Have fun. Thanks to Laze and pgas for making this nice SDK happen.
-
ln -s /opt/native/arm/3.3.2-xscale-softvfp/qt /usr/local/qt
I seem to have some problems with the Qt from this package.
I'm trying to build KDE 3.5 now, when compiling arts, when I run ./configure
with QTDIR set to /usr/local/qt where the /opt/native/.../qt is linked to, I get the checking for Qt... Qt not found error
When I export QTDIR as /usr/lib/qt i.e. not the packages Qt, then I can run ./configure
What is the problem here?
-
Where can i find 'moc'?
I use zgcc-3.4.5 and install qt-header.ipk.
qmake -project
qmake gync.pro -spec /usr/lib/qt/mkspecs/default
make
and i have this error:
(cd /usr/lib/qt/bin/src/moc : no such file or directory
make *** [/usr/lib/qt/bin/moc] Error 1
-
in the full qt tarball
http://mail.pdaxrom.org/contrib/misc/ (http://mail.pdaxrom.org/contrib/misc/)