All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] host-pkgconf: use --static option for static builds
@ 2014-03-05 12:19 Vicente Olivert Riera
  2014-04-08  3:58 ` [Buildroot] " Baruch Siach
  2014-05-07 14:43 ` [Buildroot] [PATCH] " Arnout Vandecappelle
  0 siblings, 2 replies; 10+ messages in thread
From: Vicente Olivert Riera @ 2014-03-05 12:19 UTC (permalink / raw)
  To: buildroot

Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
pkg-config wrapper to append the --static option in that case.

Fixes:
   http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/pkgconf/pkg-config.in |    2 +-
 package/pkgconf/pkgconf.mk    |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in
index 25a536b..4dec487 100644
--- a/package/pkgconf/pkg-config.in
+++ b/package/pkgconf/pkg-config.in
@@ -1,2 +1,2 @@
 #!/bin/sh
-PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf $@
+PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@
diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
index f3f6526..9641371 100644
--- a/package/pkgconf/pkgconf.mk
+++ b/package/pkgconf/pkgconf.mk
@@ -24,8 +24,22 @@ define HOST_PKGCONF_INSTALL_WRAPPER
 		$(HOST_DIR)/usr/bin/pkg-config
 endef
 
+define HOST_PKGCONF_STATIC
+	$(SED) 's, at STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
+endef
+
+define HOST_PKGCONF_SHARED
+	$(SED) 's, at STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
+endef
+
 PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
 HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
+else
+	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
1.7.1

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

* [Buildroot] host-pkgconf: use --static option for static builds
  2014-03-05 12:19 [Buildroot] [PATCH] host-pkgconf: use --static option for static builds Vicente Olivert Riera
@ 2014-04-08  3:58 ` Baruch Siach
  2014-05-01 12:49   ` Baruch Siach
  2014-05-07 14:43 ` [Buildroot] [PATCH] " Arnout Vandecappelle
  1 sibling, 1 reply; 10+ messages in thread
From: Baruch Siach @ 2014-04-08  3:58 UTC (permalink / raw)
  To: buildroot

Hi Vicente,

On Wed, Mar 05, 2014 at 12:19:37PM +0000, Vicente Olivert Riera wrote:
> Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
> pkg-config wrapper to append the --static option in that case.
> 
> Fixes:
>    http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Also fixes 
http://autobuild.buildroot.net/results/e62/e62d35bcf7d6c98d0a0348532c2b159affb20e83/.

Tested-by: Baruch Siach <baruch@tkos.co.il>

Thanks,
baruch

> ---
> package/pkgconf/pkg-config.in |    2 +-
>  package/pkgconf/pkgconf.mk    |   14 ++++++++++++++
>  2 files changed, 15 insertions(+), 1 deletions(-)
> 
> diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in
> index 25a536b..4dec487 100644
> --- a/package/pkgconf/pkg-config.in
> +++ b/package/pkgconf/pkg-config.in
> @@ -1,2 +1,2 @@
>  #!/bin/sh
> -PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf $@
> +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@
> diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
> index f3f6526..9641371 100644
> --- a/package/pkgconf/pkgconf.mk
> +++ b/package/pkgconf/pkgconf.mk
> @@ -24,8 +24,22 @@ define HOST_PKGCONF_INSTALL_WRAPPER
>  		$(HOST_DIR)/usr/bin/pkg-config
>  endef
>  
> +define HOST_PKGCONF_STATIC
> +	$(SED) 's, at STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
> +endef
> +
> +define HOST_PKGCONF_SHARED
> +	$(SED) 's, at STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
> +endef
> +
>  PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
>  HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
>  
> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
> +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
> +else
> +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] host-pkgconf: use --static option for static builds
  2014-04-08  3:58 ` [Buildroot] " Baruch Siach
@ 2014-05-01 12:49   ` Baruch Siach
  2014-05-01 13:51     ` Vicente Olivert Riera
  0 siblings, 1 reply; 10+ messages in thread
From: Baruch Siach @ 2014-05-01 12:49 UTC (permalink / raw)
  To: buildroot

Hi Vicente, Buildroot list,

On Tue, Apr 08, 2014 at 06:58:51AM +0300, Baruch Siach wrote:
> On Wed, Mar 05, 2014 at 12:19:37PM +0000, Vicente Olivert Riera wrote:
> > Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
> > pkg-config wrapper to append the --static option in that case.
> > 
> > Fixes:
> >    http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
> > 
> > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> 
> Also fixes 
> http://autobuild.buildroot.net/results/e62/e62d35bcf7d6c98d0a0348532c2b159affb20e83/.
> 
> Tested-by: Baruch Siach <baruch@tkos.co.il>

Fixes also 
http://autobuild.buildroot.net/results/7e7/7e7b33266317ead92ef275fe10111e8e90bebc5a/.

Is there a reason not to apply this one? It should not break shared linking 
even for packages that are not static linking aware. Maybe only add some 
redundant NEEDED entries in the ELF dynamic section.

baruch

> > ---
> > package/pkgconf/pkg-config.in |    2 +-
> >  package/pkgconf/pkgconf.mk    |   14 ++++++++++++++
> >  2 files changed, 15 insertions(+), 1 deletions(-)
> > 
> > diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in
> > index 25a536b..4dec487 100644
> > --- a/package/pkgconf/pkg-config.in
> > +++ b/package/pkgconf/pkg-config.in
> > @@ -1,2 +1,2 @@
> >  #!/bin/sh
> > -PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf $@
> > +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@
> > diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
> > index f3f6526..9641371 100644
> > --- a/package/pkgconf/pkgconf.mk
> > +++ b/package/pkgconf/pkgconf.mk
> > @@ -24,8 +24,22 @@ define HOST_PKGCONF_INSTALL_WRAPPER
> >  		$(HOST_DIR)/usr/bin/pkg-config
> >  endef
> >  
> > +define HOST_PKGCONF_STATIC
> > +	$(SED) 's, at STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
> > +endef
> > +
> > +define HOST_PKGCONF_SHARED
> > +	$(SED) 's, at STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
> > +endef
> > +
> >  PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
> >  HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
> >  
> > +ifeq ($(BR2_PREFER_STATIC_LIB),y)
> > +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
> > +else
> > +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
> > +endif
> > +
> >  $(eval $(autotools-package))
> >  $(eval $(host-autotools-package))

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] host-pkgconf: use --static option for static builds
  2014-05-01 12:49   ` Baruch Siach
@ 2014-05-01 13:51     ` Vicente Olivert Riera
  2014-05-02 22:00       ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Vicente Olivert Riera @ 2014-05-01 13:51 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

I was talking with ThomasP about the same thing. He told me that it has 
huge consequences and can't be committed easily, because it affects how 
almost all packages are built in a BR2_PREFER_STATIC_LIB=y build.

-- 
Vincent

On 05/01/2014 01:49 PM, Baruch Siach wrote:
> Hi Vicente, Buildroot list,
>
> On Tue, Apr 08, 2014 at 06:58:51AM +0300, Baruch Siach wrote:
>> On Wed, Mar 05, 2014 at 12:19:37PM +0000, Vicente Olivert Riera wrote:
>>> Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
>>> pkg-config wrapper to append the --static option in that case.
>>>
>>> Fixes:
>>>     http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
>>>
>>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>
>> Also fixes
>> http://autobuild.buildroot.net/results/e62/e62d35bcf7d6c98d0a0348532c2b159affb20e83/.
>>
>> Tested-by: Baruch Siach <baruch@tkos.co.il>
>
> Fixes also
> http://autobuild.buildroot.net/results/7e7/7e7b33266317ead92ef275fe10111e8e90bebc5a/.
>
> Is there a reason not to apply this one? It should not break shared linking
> even for packages that are not static linking aware. Maybe only add some
> redundant NEEDED entries in the ELF dynamic section.
>
> baruch
>
>>> ---
>>> package/pkgconf/pkg-config.in |    2 +-
>>>   package/pkgconf/pkgconf.mk    |   14 ++++++++++++++
>>>   2 files changed, 15 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in
>>> index 25a536b..4dec487 100644
>>> --- a/package/pkgconf/pkg-config.in
>>> +++ b/package/pkgconf/pkg-config.in
>>> @@ -1,2 +1,2 @@
>>>   #!/bin/sh
>>> -PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf $@
>>> +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@
>>> diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
>>> index f3f6526..9641371 100644
>>> --- a/package/pkgconf/pkgconf.mk
>>> +++ b/package/pkgconf/pkgconf.mk
>>> @@ -24,8 +24,22 @@ define HOST_PKGCONF_INSTALL_WRAPPER
>>>   		$(HOST_DIR)/usr/bin/pkg-config
>>>   endef
>>>
>>> +define HOST_PKGCONF_STATIC
>>> +	$(SED) 's, at STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
>>> +endef
>>> +
>>> +define HOST_PKGCONF_SHARED
>>> +	$(SED) 's, at STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
>>> +endef
>>> +
>>>   PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
>>>   HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
>>>
>>> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
>>> +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
>>> +else
>>> +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
>>> +endif
>>> +
>>>   $(eval $(autotools-package))
>>>   $(eval $(host-autotools-package))
>

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

