From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1eidef-0007fr-PN for ptxdist@pengutronix.de; Mon, 05 Feb 2018 11:05:42 +0100 Received: by mail-wr0-x234.google.com with SMTP id s5so28955772wra.0 for ; Mon, 05 Feb 2018 02:05:41 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180202154617.vibuekjswifjp6ih@pengutronix.de> References: <20180202154617.vibuekjswifjp6ih@pengutronix.de> From: Guillermo Rodriguez Garcia Date: Mon, 5 Feb 2018 11:05:40 +0100 Message-ID: Subject: Re: [ptxdist] mediastreamer2: Bad search path when relinking library List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============0570971413==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============0570971413== Content-Type: multipart/alternative; boundary="f403045de7a858356f0564743497" --f403045de7a858356f0564743497 Content-Type: text/plain; charset="UTF-8" Hi, 2018-02-02 16:46 GMT+01:00 Michael Olbrich : > Hi, > > On Fri, Feb 02, 2018 at 11:59:03AM +0100, Guillermo Rodriguez Garcia wrote: > > I am trying to create a ptxdist package for mediastreamer2. By default, > > releases come without a configure script, and with an autogen.sh that > > requires intltoolize. > > > > So I first tried the following: > > > > In mediastreamer2.in: > > > > select HOST_INTLTOOL > > > > In mediasteamer2.make: > > > > $(STATEDIR)/mediastreamer2.extract: > > @$(call targetinfo) > > @$(call clean, $(MEDIASTREAMER2_DIR)) > > @$(call extract, MEDIASTREAMER2) > > cd $(MEDIASTREAMER2_DIR) && [ -f configure ] || sh autogen.sh > > @$(call patchin, MEDIASTREAMER2) > > @$(call touch) > > > > However, this does not work because apparently ptxdist resolves > > dependencies after the extract stage, so when autogen.sh is run, the > > host-intltool package has not been installed yet. > > > > So I tried to run autogen.sh from the extract.post stage instead: > > > > $(STATEDIR)/mediastreamer2.extract.post: > > @$(call targetinfo) > > cd $(MEDIASTREAMER2_DIR) && [ -f configure ] || sh autogen.sh > > I'm guessing you got that from the latest src-autoconf template. This is > still broken. It's missing the actual extract.post command: > No, I actually made that up myself, based on the documentation. The manual mentions [1] that extract.post is a good place to "generate a configure script out of an autotoolized configure.ac file for example", so that's what I tried. Also the manual does not document any default rule when extract.post is omitted (whereas it does so for other stages). So I didn't know that I had to call world/patchin/post from my custom extract.post rule. [1]: https://ptxdist.org/doc/ref_manual.html#extract-post-stage-default-rule > > @$(call world/patchin/post, @PACKAGE@) > > > @$(call touch) > > > > This way, host-intltool is installed before autogen.sh is run, so that > part > > work. But this creates other problems: The install stage fails when > trying > > to relink some libraries. > > > > What is the proper way to do this? > > The template whre you got this from is for packages where the source is > part of your BSP. I don't think this is the case for mediasteamer2. You > should use the 'target' new-package template. > > For most packages the tarball contains the configure script. In that case > nothing special need to happen. If the configure script is missing, then > you need to create a autogen.sh link. > e.g. like the libyaml package in PTXdist does this with > patches/libyaml-0.1.7/autogen.sh. > Actually the mediastreamer2 package comes with its own autogen.sh script. That's why I am running cd $(MEDIASTREAMER2_DIR) && [ -f configure ] || sh autogen.sh Is that correct? I guess that if there's an autogen.sh script in the package, that should normally be used in preference to the generic ptxdist version. Right? Thanks, Guillermo --f403045de7a858356f0564743497 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

2018-02-02 16:46 GMT+01:00 Michael Olbrich <m.olbrich@pengut= ronix.de>:
Hi,

On Fri, Feb 02, 2018 at 11:59:03AM +0100, Guillermo Rodriguez Garcia wrote:=
> I am trying to create a ptxdist package for mediastreamer2. By default= ,
> releases come without a configure script, and with an autogen.sh that<= br> > requires intltoolize.
>
> So I first tried the following:
>
> In mediastreamer2.in:
>
> select HOST_INTLTOOL
>
> In mediasteamer2.make:
>
> $(STATEDIR)/mediastreamer2.extract:
> @$(call targetinfo)
> @$(call clean, $(MEDIASTREAMER2_DIR))
> @$(call extract, MEDIASTREAMER2)
> cd $(MEDIASTREAMER2_DIR) && [ -f configure ] || sh autogen.sh<= br> > @$(call patchin, MEDIASTREAMER2)
> @$(call touch)
>
> However, this does not work because apparently ptxdist resolves
> dependencies after the extract stage, so when autogen.sh is run, the > host-intltool package has not been installed yet.
>
> So I tried to run autogen.sh from the extract.post stage instead:
>
> $(STATEDIR)/mediastreamer2.extract.post:
> @$(call targetinfo)
> cd $(MEDIASTREAMER2_DIR) && [ -f configure ] || sh autogen.sh<= br>
I'm guessing you got that from the latest src-autoconf template.= This is
still broken. It's missing the actual extract.post command:

No, I actually made that up myself, based on the d= ocumentation. The manual mentions [1] that extract.post is a good place to = "generate a configure script out of an autotoolized configure.ac file for example", so that's what I= tried. Also the manual does not document any default rule when extract.pos= t is omitted (whereas it does so for other stages). So I didn't know th= at I had to call world/patchin/post from my custom extract.post rule.
=

=C2=A0

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0@$(call world/patchin/post, @PACKAGE@)
> @$(call touch)
>
> This way, host-intltool is installed before autogen.sh is run, so that= part
> work. But this creates other problems: The install stage fails when tr= ying
> to relink some libraries.
>
> What is the proper way to do this?

The template whre you got this from is for packages where the source= is
part of your BSP. I don't think this is the case for mediasteamer2. You=
should use the 'target' new-package template.

For most packages the tarball contains the configure script. In that case nothing special need to happen. If the configure script is missing, then you need to create a autogen.sh link.
e.g. like the libyaml package in PTXdist does this with
patches/libyaml-0.1.7/autogen.sh.

= Actually the mediastreamer2 package comes with its own autogen.sh script. T= hat's why I am running

cd $(MEDIASTREAMER2_DIR= ) && [ -f configure ] || sh autogen.sh

Is that correct? I guess that if there's an autogen.sh script in the p= ackage, that should normally be used in preference to the generic ptxdist v= ersion. Right?

Thanks,

Guillermo
=
--f403045de7a858356f0564743497-- --===============0570971413== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============0570971413==--