mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] qmake broken after ptxdist version switch?
@ 2013-10-21  9:55 Markus Wolters
  2013-10-21 10:39 ` Jürgen Beisert
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Wolters @ 2013-10-21  9:55 UTC (permalink / raw)
  To: ptxdist

Hello everyone,

I've just switched my ptxdist version from 2012.03.0 to 2013.01.0. When I try to build a qt4 project which build before without any problems, I now get two warnings regarding ld:

/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libdbus-1.so.3, needed by /home/apollon/ptxdist_V002/platform-phyCORE-AM335x/sysroot-target/usr/lib/libQtDBus.so, not found (try using -rpath or -rpath-link)
/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa8-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/lib/gcc/arm-cortexa8-linux-gnueabihf/4.7.3/../../../../arm-cortexa8-linux-gnueabihf/bin/ld: warning: libz.so.1, needed by /home/apollon/ptxdist_V002/platform-phyCORE-AM335x/sysroot-target/usr/lib/libQtNetwork.so, not found (try using -rpath or -rpath-link)

Does anyone have an idea what I'm doing wrong/ how to fix this?

Regards Markus

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-21  9:55 [ptxdist] qmake broken after ptxdist version switch? Markus Wolters
@ 2013-10-21 10:39 ` Jürgen Beisert
  2013-10-21 11:19   ` Markus Wolters
  0 siblings, 1 reply; 14+ messages in thread
From: Jürgen Beisert @ 2013-10-21 10:39 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Wolters

Hi Markus,

On Monday 21 October 2013 11:55:21 Markus Wolters wrote:
> [...]
> Does anyone have an idea what I'm doing wrong/ how to fix this?

Did you re-build the whole project after the PTXdist version switch?

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-21 10:39 ` Jürgen Beisert
@ 2013-10-21 11:19   ` Markus Wolters
  2013-10-21 13:26     ` Tim Sander
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Wolters @ 2013-10-21 11:19 UTC (permalink / raw)
  To: ptxdist

Yes, I did. 
I just figured out, that providing the necessary libs in my pro file fix the problem. But that can't be the right way to fix it, I think?! And it seems to be no qmake problem...

> Gesendet: Montag, 21. Oktober 2013 um 12:39 Uhr
> Von: "Jürgen Beisert" <jbe@pengutronix.de>
> An: ptxdist@pengutronix.de
> Cc: "Markus Wolters" <MarkusWolters@gmx.de>
> Betreff: Re: [ptxdist] qmake broken after ptxdist version switch?
>
> Hi Markus,
> 
> On Monday 21 October 2013 11:55:21 Markus Wolters wrote:
> > [...]
> > Does anyone have an idea what I'm doing wrong/ how to fix this?
> 
> Did you re-build the whole project after the PTXdist version switch?
> 
> Regards,
> Juergen
> 
> -- 
> Pengutronix e.K.                              | Juergen Beisert             |
> Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-21 11:19   ` Markus Wolters
@ 2013-10-21 13:26     ` Tim Sander
  2013-10-24  8:49       ` Michael Olbrich
  0 siblings, 1 reply; 14+ messages in thread
From: Tim Sander @ 2013-10-21 13:26 UTC (permalink / raw)
  To: ptxdist

Hi

Please no TOFU quoting.

Am Montag, 21. Oktober 2013, 13:19:46 schrieb Markus Wolters:
> Yes, I did.
> I just figured out, that providing the necessary libs in my pro file fix the
> problem. But that can't be the right way to fix it, I think?! And it seems
> to be no qmake problem...
I think the older qt mkspecs got their include path patched. This changed 
somehow in newer qt versions. So you might need to restore the old behavior 
by copying the old rules sed statement to the new file or add some ptxdist env 
variables.

I have no idea why the pengutronix guys changed the behavior. But i think its 
annoying as you can't just use the right qmake and be happy without env vars.

Best regards
Tim

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-21 13:26     ` Tim Sander
@ 2013-10-24  8:49       ` Michael Olbrich
  2013-10-24 12:10         ` Markus Wolters
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Olbrich @ 2013-10-24  8:49 UTC (permalink / raw)
  To: ptxdist

Hi,

