maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Technology Preview: MADDE (https://talk.maemo.org/showthread.php?t=38075)

danielwilms 2010-04-21 06:49

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Venemo (Post 619825)
Hi,

This may be the most idiot question ever, but...
MADDE is a cross-compiler, right?
So why isn't there any documentation about how to actually compile with it? I mean, without Qt Creator and stuff, to compile pure C and GTK applications.

Completing the documentation with a C example is a good argument. We will try to provide you one.

Daniel

danielwilms 2010-04-21 06:55

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by tvogel (Post 586755)
I have a question about third-party libraries in madde in this new thread. This one is getting a bit long and mixed up for me.

As you saw in the thread, you are referring to, the third party library support is not completely solved yet, besides pointing directly to the library in your *.pro file. At least this works for me. We are discussing different options at the moment, and will document a conclusion soon. Still this is a tech-preview, and your feedback helped a lot to get the different perspectives.

Daniel

danielwilms 2010-04-21 08:37

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Venemo (Post 619825)
Hi,

This may be the most idiot question ever, but...
MADDE is a cross-compiler, right?
So why isn't there any documentation about how to actually compile with it? I mean, without Qt Creator and stuff, to compile pure C and GTK applications.


Thanks to Sampo, you will find the example now here!

Daniel

Venemo 2010-04-21 10:49

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by danielwilms (Post 620623)
Thanks to Sampo, you will find the example now here!

Daniel

Thank you very much! :)
This is nice.

The next step would be getting MADDE to run the application on the device. Qt Creator is capable of it for Qt applications, but is there a way to do it manually?
(Without packaging and having to manually install the .deb on the N900, of course.)

If this is possible, I'd like to get Visual Studio to work with MADDE's compiler and run the application on the device.
If the above is possible, this will be an easy part.