* [Buildroot] host-pkgconf: use --static option for static builds
  2014-05-01 13:51     ` Vicente Olivert Riera
@ 2014-05-02 22:00       ` Arnout Vandecappelle
  2014-05-05  8:10         ` Thomas Petazzoni
  0 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-05-02 22:00 UTC (permalink / raw)
  To: buildroot

On 01/05/14 15:51, Vicente Olivert Riera wrote:
> I was talking with ThomasP about the same thing. He told me that it has huge
> consequences and can't be committed easily, because it affects how almost all
> packages are built in a BR2_PREFER_STATIC_LIB=y build.

 That's a bit a strange argument... If it doesn't get committed, it will never
be tested. We have a month to fix autobuilder failures, that should be enough, no?

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] host-pkgconf: use --static option for static builds
  2014-05-02 22:00       ` Arnout Vandecappelle
@ 2014-05-05  8:10         ` Thomas Petazzoni
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2014-05-05  8:10 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Sat, 03 May 2014 00:00:03 +0200, Arnout Vandecappelle wrote:
> On 01/05/14 15:51, Vicente Olivert Riera wrote:
> > I was talking with ThomasP about the same thing. He told me that it has huge
> > consequences and can't be committed easily, because it affects how almost all
> > packages are built in a BR2_PREFER_STATIC_LIB=y build.
> 
>  That's a bit a strange argument... If it doesn't get committed, it will never
> be tested. We have a month to fix autobuilder failures, that should be enough, no?

Well, it would at least be good to have a preliminary testing with a
fairly large set of packages enabled, in a BR2_PREFER_STATIC_LIB=y
configuration, to check that things are still working OK after applying
this patch. Not a 100% coverage, but at least testing a few dozens of
packages.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] host-pkgconf: use --static option for static builds
  2014-03-05 12:19 [Buildroot] [PATCH] host-pkgconf: use --static option for static builds Vicente Olivert Riera
  2014-04-08  3:58 ` [Buildroot] " Baruch Siach
@ 2014-05-07 14:43 ` Arnout Vandecappelle
  2014-05-07 16:47   ` Baruch Siach
  2014-05-07 20:40   ` Peter Korsgaard
  1 sibling, 2 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-05-07 14:43 UTC (permalink / raw)
  To: buildroot

On 05/03/14 13:19, Vicente Olivert Riera wrote:
> Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
> pkg-config wrapper to append the --static option in that case.
> 
> Fixes:
>    http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Tested with an allpackageyesconfig with 
http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-x86-64-core2-full.config
as the toolchain (and PREFER_STATIC added to the config, of course).

 I ran this config with and without this patch applied, by running make -k
and then make -k again to collect the failures. 

 The following packages are fixed by this patch:
at
gdk-pixbuf
xerces
xfsprogs


 The following packages fail in both cases. I did a very basic
analysis for about half of them, but then I gave up :-)

python (duplicate symbols in -lpthread and -lc)
armadillo (builds a shared library and tries to link it with a static library)
audiofile (tries to link against libstdc++.so)
bash (multiple definition of function getenv)
util-linux (libpam needs -ldl)
directfb (tries to link against libstdc++.so)
mesa3d (tries to hardlink libGLESv1_CM.so instead of .a)
cdrkit (duplicate symbols in -lpthread and -lc)
libnspr (tries to link with gcc -shared ... --static ...)
rtmpdump (tries to link shared library against non-PIC .a libraries)
libssh2 (fails to link against -lgpg-error, dependency of gcrypt, which doesn't use pkg-config)
mysql (tries to link against libstdc++.so)
lm-sensors (tries to link with gcc -shared ... --static ...)
neard (duplicate symbols in -lpthread and -lc)
ofono (duplicate symbols in -lpthread and -lc)
coreutils (tries to link with gcc -shared ... --static ...)
crda (fails to link against -lgpg-error, dependency of gcrypt, which doesn't use pkg-config)
dhcpdump (fails to link agains -lusb, dependency of pcap, which doesn't use pkg-config)
dnsmasq (undefined references, but it does link against those libraries... weird)
keyutils (tries to link with gcc -shared ... --static ...)
elfutils (tries to link with gcc -shared ... --static ...)
exim (missing -pthread)
tcl (tries to link with gcc -shared ... --static ...)
fbgrab (missing -lm, dependency of libpng; fbgrab doesn't use pkg-config)
fbterm (missing -pthread)
fbv (missing -lz -lm, dependencies of libpng; fbv doesn't use pkg-config)
fetchmail (configure fails to link -lssl because of missing -lz; fetchmail doesn't use pkg-config)
flashrom (missing -lz, dependency of libpci)
openssh (configure fails to link -lssl because of missing -lz)
perl (but it succeeds the second build!)
libsigc (tries to link against libstdc++.so)
gnuplot (missing -pthread from libgd)
portaudio (tries to link against libstdc++.so)
libv4l (missing -pthread and -ljpeg)
taglib (tries to link with gcc -shared ... --static ...)
libvpx (failed sstrip; probably not related to static build)
heirloom-mailx (multiple definition of getopt)
polarssl (missing -lz, dependency of -lcrypto)
httping (missing -lm, dependency of -lfftw3)
iftop (configure fails on -lpcap, which doesn't use pkg-config)
inotify-tools (multiple definitions of internal symbols, weird)
iproute2 (tries to link with gcc -shared ... --static ...)
iprutils (undefined references to wattr from -lmenu (ncurses))
kismet (configure fails on -lpcap, which doesn't use pkg-config)
knock (configure fails on -lpcap, which doesn't use pkg-config)
lcdapi (tries to link with gcc -shared ... --static ...)
lcdproc (tries to link with gcc -shared ... --static ...)
lftp (tries to link against libstdc++.so)
libeXosip2 (missing -lssl + dependencies)
libfcgi (tries to link against libstdc++.so)
libgeotiff (configures fails to link with -ltiff)
libiqrf (tries to link with gcc -shared ... --static ...)
libiscsi (tries to link with gcc -shared ... --static ...)
libmicrohttpd (configure fails to link with -lgnutls)
libplist (tries to link with gcc -shared ... --static ...)
libqrencode (missing -pthread)
libroxml (missing -pthread)
libseccomp (tries to link with gcc -shared ... --static ...)
libserial (tries to link against libstdc++.so)
libwebsockets (tries to link with gcc -shared ... --static ...)
lighttpd (but succeeds the second time)
log4cplus
logrotate
ltp-testsuite (probably not related to static)
lxc
mtdev2tuio
mutt
ndisc6
slang
nfs-utils
nftables
ngrep
numactl
protobuf
olsr
openntpd
openpowerlink
oprofile
poppler
procps
proftpd
ptpd2
quagga
quota
rpm
rsh-redone
ruby
smstools3
snappy
squid
sudo
sysstat
tar
tcpreplay
ti-utils
tinyxml
tn5250
uemacs
urg
ushare
valgrind
vpnc
vsftpd
wget
wireshark
xinetd
xl2tp
xmlstarlet
znc


 For the interested, the log of these failures is available at
http://code.bulix.org/bezsjm-86178


 Regards,
 Arnout

> ---
>  package/pkgconf/pkg-config.in |    2 +-
>  package/pkgconf/pkgconf.mk    |   14 ++++++++++++++
>  2 files changed, 15 insertions(+), 1 deletions(-)
> 
> diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in
> index 25a536b..4dec487 100644
> --- a/package/pkgconf/pkg-config.in
> +++ b/package/pkgconf/pkg-config.in
> @@ -1,2 +1,2 @@
>  #!/bin/sh
> -PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf $@
> +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:- at PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:- at STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@
> diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
> index f3f6526..9641371 100644
> --- a/package/pkgconf/pkgconf.mk
> +++ b/package/pkgconf/pkgconf.mk
> @@ -24,8 +24,22 @@ define HOST_PKGCONF_INSTALL_WRAPPER
>  		$(HOST_DIR)/usr/bin/pkg-config
>  endef
>  
> +define HOST_PKGCONF_STATIC
> +	$(SED) 's, at STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
> +endef
> +
> +define HOST_PKGCONF_SHARED
> +	$(SED) 's, at STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
> +endef
> +
>  PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
>  HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
>  
> +ifeq ($(BR2_PREFER_STATIC_LIB),y)
> +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
> +else
> +	HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
> +endif
> +
>  $(eval $(autotools-package))
>  $(eval $(host-autotools-package))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] host-pkgconf: use --static option for static builds
  2014-05-07 14:43 ` [Buildroot] [PATCH] " Arnout Vandecappelle
@ 2014-05-07 16:47   ` Baruch Siach
  2014-05-07 17:05     ` Arnout Vandecappelle
  2014-05-07 20:40   ` Peter Korsgaard
  1 sibling, 1 reply; 10+ messages in thread
From: Baruch Siach @ 2014-05-07 16:47 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

On Wed, May 07, 2014 at 04:43:46PM +0200, Arnout Vandecappelle wrote:
> On 05/03/14 13:19, Vicente Olivert Riera wrote:
> > Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
> > pkg-config wrapper to append the --static option in that case.
> > 
> > Fixes:
> >    http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
> > 
> > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> 
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
>  Tested with an allpackageyesconfig with 
> http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-x86-64-core2-full.config
> as the toolchain (and PREFER_STATIC added to the config, of course).
> 
>  I ran this config with and without this patch applied, by running make -k
> and then make -k again to collect the failures. 
> 
>  The following packages are fixed by this patch:
> at
> gdk-pixbuf
> xerces
> xfsprogs
> 
>  The following packages fail in both cases. I did a very basic
> analysis for about half of them, but then I gave up :-)

Thanks for testing.

[...]

> dhcpdump (fails to link agains -lusb, dependency of pcap, which doesn't use 
> pkg-config)

Fixed by http://patchwork.ozlabs.org/patch/341970/.

Haven't you encountered the flite failure 
http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/? 
This one is fixed by http://patchwork.ozlabs.org/patch/344396/.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH] host-pkgconf: use --static option for static builds
  2014-05-07 16:47   ` Baruch Siach
@ 2014-05-07 17:05     ` Arnout Vandecappelle
  0 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2014-05-07 17:05 UTC (permalink / raw)
  To: buildroot

On 07/05/14 18:47, Baruch Siach wrote:
> Hi Arnout,
> 
> On Wed, May 07, 2014 at 04:43:46PM +0200, Arnout Vandecappelle wrote:
>> On 05/03/14 13:19, Vicente Olivert Riera wrote:
>>> Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
>>> pkg-config wrapper to append the --static option in that case.
>>>
>>> Fixes:
>>>    http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
>>>
>>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>>
>> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>>
>>  Tested with an allpackageyesconfig with 
>> http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-x86-64-core2-full.config
>> as the toolchain (and PREFER_STATIC added to the config, of course).
>>
>>  I ran this config with and without this patch applied, by running make -k
>> and then make -k again to collect the failures. 
>>
>>  The following packages are fixed by this patch:
>> at
>> gdk-pixbuf
>> xerces
>> xfsprogs
>>
>>  The following packages fail in both cases. I did a very basic
>> analysis for about half of them, but then I gave up :-)
> 
> Thanks for testing.
> 
> [...]
> 
>> dhcpdump (fails to link agains -lusb, dependency of pcap, which doesn't use 
>> pkg-config)
> 
> Fixed by http://patchwork.ozlabs.org/patch/341970/.
> 
> Haven't you encountered the flite failure 
> http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/? 
> This one is fixed by http://patchwork.ozlabs.org/patch/344396/.

 Since python and alsa-lib are enabled, flite depends on python so it doesn't
get built. That's the problem with allpackageyes: one build failure can block a
lot of other packages.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] host-pkgconf: use --static option for static builds
  2014-05-07 14:43 ` [Buildroot] [PATCH] " Arnout Vandecappelle
  2014-05-07 16:47   ` Baruch Siach
@ 2014-05-07 20:40   ` Peter Korsgaard
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2014-05-07 20:40 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 05/03/14 13:19, Vicente Olivert Riera wrote:
 >> Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
 >> pkg-config wrapper to append the --static option in that case.
 >> 
 >> Fixes:
 >> http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/
 >> 
 >> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

 > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 > Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 >  Tested with an allpackageyesconfig with 
 > http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-x86-64-core2-full.config
 > as the toolchain (and PREFER_STATIC added to the config, of course).

 >  I ran this config with and without this patch applied, by running make -k
 > and then make -k again to collect the failures. 

 >  The following packages are fixed by this patch:
 > at
 > gdk-pixbuf
 > xerces
 > xfsprogs

Thanks for the work both - Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2014-05-07 20:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 12:19 [Buildroot] [PATCH] host-pkgconf: use --static option for static builds Vicente Olivert Riera
2014-04-08  3:58 ` [Buildroot] " Baruch Siach
2014-05-01 12:49   ` Baruch Siach
2014-05-01 13:51     ` Vicente Olivert Riera
2014-05-02 22:00       ` Arnout Vandecappelle
2014-05-05  8:10         ` Thomas Petazzoni
2014-05-07 14:43 ` [Buildroot] [PATCH] " Arnout Vandecappelle
2014-05-07 16:47   ` Baruch Siach
2014-05-07 17:05     ` Arnout Vandecappelle
2014-05-07 20:40   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.