On Mon, Oct 21, 2013 at 03:26:22PM +0200, Tim Sander wrote:
> Am Montag, 21. Oktober 2013, 13:19:46 schrieb Markus Wolters:
> > Yes, I did.
> > I just figured out, that providing the necessary libs in my pro file fix the
> > problem. But that can't be the right way to fix it, I think?! And it seems
> > to be no qmake problem...
> I think the older qt mkspecs got their include path patched. This changed 
> somehow in newer qt versions. So you might need to restore the old behavior 
> by copying the old rules sed statement to the new file or add some ptxdist env 
> variables.
> 
> I have no idea why the pengutronix guys changed the behavior. But i think its 
> annoying as you can't just use the right qmake and be happy without env vars.

Are you talking about building Qt project outside PTXdist? If that is the
case then you need to use <BSP>/platform-<something>/sysroot-host/lib/wrapper
in PATH instead of the toolchain.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-24  8:49       ` Michael Olbrich
@ 2013-10-24 12:10         ` Markus Wolters
  2013-10-24 22:11           ` Michael Olbrich
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Wolters @ 2013-10-24 12:10 UTC (permalink / raw)
  To: ptxdist

Hello Michael,

I though choosing the right toolchain isn't "my problem", as I use the ptxdist g++ specs:
".../sysroot-cross/bin/qmake $1 -spec .../sysroot-target/usr/mkspecs/qws/linux-ptx-g++ -r"
Wouldn't it be better to fix it at that point?

Markus



> Gesendet: Donnerstag, 24. Oktober 2013 um 10:49 Uhr
> Von: "Michael Olbrich" <m.olbrich@pengutronix.de>
> An: ptxdist@pengutronix.de
> Betreff: Re: [ptxdist] qmake broken after ptxdist version switch?
>
> Hi,
> 
> On Mon, Oct 21, 2013 at 03:26:22PM +0200, Tim Sander wrote:
> > Am Montag, 21. Oktober 2013, 13:19:46 schrieb Markus Wolters:
> > > Yes, I did.
> > > I just figured out, that providing the necessary libs in my pro file fix the
> > > problem. But that can't be the right way to fix it, I think?! And it seems
> > > to be no qmake problem...
> > I think the older qt mkspecs got their include path patched. This changed 
> > somehow in newer qt versions. So you might need to restore the old behavior 
> > by copying the old rules sed statement to the new file or add some ptxdist env 
> > variables.
> > 
> > I have no idea why the pengutronix guys changed the behavior. But i think its 
> > annoying as you can't just use the right qmake and be happy without env vars.
> 
> Are you talking about building Qt project outside PTXdist? If that is the
> case then you need to use <BSP>/platform-<something>/sysroot-host/lib/wrapper
> in PATH instead of the toolchain.
> 
> Michael
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-24 12:10         ` Markus Wolters
@ 2013-10-24 22:11           ` Michael Olbrich
  2013-10-26 12:14             ` Markus Wolters
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Olbrich @ 2013-10-24 22:11 UTC (permalink / raw)
  To: ptxdist

Hi,

On Thu, Oct 24, 2013 at 02:10:47PM +0200, Markus Wolters wrote:
> I though choosing the right toolchain isn't "my problem", as I use the ptxdist g++ specs:
> ".../sysroot-cross/bin/qmake $1 -spec .../sysroot-target/usr/mkspecs/qws/linux-ptx-g++ -r"
> Wouldn't it be better to fix it at that point?

No. The mkspecs only handle things for Qt. The wrapper fix it for everything.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-24 22:11           ` Michael Olbrich
@ 2013-10-26 12:14             ` Markus Wolters
  2013-10-28  8:18               ` Schenk, Gavin
  0 siblings, 1 reply; 14+ messages in thread
From: Markus Wolters @ 2013-10-26 12:14 UTC (permalink / raw)
  To: ptxdist

Hi,

> No. The mkspecs only handle things for Qt. The wrapper fix it for everything.

unfortunately your solution didn't work for me. I've changed PATH and "which arm-cortexa8-linux-gnueabihf-ld" shows the wrapper path, but the libs still can't be found.

Markus

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-26 12:14             ` Markus Wolters
@ 2013-10-28  8:18               ` Schenk, Gavin
  2013-11-04  7:38                 ` Markus Wolters
  2013-12-03  8:37                 ` Markus Wolters
  0 siblings, 2 replies; 14+ messages in thread
From: Schenk, Gavin @ 2013-10-28  8:18 UTC (permalink / raw)
  To: ptxdist

Hi Markus,

in order to build and debug QT-Projects outside ptxdist I use a small script to start QT-Creator.
I named the script start_creator.sh and put it into the ptxdist-project.

<content start_creator.sh>
#!/bin/bash

export PTXDIST_CROSS_CPPFLAGS=$(./p print PTXDIST_CROSS_CPPFLAGS)
export PTXDIST_CROSS_LDFLAGS=$(./p print PTXDIST_CROSS_LDFLAGS)
export PTXDIST_PLATFORMCONFIG=$(./p print PTXDIST_PLATFORMCONFIG)
export PATH=$(./p print PTXDIST_PLATFORMDIR)/sysroot-host/lib/wrapper/:$PATH

echo $PATH
echo $PTXDIST_CROSS_CPPFLAGS
echo $PTXDIST_CROSS_LDFLAGS
echo $PTXDIST_PLATFORMCONFIG

/opt/qtcreator-2.8.1/bin/qtcreator
</content start_creator.sh>

Things you have to concern are:
 - Start your creator using this script
 - Build a Kit using the gcc from the wrapper path "e.g.: /var/projects/xxx/platform-xyz/sysroot-host/lib/wrapper " and the qmake from your projects sysroot-cross.

constraints:
You do not see the real gcc name when building your project caused by the wrapper ( You´ll see g++ instead of e.g. arm-v5te-linux-gnueabi-g++ )
You cannot chose the creator version yet, feel free to expand my script and send it back to me :)

I hope this will help you.

Regards
Gavin Schenk
Dipl.-Inform. (FH)
Entwicklung
Customized Automation Systems

Eckelmann AG
Berliner Str. 161, 65205 Wiesbaden
Telefon +49 611 7103-258   Fax +49 611 7103-133
g.schenk@eckelmann.de   www.eckelmann.de

Eckelmann Group - Source of inspiration
Eckelmann AG
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
http://www.eckelmann.de

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-28  8:18               ` Schenk, Gavin
@ 2013-11-04  7:38                 ` Markus Wolters
  2013-11-04  8:17                   ` Schenk, Gavin
  2013-12-03  8:37                 ` Markus Wolters
  1 sibling, 1 reply; 14+ messages in thread
From: Markus Wolters @ 2013-11-04  7:38 UTC (permalink / raw)
  To: ptxdist

Guten Morgen Gavin,

entschuldige, dass ich Dich direkt anschreibe, aber ich hoffe die Kommunikation geht so etwas flüssiger :-)

Wo bekomme ich denn den "./p print " Part von Dir her? Bei mir läuft das Script so leider nicht.

Danke schon Mal,
Markus



> Gesendet: Montag, 28. Oktober 2013 um 09:18 Uhr
> Von: "Schenk, Gavin" <G.Schenk@eckelmann.de>
> An: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
> Betreff: Re: [ptxdist] qmake broken after ptxdist version switch?
>
> Hi Markus,
> 
> in order to build and debug QT-Projects outside ptxdist I use a small script to start QT-Creator.
> I named the script start_creator.sh and put it into the ptxdist-project.
> 
> <content start_creator.sh>
> #!/bin/bash
> 
> export PTXDIST_CROSS_CPPFLAGS=$(./p print PTXDIST_CROSS_CPPFLAGS)
> export PTXDIST_CROSS_LDFLAGS=$(./p print PTXDIST_CROSS_LDFLAGS)
> export PTXDIST_PLATFORMCONFIG=$(./p print PTXDIST_PLATFORMCONFIG)
> export PATH=$(./p print PTXDIST_PLATFORMDIR)/sysroot-host/lib/wrapper/:$PATH
> 
> echo $PATH
> echo $PTXDIST_CROSS_CPPFLAGS
> echo $PTXDIST_CROSS_LDFLAGS
> echo $PTXDIST_PLATFORMCONFIG
> 
> /opt/qtcreator-2.8.1/bin/qtcreator
> </content start_creator.sh>
> 
> Things you have to concern are:
>  - Start your creator using this script
>  - Build a Kit using the gcc from the wrapper path "e.g.: /var/projects/xxx/platform-xyz/sysroot-host/lib/wrapper " and the qmake from your projects sysroot-cross.
> 
> constraints:
> You do not see the real gcc name when building your project caused by the wrapper ( You´ll see g++ instead of e.g. arm-v5te-linux-gnueabi-g++ )
> You cannot chose the creator version yet, feel free to expand my script and send it back to me :)
> 
> I hope this will help you.
> 
> Regards
> Gavin Schenk
> Dipl.-Inform. (FH)
> Entwicklung
> Customized Automation Systems
> 
> Eckelmann AG
> Berliner Str. 161, 65205 Wiesbaden
> Telefon +49 611 7103-258   Fax +49 611 7103-133
> g.schenk@eckelmann.de   www.eckelmann.de
> 
> Eckelmann Group - Source of inspiration
> Eckelmann AG
> Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
> Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
> Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
> Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
> http://www.eckelmann.de
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-11-04  7:38                 ` Markus Wolters
@ 2013-11-04  8:17                   ` Schenk, Gavin
  0 siblings, 0 replies; 14+ messages in thread
From: Schenk, Gavin @ 2013-11-04  8:17 UTC (permalink / raw)
  To: ptxdist

Hi Markus,

sorry my mistake, I did not explain my example adequately. I answer in english, maybe others need the extra information, too.

I assume, that you put the script "start_creator.sh" into the top directory of your ptxdist project.
In our projects we create a symbolic link to the correct ptxdist version and name this link "p".

<snip>
gschenk@vm621deb-1:~/projects/prodos3/ptxdist$ ls -la
...
lrwxrwxrwx  1 gschenk users    34 Mär 15  2013 p -> /opt/ptxdist/bin/ptxdist-2013.03.0
...
</snip>

The "./p" print of "start_creator.sh" can be replaced by "/opt/ptxdist/bin/ptxdist-XXXX.YY.Z print" (put inyour ptxdist version for XXXX, YY, Z), or you create the link "p" too.

The "print" is just an option to ptxdist. ptxdist --help says:
...
print <var>                     print the contents of a variable, in the way
                                it is known by "make"
...

I hope this helps, good luck!

Best Regards
Gavin Schenk

> -----Original Message-----
> From: ptxdist-bounces@pengutronix.de [mailto:ptxdist-
> bounces@pengutronix.de] On Behalf Of Markus Wolters
> Sent: Monday, November 04, 2013 8:39 AM
> To: ptxdist@pengutronix.de
> Subject: Re: [ptxdist] qmake broken after ptxdist version switch?
>
> Guten Morgen Gavin,
>
> entschuldige, dass ich Dich direkt anschreibe, aber ich hoffe die
> Kommunikation geht so etwas flüssiger :-)
>
> Wo bekomme ich denn den "./p print " Part von Dir her? Bei mir läuft das
> Script so leider nicht.
>
> Danke schon Mal,
> Markus
>
>
Eckelmann AG
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
http://www.eckelmann.de
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-10-28  8:18               ` Schenk, Gavin
  2013-11-04  7:38                 ` Markus Wolters
@ 2013-12-03  8:37                 ` Markus Wolters
  2013-12-04  7:52                   ` Schenk, Gavin
  1 sibling, 1 reply; 14+ messages in thread
From: Markus Wolters @ 2013-12-03  8:37 UTC (permalink / raw)
  To: ptxdist

Thank you Gavin,

your solution solved my general library problem. 
Unfortuantely, the next problem arise right after that. My project consist of own libs and executables, but at linking stage the own build libs are not known anymore (unknown reference). Does this make any sense anyone of you?

Regards Markus



> Gesendet: Montag, 28. Oktober 2013 um 09:18 Uhr
> Von: "Schenk, Gavin" <G.Schenk@eckelmann.de>
> An: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
> Betreff: Re: [ptxdist] qmake broken after ptxdist version switch?
>
> Hi Markus,
> 
> in order to build and debug QT-Projects outside ptxdist I use a small script to start QT-Creator.
> I named the script start_creator.sh and put it into the ptxdist-project.
> 
> <content start_creator.sh>
> #!/bin/bash
> 
> export PTXDIST_CROSS_CPPFLAGS=$(./p print PTXDIST_CROSS_CPPFLAGS)
> export PTXDIST_CROSS_LDFLAGS=$(./p print PTXDIST_CROSS_LDFLAGS)
> export PTXDIST_PLATFORMCONFIG=$(./p print PTXDIST_PLATFORMCONFIG)
> export PATH=$(./p print PTXDIST_PLATFORMDIR)/sysroot-host/lib/wrapper/:$PATH
> 
> echo $PATH
> echo $PTXDIST_CROSS_CPPFLAGS
> echo $PTXDIST_CROSS_LDFLAGS
> echo $PTXDIST_PLATFORMCONFIG
> 
> /opt/qtcreator-2.8.1/bin/qtcreator
> </content start_creator.sh>
> 
> Things you have to concern are:
>  - Start your creator using this script
>  - Build a Kit using the gcc from the wrapper path "e.g.: /var/projects/xxx/platform-xyz/sysroot-host/lib/wrapper " and the qmake from your projects sysroot-cross.
> 
> constraints:
> You do not see the real gcc name when building your project caused by the wrapper ( You´ll see g++ instead of e.g. arm-v5te-linux-gnueabi-g++ )
> You cannot chose the creator version yet, feel free to expand my script and send it back to me :)
> 
> I hope this will help you.
> 
> Regards
> Gavin Schenk
> Dipl.-Inform. (FH)
> Entwicklung
> Customized Automation Systems
> 
> Eckelmann AG
> Berliner Str. 161, 65205 Wiesbaden
> Telefon +49 611 7103-258   Fax +49 611 7103-133
> g.schenk@eckelmann.de   www.eckelmann.de
> 
> Eckelmann Group - Source of inspiration
> Eckelmann AG
> Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
> Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
> Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
> Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
> http://www.eckelmann.de
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-12-03  8:37                 ` Markus Wolters
@ 2013-12-04  7:52                   ` Schenk, Gavin
  2013-12-04  8:37                     ` Jürgen Beisert
  0 siblings, 1 reply; 14+ messages in thread
From: Schenk, Gavin @ 2013-12-04  7:52 UTC (permalink / raw)
  To: ptxdist

Hi Markus,

I give it a try. Let´s say you have two packages:

        MYEXECUTABLE
        MYLIBRARY

Both packages come with its own rule/makefile in the rules subfolder of your project.
MYEXECUTABLE builds an executable that depends on the library MYLIBRARY.

First of all you have to describe this dependency in MYEXECUTABLE.in with a line "SELECT MYLIBRARY". As a result of this, MYLIBRARY is build before MYEXECUTABLE.

Secondly, and that maybe solve your problem, you have to install the libraries build by MYLIBRARY in install step (not targetinstall!!!) into the folder $(PTXDIST_SYSROOT_TARGET)/usr/lib or $(PTXDIST_SYSROOT_TARGET)/lib. This is the place the linker searches libraries when linking. In this stage you should copy needed include files to e.g. $(PTXDIST_SYSROOT_TARGET)/usr/include, too.

If you do this correctly you can just use the library seamless in your projects.

1.) Use #include <MYLIBRARY.h> in your code
2.) The linker magically finds your library.

Here an example of an target step.

$(STATEDIR)/qextserialport.install:
        @$(call targetinfo)
        cp $(QEXTSERIALPORT_DIR)/src/build/libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/
        ln -f -s libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/libqextserialport.so.1.2
        ln -f -s libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/libqextserialport.so.1
        ln -f -s libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/libqextserialport.so

        mkdir -p $(PTXDIST_SYSROOT_TARGET)/usr/include/qextserialport

        cp $(QEXTSERIALPORT_DIR)/src/*.h $(PTXDIST_SYSROOT_TARGET)/usr/include/qextserialport/

        @$(call touch)

@Gurus: Is there a better, smarter way to achive this, like install_lib?

Best regards
Gavin

> -----Original Message-----
> From: ptxdist-bounces@pengutronix.de [mailto:ptxdist-
> bounces@pengutronix.de] On Behalf Of Markus Wolters
> Sent: Tuesday, December 03, 2013 9:38 AM
> To: ptxdist@pengutronix.de
> Subject: Re: [ptxdist] qmake broken after ptxdist version switch?
>
> Thank you Gavin,
>
> your solution solved my general library problem.
> Unfortuantely, the next problem arise right after that. My project consist
> of own libs and executables, but at linking stage the own build libs are
> not known anymore (unknown reference). Does this make any sense anyone of
> you?
>
> Regards Markus
>
>
>
> > Gesendet: Montag, 28. Oktober 2013 um 09:18 Uhr
> > Von: "Schenk, Gavin" <G.Schenk@eckelmann.de>
> > An: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
> > Betreff: Re: [ptxdist] qmake broken after ptxdist version switch?
> >
> > Hi Markus,
> >
> > in order to build and debug QT-Projects outside ptxdist I use a small
> script to start QT-Creator.
> > I named the script start_creator.sh and put it into the ptxdist-project.
> >
> > <content start_creator.sh>
> > #!/bin/bash
> >
> > export PTXDIST_CROSS_CPPFLAGS=$(./p print PTXDIST_CROSS_CPPFLAGS)
> > export PTXDIST_CROSS_LDFLAGS=$(./p print PTXDIST_CROSS_LDFLAGS)
> > export PTXDIST_PLATFORMCONFIG=$(./p print PTXDIST_PLATFORMCONFIG)
> > export PATH=$(./p print PTXDIST_PLATFORMDIR)/sysroot-
> host/lib/wrapper/:$PATH
> >
> > echo $PATH
> > echo $PTXDIST_CROSS_CPPFLAGS
> > echo $PTXDIST_CROSS_LDFLAGS
> > echo $PTXDIST_PLATFORMCONFIG
> >
> > /opt/qtcreator-2.8.1/bin/qtcreator
> > </content start_creator.sh>
> >
> > Things you have to concern are:
> >  - Start your creator using this script
> >  - Build a Kit using the gcc from the wrapper path "e.g.:
> /var/projects/xxx/platform-xyz/sysroot-host/lib/wrapper " and the qmake
> from your projects sysroot-cross.
> >
> > constraints:
> > You do not see the real gcc name when building your project caused by the
> wrapper ( You´ll see g++ instead of e.g. arm-v5te-linux-gnueabi-g++ )
> > You cannot chose the creator version yet, feel free to expand my script
> and send it back to me :)
> >
> > I hope this will help you.
> >
> > Regards
> > Gavin Schenk
> > Dipl.-Inform. (FH)
> > Entwicklung
> > Customized Automation Systems
> >
> > Eckelmann AG
> > Berliner Str. 161, 65205 Wiesbaden
> > Telefon +49 611 7103-258   Fax +49 611 7103-133
> > g.schenk@eckelmann.de   www.eckelmann.de
> >
> > Eckelmann Group - Source of inspiration
> > Eckelmann AG
> > Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
> > Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
> > Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
> > Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht
> Wiesbaden HRB 12636
> > http://www.eckelmann.de
> >
> > --
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> >
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
Eckelmann AG
Vorstand: Dr.-Ing. Gerd Eckelmann (Vorsitzender)
Dr.-Ing. Peter Cordes, Dr.-Ing. Frank-Thomas Mellert
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
http://www.eckelmann.de
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ptxdist] qmake broken after ptxdist version switch?
  2013-12-04  7:52                   ` Schenk, Gavin
@ 2013-12-04  8:37                     ` Jürgen Beisert
  0 siblings, 0 replies; 14+ messages in thread
From: Jürgen Beisert @ 2013-12-04  8:37 UTC (permalink / raw)
  To: ptxdist; +Cc: Schenk, Gavin

Hi Gavin,

On Wednesday 04 December 2013 08:52:57 Schenk, Gavin wrote:
> [...]
> Here an example of an target step.
>
> $(STATEDIR)/qextserialport.install:
>         @$(call targetinfo)
>         cp $(QEXTSERIALPORT_DIR)/src/build/libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/
>         ln -f -s libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/libqextserialport.so.1.2
>         ln -f -s libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/libqextserialport.so.1
>         ln -f -s libqextserialport.so.1.2.0 $(PTXDIST_SYSROOT_TARGET)/usr/lib/libqextserialport.so
>
>         mkdir -p $(PTXDIST_SYSROOT_TARGET)/usr/include/qextserialport
>
>         cp $(QEXTSERIALPORT_DIR)/src/*.h $(PTXDIST_SYSROOT_TARGET)/usr/include/qextserialport/
>
>         @$(call touch)
>
> @Gurus: Is there a better, smarter way to achive this, like install_lib?

If the library's buildsystem is based on the autotools, it will
work "magically" as well...

$ ptxdist newpackage src-autoconf-lib

provides such a package.

Regards,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-12-04  8:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21  9:55 [ptxdist] qmake broken after ptxdist version switch? Markus Wolters
2013-10-21 10:39 ` Jürgen Beisert
2013-10-21 11:19   ` Markus Wolters
2013-10-21 13:26     ` Tim Sander
2013-10-24  8:49       ` Michael Olbrich
2013-10-24 12:10         ` Markus Wolters
2013-10-24 22:11           ` Michael Olbrich
2013-10-26 12:14             ` Markus Wolters
2013-10-28  8:18               ` Schenk, Gavin
2013-11-04  7:38                 ` Markus Wolters
2013-11-04  8:17                   ` Schenk, Gavin
2013-12-03  8:37                 ` Markus Wolters
2013-12-04  7:52                   ` Schenk, Gavin
2013-12-04  8:37                     ` Jürgen Beisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox