Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-04

libQt4Pas.so for ARM

14 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Den Jean
to Kjow
Kjow wrote
I tried to make it myself, but I don't understand what to do...

An arm binary is too dependent of the arm target platform characteristics. What is the target arm platform ?

Reply by email

Kjow
to Den Jean

2010/4/7 Den Jean :

Show quoted text 5 lines
On Wednesday 07 April 2010 11:13:16 Kjow wrote: > I tried to make it myself, but I don't understand what to do... An arm binary is too dependent of the arm target platform characteristics. What is the target arm platform ?

I need Maemo 5 / MeeGo target.

The first is a debian based distro, the 2nd will be compatible with Maemo.

Thanks!
Kjow

Reply by email

Kjow
to Den Jean

2010/4/8 Den Jean :

Show quoted text 16 lines
On Wednesday 07 April 2010 22:06:34 Kjow wrote: > I need Maemo 5 / MeeGo target. and I need a N900 :-) Created using scratchbox: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/maemo5_bin-qt4pas-V2.2_Qt4.5.3.tar.gz You may want to strip the lib. New platform MAEMO5 was defined if you compile a fpc qt4 app or lazarus/qt, define MAEMO5. Not tested because no H/W available and also Maemo scratchbox arm graphics do not work yet. regards, Den Jean

Thank you very much! :)

libQT4.Pas.so is accepted by linker, but now... do you know where can I found the other libraries requested by ld? (like libQtWebKit.so etc) I can't find these in my device, and on the web I found "only" the sources...

Thanks!
Kjow

Reply by email

Den Jean
to Kjow
Kjow wrote
libQT4.Pas.so is accepted by linker, but now... do you know where can I found the other libraries requested by ld? (like libQtWebKit.so etc) I can't find these in my device, and on the web I found "only" the sources...

learn about apt-get, apt-cache search and google :-) http://talk.maemo.org/showthread.php?t=46785
at first glance it probably is:
apt-get update
apt-get install libqt4-maemo5-*

Reply by email

Kjow
to Den Jean

2010/4/9 Den Jean :

Show quoted text 5 lines
learn about apt-get, apt-cache search and google :-) http://talk.maemo.org/showthread.php?t=46785 at first glance it probably is: apt-get update apt-get install libqt4-maemo5-*

Thank you!
This thread is very useful, I installed the libraries and I copied them on the same dir of other libs, but still not working:

Hint: Start of reading config file /home/kjow/.fpc.cfg Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Hint: End of reading config file /home/kjow/.fpc.cfg Free Pascal Compiler version 2.5.1 [2010/04/06] for arm Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARMEL
Compiling TestQT.lpr
Assembling testqt
Compiling resource /mnt/Condivisa/Progetti/TestQT/lib/arm-linux/TestQT.or Linking TestQT
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtWebKit.so.4, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtGui.so.4, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtNetwork.so.4, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libQtCore.so.4, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libpthread.so.0, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libstdc++.so.6, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libm.so.6, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: libgcc_s.so.1, needed by /mnt/Condivisa/Lazarus/libcross/libQt4Pas.so, not found (try using -rpath or -rpath-link)
/home/kjow/lazarus/fpc/binutils/ld: warning: ld-linux.so.3, needed by /mnt/Condivisa/Lazarus/libcross/libc.so, not found (try using -rpath or -rpath-link)
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to `QPlainTextEdit::setReadOnly(bool)'
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to `QPlainTextEdit::setTextInteractionFlags(QFlags<Qt::TextInteractionFlag>)' ...
a lot of similar rows after
...
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to `QMimeData::hasHtml() const'
/mnt/Condivisa/Lazarus/libcross/libQt4Pas.so: undefined reference to `QString::replace(QLatin1String const&, QLatin1String const&, Qt::CaseSensitivity)'
TestQT.lpr(21) Error: Error while linking
TestQT.lpr(21) Fatal: There were 1 errors compiling module, stopping

where do I need to use " (try using -rpath or -rpath-link)"?

Thanks!
Kjow

Reply by email

Den Jean
to Kjow
Kjow wrote 12 lines
> learn about apt-get, apt-cache search and google :-) > http://talk.maemo.org/showthread.php?t=46785 > at first glance it probably is: > apt-get update > apt-get install libqt4-maemo5-* Thank you! This thread is very useful, I installed the libraries and I copied them on the same dir of other libs, but still not working: <snip> Hint: Start of reading config file /home/kjow/.fpc.cfg /home/kjow/lazarus/fpc/binutils/ld: warning: libQtWebKit.so.4, needed

on your device you need the libs (libqt4-maemo5*)
on the cross development platform you also need the devel libs (links named .so to actual libs)
apt-get install libqt4-dev or something like that
(search with apt-cache search qt4)

general info about libMyLibName.so.X.Y... :
http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html

Reply by email

Kjow
to Den Jean

2010/4/9 Den Jean :

