mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Schenk, Gavin" <G.Schenk@eckelmann.de>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] qmake broken after ptxdist version switch?
Date: Wed, 4 Dec 2013 07:52:57 +0000	[thread overview]
Message-ID: <D415CD2EC4182C4EAB90A76B7D9F16DCEADEE819@EX-DAG02.eckelmann.group> (raw)
In-Reply-To: <trinity-5a786e73-5a0a-431f-a9aa-2acbbbebb55c-1386059874969@3capp-gmx-bs57>

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

  reply	other threads:[~2013-12-04  7:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21  9:55 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 [this message]
2013-12-04  8:37                     ` Jürgen Beisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D415CD2EC4182C4EAB90A76B7D9F16DCEADEE819@EX-DAG02.eckelmann.group \
    --to=g.schenk@eckelmann.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox