Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] guile: use libltdl, needs dynamic libraries
@ 2015-11-25 22:10 Peter Korsgaard
  2015-11-26  8:35 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2015-11-25 22:10 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=f1ad7a74587843925b85adb2cfb6d35bfb3247f9
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes:
http://autobuild.buildroot.net/results/8d0/8d0e8ab0e7a83fda9ee65f973b5b749b246f1c1a/
http://autobuild.buildroot.net/results/381/38137ccf29023f38c540483a6655c4b8d6778abd/
http://autobuild.buildroot.net/results/1d8/1d864588f71b8c13a67781cf91ad058c74eb7abc/

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/guile/Config.in |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/guile/Config.in b/package/guile/Config.in
index d24f318..acb0974 100644
--- a/package/guile/Config.in
+++ b/package/guile/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_GUILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS # bdwgc
 	depends on BR2_USE_WCHAR # libunistring
+	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LIBUNISTRING
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_GMP
@@ -14,6 +15,7 @@ config BR2_PACKAGE_GUILE
 
 	  http://www.gnu.org/software/guile
 
-comment "guile needs a toolchain w/ threads, wchar"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
+comment "guile needs a toolchain w/ threads, wchar, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
+		BR2_STATIC_LIBS
 

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

* [Buildroot] [git commit] guile: use libltdl, needs dynamic libraries
  2015-11-25 22:10 [Buildroot] [git commit] guile: use libltdl, needs dynamic libraries Peter Korsgaard
@ 2015-11-26  8:35 ` Thomas Petazzoni
  2015-11-26 11:00   ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-26  8:35 UTC (permalink / raw)
  To: buildroot

Peter,

On Wed, 25 Nov 2015 23:10:40 +0100, Peter Korsgaard wrote:
> commit: http://git.buildroot.net/buildroot/commit/?id=f1ad7a74587843925b85adb2cfb6d35bfb3247f9
> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> 
> Fixes:
> http://autobuild.buildroot.net/results/8d0/8d0e8ab0e7a83fda9ee65f973b5b749b246f1c1a/
> http://autobuild.buildroot.net/results/381/38137ccf29023f38c540483a6655c4b8d6778abd/
> http://autobuild.buildroot.net/results/1d8/1d864588f71b8c13a67781cf91ad058c74eb7abc/
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Then you should remove:

ifeq ($(BR2_STATIC_LIBS),y)
GUILE_CFLAGS += -DGC_NO_DLOPEN
endif

from guile.mk. But it is weird, because I remember adding those three
lines in guile.mk in commit 49593aba5a56c9c297c31c12fc4dc3de5679e7b1,
and at the time, I tested a static build of guile and it worked fine.
But maybe it was a static build with a dynamic capable toolchain, so I
didn't see all the problems.

In any case, it is not good to have the package depends
on !BR2_STATIC_LIBS and have code in the package to support the
BR2_STATIC_LIBS case.

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

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

* [Buildroot] [git commit] guile: use libltdl, needs dynamic libraries
  2015-11-26  8:35 ` Thomas Petazzoni
@ 2015-11-26 11:00   ` Peter Korsgaard
  2015-11-30 21:20     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2015-11-26 11:00 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Peter,
 > On Wed, 25 Nov 2015 23:10:40 +0100, Peter Korsgaard wrote:
 >> commit: http://git.buildroot.net/buildroot/commit/?id=f1ad7a74587843925b85adb2cfb6d35bfb3247f9
 >> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
 >> 
 >> Fixes:
 >> http://autobuild.buildroot.net/results/8d0/8d0e8ab0e7a83fda9ee65f973b5b749b246f1c1a/
 >> http://autobuild.buildroot.net/results/381/38137ccf29023f38c540483a6655c4b8d6778abd/
 >> http://autobuild.buildroot.net/results/1d8/1d864588f71b8c13a67781cf91ad058c74eb7abc/
 >> 
 >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

 > Then you should remove:

 > ifeq ($(BR2_STATIC_LIBS),y)
 > GUILE_CFLAGS += -DGC_NO_DLOPEN
 > endif

Ahh yes.

 > from guile.mk. But it is weird, because I remember adding those three
 > lines in guile.mk in commit 49593aba5a56c9c297c31c12fc4dc3de5679e7b1,
 > and at the time, I tested a static build of guile and it worked fine.
 > But maybe it was a static build with a dynamic capable toolchain, so I
 > didn't see all the problems.

The problem is really about toolchains with dynamic library support but
used in a static buildroot configuration. The libtool configure script
detects that the system supports dlopen/dlsym and builds libltdl with
that backend, but then later the guile configure script fails to link a
test program with libltdl as it doesn't link with -ldl.

As far as I can see libltdl with a toolchain not supporting shared
libraries doesn't do anything sensible. Perhaps libtool itself should
depend on !BR2_STATIC_LIBS?

With that said, I am not sure if guile works at runtime without shared
libraries so I went with the safe approach of disallowing it for
2015.11.

What do you suggest?

 > In any case, it is not good to have the package depends
 > on !BR2_STATIC_LIBS and have code in the package to support the
 > BR2_STATIC_LIBS case.

Agreed.

-- 
Venlig hilsen,
Peter Korsgaard 

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

* [Buildroot] [git commit] guile: use libltdl, needs dynamic libraries
  2015-11-26 11:00   ` Peter Korsgaard
@ 2015-11-30 21:20     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-11-30 21:20 UTC (permalink / raw)
  To: buildroot

Peter,

On Thu, 26 Nov 2015 12:00:20 +0100, Peter Korsgaard wrote:

>  > from guile.mk. But it is weird, because I remember adding those three
>  > lines in guile.mk in commit 49593aba5a56c9c297c31c12fc4dc3de5679e7b1,
>  > and at the time, I tested a static build of guile and it worked fine.
>  > But maybe it was a static build with a dynamic capable toolchain, so I
>  > didn't see all the problems.
> 
> The problem is really about toolchains with dynamic library support but
> used in a static buildroot configuration. The libtool configure script
> detects that the system supports dlopen/dlsym and builds libltdl with
> that backend, but then later the guile configure script fails to link a
> test program with libltdl as it doesn't link with -ldl.
> 
> As far as I can see libltdl with a toolchain not supporting shared
> libraries doesn't do anything sensible. Perhaps libtool itself should
> depend on !BR2_STATIC_LIBS?

Perhaps, yes.

> With that said, I am not sure if guile works at runtime without shared
> libraries so I went with the safe approach of disallowing it for
> 2015.11.

Yes, and I also don't care about guile too much, and even less so in
static configurations :)

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

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

end of thread, other threads:[~2015-11-30 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 22:10 [Buildroot] [git commit] guile: use libltdl, needs dynamic libraries Peter Korsgaard
2015-11-26  8:35 ` Thomas Petazzoni
2015-11-26 11:00   ` Peter Korsgaard
2015-11-30 21:20     ` Thomas Petazzoni

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