A working debugger would also be great, but I think I'll manage without it.
(Even Qt Creator cant't debug the remote application.)

attila77 2010-04-21 10:49

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by danielwilms (Post 620511)
As you saw in the thread, you are referring to, the third party library support is not completely solved yet, besides pointing directly to the library in your *.pro file. At least this works for me. We are discussing different options at the moment, and will document a conclusion soon. Still this is a tech-preview, and your feedback helped a lot to get the different perspectives.

Apropos feedback, I exchanged a few mails with Tomi Ollila (not sure if he's active on the forum) with regard to maybe having a version/option of MADDE without the rootstrap+toolchain stuff, for use in Python projects - the benefit is being able to execute & package Python code from a desktop Python IDE (via plugins, for example), basically what PluThon does but without the Eclipse+Sbrsh tie-in.

sampppa 2010-04-21 11:48

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Venemo (Post 620801)
Thank you very much! :)
This is nice.

The next step would be getting MADDE to run the application on the device. Qt Creator is capable of it for Qt applications, but is there a way to do it manually?
(Without packaging and having to manually install the .deb on the N900, of course.)

If this is possible, I'd like to get Visual Studio to work with MADDE's compiler and run the application on the device.
If the above is possible, this will be an easy part.

A working debugger would also be great, but I think I'll manage without it.
(Even Qt Creator cant't debug the remote application.)

Check this:
http://wiki.maemo.org/MADDE/Device_runtime

rontti 2010-04-21 13:07

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Venemo (Post 619825)
Hi,

This may be the most idiot question ever, but...
MADDE is a cross-compiler, right?
So why isn't there any documentation about how to actually compile with it? I mean, without Qt Creator and stuff, to compile pure C and GTK applications.

Its quite simple. When you have MADDE installed you are able to
compile like this.

Code:

  mad gcc -o foo foo.c
If you have no default target you can do

Code:

  mad -t <target_name> gcc -o foo foo.c
If you have our own Makefile you can do

Code:

  mad -t <target_name> make
Note that when you are using GCC's -I and -L options
all paths that starts with / are redirected into the used sysroot.
Target defines the sysroot.

For example following

Code:

mad -I /usr/include/mydir/ gcc -o foo foo.c
turns to be

Code:

mad -I <sysroot>/usr/include/mydir/ gcc -o foo foo.c

And finally gtk example.

Code:

mad gcc -o foo foo.c `mad pkg-config --cflags --libs gtk+-2.0'
And if you wanne see what options are really called use -v option as a first gcc option

Code:

sec-094:~ savanain$  mad gcc -v -I /usr/include/kala -I lohi -o foo foo.c
 command: /Users/savanain/.madde/0.6.19/toolchains/arm-2009q1-203-arm-none-linux-gnueabi_mac/bin/arm-none-linux-gnueabi-gcc
 arg 0: /Users/savanain/.madde/0.6.19/toolchains/arm-2009q1-203-arm-none-linux-gnueabi_mac/bin/arm-none-linux-gnueabi-gcc
 arg 1: --sysroot=/Users/savanain/.madde/0.6.19/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/
 arg 2: -specs=/Users/savanain/.madde/0.6.19/targets/fremantle-qt-0951/specs
 arg 3: -v
 arg 4: -I
 arg 5: =usr/include/kala
 arg 6: -I
 arg 7: lohi
 arg 8: -o
 arg 9: foo
 arg 10: foo.c

Note that arg 1 and 2 are added.
arg 5 is modified. ( / is replaced by =)

Venemo 2010-04-21 15:20

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by sampppa (Post 620884)

I already have, but I only used it for Qt Creator.

It is nice to see that it is possible to use MADDE without it.

rontti 2010-04-21 15:37

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Venemo (Post 621154)
I already have, but I only used it for Qt Creator.

It is nice to see that it is possible to use MADDE without it.

The instruction behind link are not anyhow related on QT. They are pure MADDE instructions. You don't need QT creater when you follow those instructions.

Venemo 2010-04-21 19:23

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by rontti (Post 621172)
The instruction behind link are not anyhow related on QT. They are pure MADDE instructions. You don't need QT creater when you follow those instructions.

Yeah, but at first I didn't notice. :)
After Sampppa's post, I got it. :P

lamle 2010-04-25 13:30

Re: Technology Preview: MADDE
 
When I compile the application using madde, it cries about some error like this: IncludeChildElements is not a member of QXmlStreamReader, In my app, i use QXmlStreamReader::IncludeChildElements. I think this problem is because of old QT library, how to update it????

arne.anka 2010-04-25 18:10

Re: Technology Preview: MADDE
 
afaiu, qt4.6 is part of pr1.2 -- since pr1.2's release date is unbeknownst to man, you should try to workaround that and try another approach, that works with the older qt.

Venemo 2010-04-26 00:10

Re: Technology Preview: MADDE
 
QDomDocument is working fine for me with Qt 4.5 as well. Perhaps you could try that.

danielwilms 2010-04-26 07:34

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by lamle (Post 626985)
When I compile the application using madde, it cries about some error like this: IncludeChildElements is not a member of QXmlStreamReader, In my app, i use QXmlStreamReader::IncludeChildElements. I think this problem is because of old QT library, how to update it????

arne.anka is right, and this happens, because MADDE uses still 4.5 and not 4.6 yet as it is part of PR 1.2 and not of earlier releases. The point is, that if you would have already Qt 4.6 in MADDE, you would not be able to run the compiled code on your device.

In your case you don't have to use the constant value in Qt4.5, as this is the standard behaviour of the readElementText () function there.


Daniel

rontti 2010-04-26 09:54

Re: Technology Preview: MADDE
 
If you wanna play with madde source code see:

http://talk.maemo.org/showthread.php...071#post628071

rontti 2010-04-28 07:27

Re: Technology Preview: MADDE
 
Now you can have QT Creator and MADDE from one installation package
for Linux and Windows.

http://www.forum.nokia.com/Tools_Doc.../Nokia_Qt_SDK/

too 2010-04-28 09:43

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by rontti (Post 631039)
Now you can have QT Creator and MADDE from one installation package
for Linux and Windows.

http://www.forum.nokia.com/Tools_Doc.../Nokia_Qt_SDK/

After installing this, do

Code:

cd ~/NokiaQtSDK/Maemo/4.6.2
./bin/mad query all
ls -l cache


xando 2010-05-16 17:31

Re: Technology Preview: MADDE
 
Hi maybe it bit lame question, but.

My application depends on libqjson-dev. When I was using scrachbox to build(compile) it, I'd simple use apt-get tool to install it.

What I should do acquire the same effect using MADDE? I'm missing something?

gri 2010-05-16 17:34

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by xando (Post 661097)
Hi maybe it bit lame question, but.

My application depends on libqjson-dev. When I was using scrachbox to build(compile) it, I'd simple use apt-get tool to install it.

What I should do acquire the same effect using MADDE? I'm missing something?

I don't think there's currently an option for that :(

You could download the armel package from the repository and extract it by hand into the MADDE directories.

mwerle 2010-05-16 21:02

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by gri (Post 661101)
I don't think there's currently an option for that :(

You could download the armel package from the repository and extract it by hand into the MADDE directories.

This is what I did for the Nokia QT SDK (which contains MADDE). Works fine, but I raised a question as to whether there is a better (ie, official) way to do it with no replies so far.

See: http://talk.maemo.org/showthread.php?t=52761

Cheers,
- Micha.

Venemo 2010-05-17 10:01

Re: Technology Preview: MADDE
 
If you'd like to use Nokia Qt SDK, follow the steps in this thread on how to make it work with the device.

rontti 2010-05-28 11:22

Re: Technology Preview: MADDE
 
New MADDE release available
- PR1.2 sysroot
- Lot of fixs
- N900 emulator !!!

http://tablets-dev.nokia.com/MADDE.php

tvogel 2010-05-28 11:55

Re: Technology Preview: MADDE
 
Any news on installing third-party libs from the repository into MADDE?

too 2010-05-28 12:00

Re: Technology Preview: MADDE
 
Last time we discussed about this there was a plan
documenting steps to do sysroot for MADDE with
Platform SDK (i.e. using scratchbox).

tvogel 2010-05-28 12:06

Re: Technology Preview: MADDE
 
What about implementing a package import on the basis of MeeGo, i.e. maybe interfacing RPM? And maybe use alien to convert from deb to rpm? I would appreciate if one could avoid scratchbox...

too 2010-05-28 12:35

Re: Technology Preview: MADDE
 
braindamaged 'dpkg -i' could be implemented quite simply... but it is not
done by MADDE team (so far) as it 'taints' the sysroot.

rpm -i (for MADDE) has basically the same effort to make, it just
requires extracting the cpio instead of data.tar.gz (the 'housekeeping'
and setting of 'tainted' flag is about the same).

but these are just wild thoughts, but if anyone implements I could
give the 'thumbs up' to the implementation (not going to core madde
so easily, so that I can say 'WARRANTY VOID' (as if there were any;
but support is harder if we need to deal with 'tainted' systems) aloud.

JapieB 2010-05-28 17:37

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by rontti (Post 685349)
New MADDE release available
- PR1.2 sysroot
- Lot of fixs
- N900 emulator !!!

http://tablets-dev.nokia.com/MADDE.php

When I follow the instructions on http://wiki.maemo.org/MADDE/Qt_example I get an error when running make:


Code:

MADDE-0.6.72 ~
jbraam $ mad pscreate -l
TEMPLATE NAME    TYPE    DESCRIPTION
empty            prog    Empty project
lib_simple      lib      Simple example for C/C++ libraries
qt_simple        qtprog  Simple example for QT programs
simple          prog    Simple example for C/C++ programs

MADDE-0.6.72 ~
jbraam $ mad pscreate -t qt_simple qthello
Skeleton qthello, type=qtprog created

MADDE-0.6.72 ~
jbraam $ cd qthello

MADDE-0.6.72 ~/qthello
jbraam $ mad qmake

MADDE-0.6.72 ~/qthello
jbraam $ mad make
make: *** No rule to make target `../../../0.6.72/sysroots/fremantle-arm-sysroot
-10.2010.19-1-slim/usr/share/qt4/mkspecs/default/qmake.conf', needed by `Makefil
e'.  Stop.

MADDE-0.6.72 ~/qthello
jbraam $

What can I do to fix this?

Jaap

attila77 2010-05-28 17:42

Re: Technology Preview: MADDE
 
On a side note, will this update be pushed to the Nokia Qt SDK (=wait patiently) or should the more adventurous people try and replace it themselves ? :)

too 2010-05-28 18:48

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by attila77 (Post 686222)
On a side note, will this update be pushed to the Nokia Qt SDK (=wait patiently) or should the more adventurous people try and replace it themselves ? :)

It will. Soon.

Joorin 2010-05-28 18:53

Re: Technology Preview: MADDE
 
Not what you want but:

You fix it by not relying on auto-generated make files.

too 2010-05-28 19:09

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by JapieB (Post 686208)
When I follow the instructions on http://wiki.maemo.org/MADDE/Qt_example I get an error when running make:


Code:

MADDE-0.6.72 ~
jbraam $ mad pscreate -l
TEMPLATE NAME    TYPE    DESCRIPTION
empty            prog    Empty project
lib_simple      lib      Simple example for C/C++ libraries
qt_simple        qtprog  Simple example for QT programs
simple          prog    Simple example for C/C++ programs

MADDE-0.6.72 ~
jbraam $ mad pscreate -t qt_simple qthello
Skeleton qthello, type=qtprog created

MADDE-0.6.72 ~
jbraam $ cd qthello

MADDE-0.6.72 ~/qthello
jbraam $ mad qmake

MADDE-0.6.72 ~/qthello
jbraam $ mad make
make: *** No rule to make target `../../../0.6.72/sysroots/fremantle-arm-sysroot
-10.2010.19-1-slim/usr/share/qt4/mkspecs/default/qmake.conf', needed by `Makefil
e'.  Stop.

MADDE-0.6.72 ~/qthello
jbraam $

What can I do to fix this?

Jaap

Interesting problem; just downloaded and installed on home
windows 7 machine and did the same steps and it worked
(no surprise as our automated tests pass this)

So there must be something different in your environment..

Let's see... please try the following commands on madde terminal:

Code:

$ cd
$ pwd -W
$ cd /
$ pwd -W

and report output

JapieB 2010-05-28 19:13

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by too (Post 686469)
Interesting problem; just downloaded and installed on home
windows 7 machine and did the same steps and it worked
(no surprise as our automated tests pass this)

So there must be something different in your environment..

Let's see... please try the following commands on madde terminal:

Code:

$ cd
$ pwd -W
$ cd /
$ pwd -W

and report output


Code:

MADDE-0.6.72 ~/qthello
jbraam $ cd

MADDE-0.6.72 ~
jbraam $ pwd -W
D:/MADDE/home/jbraam

MADDE-0.6.72 ~
jbraam $ cd /

MADDE-0.6.72 /
jbraam $ pwd -W
D:/MADDE/0.6.72

MADDE-0.6.72 /
jbraam $


too 2010-05-28 19:28

Re: Technology Preview: MADDE
 
I created basically identical paths myself and it still works (which is good
as the bug would have been severe...)

now cd back to 'qthello' -directory. then try the following commands:

Code:

ls ..
ls ../..
ls ../../..
ls ../../../0.6.72/
ls ../../../0.6.72/sysroots/
...
ls ../../../0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/share/qt4/mkspecs/default/qmake.conf'

and show the output of last successful command.

JapieB 2010-05-28 19:37

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by too (Post 686526)
I created basically identical paths myself and it still works (which is good
as the bug would have been severe...)

now cd back to 'qthello' -directory. then try the following commands:

Code:

ls ..
ls ../..
ls ../../..
ls ../../../0.6.72/
ls ../../../0.6.72/sysroots/
...
ls ../../../0.6.72/sysroots/fremantle-arm-sysroot-10.2010.19-1-slim/usr/share/qt4/mkspecs/default/qmake.conf'

and show the output of last successful command.

Code:

MADDE-0.6.72 ~/qthello
jbraam $ ls ..
qthello  qtprog-build

MADDE-0.6.72 ~/qthello
jbraam $ ls ../..
jbraam

