Reply
Thread Tools
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#1
This is not so much a question as it is a way for me to provide documentation where there is none.

Requirement:
Must be able to compile an application that uses libtelepathy-qt4 using the Nokia QT SDK on Linux. This will allow compilation for Linux and Maemo using qtcreator.
Yes of course it can be done from within scratchbox with no changes.
But can it be done from outside scratchbox?

Tried the following:
-> Hoped for dumb luck and just attempted to compile. Compilation on x86_64 Ubuntu worked once I installed libtelepathy-qt4-dev. Compilation for maemo5 failed because libtelepathy-qt4.so does not exist in NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/lib
-> Downloaded telepathy-qt4 source tarball from the telepathy website.
-> First time attempting to configure through madde failed with an error stating that I should use --host if I wanted to cross-compile.
-> After reading through config.sub, I figured that the proper host alias should be "armel-linux". Added that and appropriate flags to --prefix and --eprefix.
-> Configure now fails claiming pkg-config not found.
-> Created a shell script to set PKG_CONFIG to the correct path and for completeness, also set up
QTCORE_CFLAGS='-lQtCore' ; export QTCORE_CFLAGS
QTCORE_LIBS='-DQT_SHARED -I/usr/include/QtCore' ; export QTCORE_LIBS
-> After doing all this, configure succeeded and I checked the config.log to ensure that all was well. It seemed like it was.
-> At this point make failed. mad make failed.

Eventually I gave up at this point - and decided to cheat.

tl;dr: Copied the telepathy-qt4 headers and libraries from scratchbox into the Nokia SDK fremantle directories. Now my code that uses telepathy-qt4 compiles for maemo5 and the binary runs flawlessly on the n900.

PS: In my pro file I had to add

unix {
INCLUDEPATH += /usr/include/telepathy-1.0
LIBS += -ltelepathy-qt4
}

to get it to compile for Linux and for Maemo.
****
Edit: These are the steps I took for my Win7 dev vm.

1. Copy
Source: /scratchbox/users/$USERNAME/targets/FREMANTLE_ARMEL/usr/lib
Destination: C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-10.2010.19-1-slim\usr\lib\
File: libtelepathy-qt4.a

2. Copy
Within directory: C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-10.2010.19-1-slim\usr\lib\
libtelepathy-qt4.so.0 to libtelepathy-qt4.so

3. Copy
Source: /scratchbox/users/$USERNAME/targets/FREMANTLE_ARMEL/usr/include
Destination: C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-10.2010.19-1-slim\usr\include
Directory: TelepathyQt4
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.

Last edited by uvatbc; 2010-07-19 at 00:12. Reason: More info
 

The Following 4 Users Say Thank You to uvatbc For This Useful Post:
Posts: 222 | Thanked: 205 times | Joined on Jul 2009 @ Finland
#2
Originally Posted by uvatbc View Post
Eventually I gave up at this point - and decided to cheat.

tl;dr: Copied the telepathy-qt4 headers and libraries from scratchbox into the Nokia SDK fremantle directories. Now my code that uses telepathy-qt4 compiles for maemo5 and the binary runs flawlessly on the n900.

That's no cheating, it's the right thing to do.

The way to extend NQS madde part is to copy files to sysroot. You could envision doing a program that fetched the packages from the repos and extacted the debs over the sysroot.
 

The Following 2 Users Say Thank You to vivainio For This Useful Post:
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#3
Originally Posted by vivainio View Post
That's no cheating, it's the right thing to do.

The way to extend NQS madde part is to copy files to sysroot. You could envision doing a program that fetched the packages from the repos and extacted the debs over the sysroot.
Very apt way of describing what I did

But while I was doing the copying, I never thought of it that way.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
fcrochik's Avatar
Posts: 722 | Thanked: 1,223 times | Joined on Apr 2010 @ USA
#4
uvatbc,

It seems that you have had a good fight and end up winning the "battle" to setup telepathy-qt4+tpsession on nokia sdk. Would you be so kind to tell me how you did get the telepathy-qt4 headers? I don't think I can just download the latest version from git and I tried "apt-get sources libtelepathy-qt4-0" but got errors later trying to configure/compile it on scratchbox...

In fact, any information that can help me get from 0 to compile my first qt application using telepathy qt4/tpsession on nokia sdk will be greatly appreciated! I would love for example to be able to generate your qgvdial from source.

Thanks in advance
__________________

My maemo work:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For Harmattan:
GeePS - native UI around google maps - GApp - access to optimized mobile "google apps".
Shutdown - shutdown and reboot with one click - QuickCall - one click call, skypeout and google voice integration using dial tones.
WakeOnLan - wake computers on your local network.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For Maemo/N900:
GApp - access to optimized mobile "google apps". - MobWebMail: browser optimized to access multiple gmail accounts
MyContacts: 75 Contacts on your desktop, ring tones per group and more - GeePS: native front-end for google maps
Macuco2 : web browser to access web sites optimized for the iphone - WakeOnLan: wake up computers on your local network
dbBrowser: Simple application to browse sqlite databases
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#5
Originally Posted by vivainio View Post
You could envision doing a program that fetched the packages from the repos and extacted the debs over the sysroot.
Originally Posted by uvatbc View Post
Very apt way of describing what I did
Was that pun intentional? If so, consider yourselves hi-fived and subsequently slapped with trout.

On a different note, would anyone be interested in actually putting together some sort of automation for that? I haven't personally heard any rumblings from Nokia about them doing it, but it would be quite useful, even if it was something rough.
 
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#6
Originally Posted by jaem View Post
Was that pun intentional? If so, consider yourselves hi-fived and subsequently slapped with trout..
Not just trout - Obligatory trout.

Originally Posted by jaem View Post
On a different note, would anyone be interested in actually putting together some sort of automation for that? I haven't personally heard any rumblings from Nokia about them doing it, but it would be quite useful, even if it was something rough.
That's an excellent idea. I'll make something in the next 1-2 days and post it here so that fcrochik can also pick it up.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
Posts: 121 | Thanked: 75 times | Joined on Oct 2009
#7
I'm trying this too and I've gotten it to build and run fine on my device but the problem I'm having is that the editor in QT Creator doesn't seem to see the header files and it shows the classes \ includes as unknown and doesn't offer suggestions as I type.

It's not the biggest problem in the world but would be nice if someone knows a way to get it to add these to QT Creator
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#8
Originally Posted by matrim View Post
I'm trying this too and I've gotten it to build and run fine on my device but the problem I'm having is that the editor in QT Creator doesn't seem to see the header files and it shows the classes \ includes as unknown and doesn't offer suggestions as I type.

It's not the biggest problem in the world but would be nice if someone knows a way to get it to add these to QT Creator
Defining INCLUDEPATH in pro-file should work. You have run qmake after that?
 
Posts: 121 | Thanked: 75 times | Joined on Oct 2009
#9
Originally Posted by Diph View Post
Defining INCLUDEPATH in pro-file should work. You have run qmake after that?
Unforutnately it's not.

I've added

INCLUDEPATH += /usr/include/telepathy-1.0
LIBS += -ltelepathy-qt4

to my pro file and run qmake.
 
Posts: 180 | Thanked: 76 times | Joined on May 2010
#10
I tried to include telepathy and it worked. Have you selected Maemo target instead of Desktop or Simulator?
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:31.