Show quoted text 8 lines
on your device you need the libs (libqt4-maemo5*) on the cross development platform you also need the devel libs (links named .so to actual libs) apt-get install libqt4-dev or something like that (search with apt-cache search qt4) general info about libMyLibName.so.X.Y... : http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html

Umm... but I have the files in the path (e.g. libQtWebKit.so.4) I installed by apt-get all libQt* for maemo-arm:

I added the repos:

deb http://repository.maemo.org/extras/ fremantle free non-free deb-src http://repository.maemo.org/extras/ fremantle free deb http://repository.maemo.org/extras-devel/ fremantle free non-free deb-src http://repository.maemo.org/extras-devel/ fremantle free

And typed:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libqt4-maemo5-*

than I copied all libQt* from /usr/lib/debug/opt/qt4-maemo5/lib/libQt* to the path where I have all other target libraries:

cp /usr/lib/debug/opt/qt4-maemo5/lib/libQt* /mnt/Condivisa/Lazarus/libcross/

and I renamed from *.4.6.2 to *.4

so now I have all libQt*.so.4 in the path.

I noticied that generally when ld doesn't find a compatble target library, it advise me writing that the file (e.g. libQtWebKit.so.4) is not compatible, but now it doesn't find it (e.g. it ask for libQtWebKit.so.4, but libQtWebKit.so.4 is in the project path: see: http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM#Add_target_libs_to_your_project )

Reply by email

Den Jean
to Kjow
Kjow wrote
2010/4/9 Den Jean : > on your device you need the libs (libqt4-maemo5*) > on the cross development platform you also need the devel libs > (links named .so to actual libs)

read this ?!

Show quoted text 6 lines
> apt-get install libqt4-dev or something like that > (search with apt-cache search qt4) > > general info about libMyLibName.so.X.Y... : > http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-librarie >s.html

read this ?!

Show quoted text 13 lines
Umm... but I have the files in the path (e.g. libQtWebKit.so.4) I installed by apt-get all libQt* for maemo-arm: I added the repos: deb http://repository.maemo.org/extras/ fremantle free non-free deb-src http://repository.maemo.org/extras/ fremantle free deb http://repository.maemo.org/extras-devel/ fremantle free non-free deb-src http://repository.maemo.org/extras-devel/ fremantle free And typed: sudo apt-get update sudo apt-get upgrade

that was dangerous, do not do this unless
you understand what you do, especially after adding repositories.

Show quoted text 5 lines
sudo apt-get install libqt4-maemo5-* than I copied all libQt* from /usr/lib/debug/opt/qt4-maemo5/lib/libQt* to the path where I have all other target libraries: cp /usr/lib/debug/opt/qt4-maemo5/lib/libQt*

never heard of cp -d ? , compare output of ls -l in both dirs or du -hcs

/mnt/Condivisa/Lazarus/libcross/ and I renamed from *.4.6.2 to *.4

ahum

Show quoted text 8 lines
so now I have all libQt*.so.4 in the path. I noticied that generally when ld doesn't find a compatble target library, it advise me writing that the file (e.g. libQtWebKit.so.4) is not compatible, but now it doesn't find it (e.g. it ask for libQtWebKit.so.4, but libQtWebKit.so.4 is in the project path: see:

http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM#Add_target_libs_to_your_project didn't read all of this wiki, but please fix the thing about renaming files: quote:"...and you have a file called libX11.so.6.2.0 you need to rename it.." you should only add links

Reply by email

Kjow
to Den Jean

2010/4/9 Den Jean :

On Friday 09 April 2010 21:46:39 Kjow wrote:

Too often things are taken for granted by experts. Too often things are too cryptic and not enough explained. Almost always, who doesn't know certain arguments will learn it himself, and if there isn't a clear explaination, will be used many useless words.

Show quoted text 5 lines
> 2010/4/9 Den Jean : > > on your device you need the libs (libqt4-maemo5*) > > on the cross development platform you also need the devel libs > > (links named .so to actual libs) read this ?!

Yes, but...

Show quoted text 7 lines
> > apt-get install libqt4-dev or something like that > > (search with apt-cache search qt4) > > > > general info about libMyLibName.so.X.Y... : > > http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-librarie > >s.html read this ?!

Yes, but...

that was dangerous, do not do this unless you understand what you do, especially after adding repositories.

I know what these commands mean.
However... it is wrote in the link you posted:
http://talk.maemo.org/showpost.php?p=561366&postcount=5

> and I renamed from *.4.6.2 to *.4 ahum

ehm...

http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM#Add_target_libs_to_your_project didn't read all of this wiki, but please fix the thing about renaming files: quote:"...and you have a file called libX11.so.6.2.0 you need to rename it.." you should only add links

I simply found a way that works, no one told me it before that was wrong... so what you suggest to write?

Reply by email

Den Jean
to Kjow
Kjow wrote
Too often things are taken for granted by experts. Too often things are too cryptic and not enough explained.

Well I pointed to
http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html that documents which file links should be present
Using the same example from that article.

/usr/lib/libreadline.so.3.0 :
The real file, it is not a link. Having only this file present, will not allow this library to be used, not by a compiled program, nor a by a linker looking for that library.

/usr/lib/libreadline.so.3:
Fully-qualified soname. Link to above real file.
This is the one that the deployed application
will look for when being executed.

/usr/lib/libreadline.so:
Link to above real file. This is the one the linker will search for.

I am on a rpm based distro now, so will explain with rpm, it is similar for debian.

rpm -qlp libreadline6-6.0-2mdv2010.0.i586.rpm
shows that it only contains
/lib/libhistory.so.6
/lib/libhistory.so.6.0
# ls -l /lib/libreadline*
lrwxrwxrwx 1 root root 18 2009-11-03 20:31 /lib/libreadline.so.6 -> libreadline.so.6.0* -rwxr-xr-x 1 root root 230456 2009-06-28 21:19 /lib/libreadline.so.6.0* So this rpm contains the real filename and the so-name file, a link to the real file. Installing this package allows to run applications that need this library.

There is also a rpm called libreadline-devel, with a description: "Files for developing programs that use the readline library?" after installing this one, you will have:
# ls -l /lib/libreadline*
lrwxrwxrwx 1 root root 16 2010-04-10 22:07 /lib/libreadline.so -> libreadline.so.6* lrwxrwxrwx 1 root root 18 2009-11-03 20:31 /lib/libreadline.so.6 -> libreadline.so.6.0* -rwxr-xr-x 1 root root 230456 2009-06-28 21:19 /lib/libreadline.so.6.0* So it added the .so file, that is a link to the real filename. This is the one that is used by the linker (so for development). This package installs also other things (headers,static lib,...)

Above should have been clear after reading the provided url, I hope it is less cryptic now. So if you are in a situation that you miss a .so and only have a .so.6, you should not start renaming things, but just add file links or install the devel package for that library.

kind regards,

Den Jean

Reply by email

Kjow
to Den Jean

2010/4/10 Den Jean :

Above should have been clear after reading the provided url, I hope it is less cryptic now. So if you are in a situation that you miss a .so and only have a .so.6, you should not start renaming things, but just add file links or install the devel package for that library.

Thank you very much; I'll read all with more calm later, unfortunately these days I have no time.

Best Regards,
Kjow

Reply by email

Den Jean
to Kjow

When testing a debian qemu armel lenny image,
I found the armel libqt4pas package to be present
and working (Qt on Linux/X11).

Thank Matthias Klumpp for that (author of the .deb)

apt-get install libqt4pas5
dpkg -L libqt4pas5
/.
/usr
/usr/lib
/usr/lib/libQt4Pas.so.5.2.1
/usr/share
/usr/share/doc
/usr/share/doc/libqt4pas5
/usr/share/doc/libqt4pas5/copyright
/usr/share/doc/libqt4pas5/changelog.Debian.gz
/usr/lib/libQt4Pas.so.5
/usr/lib/libQt4Pas.so.5.2

debian-armel:/storage# ls -l /usr/lib/libQt4Pas*
lrwxrwxrwx 1 root root 18 2010-04-14 13:54 /usr/lib/libQt4Pas.so.5 -> libQt4Pas.so.5.2.1
lrwxrwxrwx 1 root root 18 2010-04-14 13:54 /usr/lib/libQt4Pas.so.5.2 -> libQt4Pas.so.5.2.1
-rw-r--r-- 1 root root 1887812 2010-03-16 04:41 /usr/lib/libQt4Pas.so.5.2.1

the devel package :-)
apt-get install libqt4pas-dev
dpkg -L libqt4pas-dev
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libqt4pas-dev
/usr/share/doc/libqt4pas-dev/changelog.Debian.gz
/usr/share/doc/libqt4pas-dev/copyright
/usr/share/pascal
/usr/share/pascal/qt4
/usr/share/pascal/qt4/qt4.pas
/usr/lib
/usr/lib/libQt4Pas.so

# ls -l /usr/lib/libQt4Pas*
lrwxrwxrwx 1 root root 18 2010-04-14 13:56 /usr/lib/libQt4Pas.so -> libQt4Pas.so.5.2.1
lrwxrwxrwx 1 root root 18 2010-04-14 13:54 /usr/lib/libQt4Pas.so.5 -> libQt4Pas.so.5.2.1
lrwxrwxrwx 1 root root 18 2010-04-14 13:54 /usr/lib/libQt4Pas.so.5.2 -> libQt4Pas.so.5.2.1
-rw-r--r-- 1 root root 1887812 2010-03-16 04:41 /usr/lib/libQt4Pas.so.5.2.1

# cat /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ lenny main
deb-src http://ftp.de.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

deb http://ftp.de.debian.org/debian testing main contrib non-free

Reply by email