MADDE-0.6.72 ~/qthello
jbraam $ ls ../../..
MADDE.url  doc  legal  madbin    maddedoc.ico    moveusrdata.sh  perllocal.pod      run      share    templates  uninst.exe  wbin
bin        docs  lib    madde.bat  madlib          msys.bat        postinstall.done    runtimes  sysroots  toolchains  usbdriver
cache      etc  m.ico  madde.ico  moveusrdata.bat  msys.ico        rminstallation.bat  sbin      targets  tools      var

MADDE-0.6.72 ~/qthello
jbraam $ ls ../../../0.6.72/
ls: ../../../0.6.72/: No such file or directory

MADDE-0.6.72 ~/qthello
jbraam $

Looks like ../../.. maps to ../../../0.6.72/

After more investigations:

When I replace '../../../0.6.72/sysroots' by '/sysroots' in the makefile generated by qmake the project builds!

Any idea where the ../../../0.6.72 used by 'mad qmake' is coming from?

too 2010-05-29 07:48

Re: Technology Preview: MADDE
 
I just realized something... nasty one...

I'm not close to any windows machine now so I cannot test.

To get something done, in MADDE terminal, do first:

cd /d/temp

(and create stuff there)... any other directory works also, provided
there is no whitespaces in it's path.

EDIT: yes, I have idea. there is /home remapping in /etc/fstab
(in MSYS context) which breaks things. And we did not realise
the problem this particular case brings up.

too 2010-05-29 08:14

Re: Technology Preview: MADDE
 
JapieB (and anyone else having the same problem)

open MADDE terminal and enter:

Code:

echo > /etc/fstab
This removes the /home -mapping and makes things work.

Notice that /home moves one deeper in directory hierarchy,

from <MADDE>/home to <MADDE>/0.6.72/home

where <MADDE>/0.6.72 equals '/' in MSYS context.

new home directory is created when new MADDE terminal
is opened

JapieB 2010-05-29 09:09

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by too (Post 687526)
Code:

echo > /etc/fstab

Fixed! the example can be executed fully now!

Thanx,

Jaap

ETalvala 2010-06-04 21:00

Re: Technology Preview: MADDE
 
I just upgraded MADDE to the latest version, and the MADDE terminal now opens to my Windows user directory: C:\Users\talvala, instead of under MADDE:

Code:

MADDE-0.6.72 ~
talvala $ cd

MADDE-0.6.72 ~
talvala $ pwd
/c/Users/talvala

And trying to build the qthello example results in the same problem as people have been seeing, even after the 'echo > /etc/fstab' fix:

Code:

MADDE-0.6.72 ~/Repositories/tmp/qthello
talvala $ mad qmake

MADDE-0.6.72 ~/Repositories/tmp/qthello
talvala $ mad make
make: *** No rule to make target `../../../Users/talvala/Repositories/tmp/qthello/qtprog.pro', needed by `../../../Users/talvala/Repositories/tmp/qthello/Makefile'.  Stop.

Any idea what broke in the installation? I've tried uninstalling MADDE completely and reinstalling, with no change in the result. This is Windows 7 x64.

Joorin 2010-06-05 08:26

Re: Technology Preview: MADDE
 
If you read what make tells you, No rule to make target, this means that there is a dependency that can not be satisfied with either rules in the makefile or the built in rules.

Find the qtprog.pro file and place it in the build tree at a location where it matches the rule in the makefile.

ETalvala 2010-06-05 18:35

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Joorin (Post 700757)
If you read what make tells you, No rule to make target, this means that there is a dependency that can not be satisfied with either rules in the makefile or the built in rules.

Find the qtprog.pro file and place it in the build tree at a location where it matches the rule in the makefile.

The .pro file is in the same directory as the Makefile, and since qmake generated the Makefile from the .pro file, it should get the path right on its own.

Essentially, it's prepending a huge roundabout directory path in front of files inside the project, completely unneccessarily. If I manually remove the lengthy ../../../Users/talvala/Repositories/tmp/qthello/ section from all paths in the Makefile, it works fine. But that gets tedious very quickly, and qmake shouldn't be doing such a thing in any case - why doesn't it just encode the local relative paths, instead of what looks like an attempt to round-trip through 5 layers of directories?


All times are GMT. The time now is 11:43.

vBulletin® Version 3.8.8