* [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild
@ 2015-11-17 15:50 Hiroshi Kawashima
2015-11-17 20:26 ` Peter Korsgaard
2015-11-17 20:40 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Hiroshi Kawashima @ 2015-11-17 15:50 UTC (permalink / raw)
To: buildroot
Ported from bdwgc package.
When build with BR2_STATIC_LIBS environment, prevent to use dlopen().
Fix:
http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1
Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
---
Changes:
v1 -> v2
- refelect comment from Thomas for refine.
---
diff --git a/package/gauche/gauche.mk b/package/gauche/gauche.mk
index b887c6a..e708068 100644
--- a/package/gauche/gauche.mk
+++ b/package/gauche/gauche.mk
@@ -20,13 +20,21 @@ else
GAUCHE_CONF_OPTS += --without-zlib
endif
+GAUCHE_CFLAGS = $(TARGET_CFLAGS)
+
# Detection of c99 support in configure fails without WCHAR. To enable
# automatic detection of c99 support by configure, we need to enable
# WCHAR in toolchain. But actually we do not need WCHAR at gauche
# runtime. So reuesting WCHAR in toolchain just for automatic detection
# will be overkill. To solve this, explicitly -std=gnu99 is specified
# here.
-GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
+GAUCHE_CFLAGS += -std=gnu99
+
+ifeq ($(BR2_STATIC_LIBS),y)
+GAUCHE_CFLAGS += -DGC_NO_DLOPEN
+endif
+
+GAUCHE_CONF_ENV = CFLAGS="$(GAUCHE_CFLAGS)"
$(eval $(host-autotools-package))
$(eval $(autotools-package))
============================================================
Hiroshi Kawashima
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild
2015-11-17 15:50 [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild Hiroshi Kawashima
@ 2015-11-17 20:26 ` Peter Korsgaard
2015-11-17 20:40 ` Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2015-11-17 20:26 UTC (permalink / raw)
To: buildroot
>>>>> "Hiroshi" == Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp> writes:
> Ported from bdwgc package.
> When build with BR2_STATIC_LIBS environment, prevent to use dlopen().
> Fix:
> http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1
> Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
> ---
> Changes:
> v1 -> v2
> - refelect comment from Thomas for refine.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild
2015-11-17 15:50 [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild Hiroshi Kawashima
2015-11-17 20:26 ` Peter Korsgaard
@ 2015-11-17 20:40 ` Thomas Petazzoni
2015-11-17 22:29 ` Peter Korsgaard
2015-11-18 9:28 ` Hiroshi Kawashima
1 sibling, 2 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2015-11-17 20:40 UTC (permalink / raw)
To: buildroot
Dear Hiroshi Kawashima,
On Wed, 18 Nov 2015 00:50:10 +0900, Hiroshi Kawashima wrote:
> Ported from bdwgc package.
> When build with BR2_STATIC_LIBS environment, prevent to use dlopen().
>
> Fix:
> http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1
>
> Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
This patch is not sufficient. It still fails to build, later, because
gauche tries to build a shared library. So I believe gauche really
needs to depend on !BR2_STATIC_LIBS. Here is the failure you get:
gcc -O2 -DHAVE_CONFIG_H -o arm-buildroot-linux-uclibcgnueabi-gauche-config gauche-config.c
TARGETLIB=`pwd` /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -std=gnu99 -DGC_NO_DLOPEN -fPIC -Wl,--rpath -Wl,`pwd` -L. -static -o gauche-config gauche-config.o -lcrypt -lutil -lrt -lm -lpthread
TARGETLIB=`pwd` /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -std=gnu99 -DGC_NO_DLOPEN -fPIC -Wl,--rpath -Wl,`pwd` -L. -static -Wl,--soname,libgauche-0.9.so.0.4 -shared -o libgauche-0.9.so box.o core.o vm.o compaux.o macro.o code.o error.o class.o prof.o collection.o boolean.o char.o string.o list.o hash.o treemap.o bits.o port.o write.o read.o vector.o weak.o symbol.o gloc.o compare.o regexp.o signal.o parameter.o module.o proc.o number.o bignum.o load.o paths.o lazy.o repl.o autoloads.o system.o compile.o libalpha.o libbool.o libchar.o libcode.o libcmp.o libdict.o libeval.o libexc.o libfmt.o libio.o liblazy.o liblist.o libmisc.o libmod.o libnum.o libobj.o libomega.o libproc.o librx.o libstr.o libsym.o libsys.o libvec.o `ls -1 ../gc/.libs/*.o | grep -v '/cord' | grep -v '/staticrootslib'` `ls -1 ../gc/libatomic_ops/src/.libs/*.o` -lcrypt -lutil -lrt -lm -lpthread
ls: cannot access ../gc/.libs/*.o: No such file or directory
ls: cannot access ../gc/libatomic_ops/src/.libs/*.o: No such file or directory
/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): In function `__uClibc_fini':
__uClibc_main.c:(.text+0x138): undefined reference to `__fini_array_end'
__uClibc_main.c:(.text+0x13c): undefined reference to `__fini_array_start'
__uClibc_main.c:(.text+0x140): undefined reference to `__fini_array_start'
/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__uClibc_main.os): In function `__uClibc_main':
__uClibc_main.c:(.text+0x568): undefined reference to `__preinit_array_start'
__uClibc_main.c:(.text+0x56c): undefined reference to `__preinit_array_end'
__uClibc_main.c:(.text+0x570): undefined reference to `__preinit_array_start'
__uClibc_main.c:(.text+0x574): undefined reference to `__init_array_start'
__uClibc_main.c:(.text+0x578): undefined reference to `__init_array_end'
__uClibc_main.c:(.text+0x57c): undefined reference to `__init_array_start'
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: libgauche-0.9.so: hidden symbol `__fini_array_end' isn't defined
/home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: final link failed: Bad value
When building the following minimal configuration:
BR2_arm=y
BR2_STATIC_LIBS=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2015.08-647-gc356fb2.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_GAUCHE=y
# BR2_TARGET_ROOTFS_TAR is not set
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild
2015-11-17 20:40 ` Thomas Petazzoni
@ 2015-11-17 22:29 ` Peter Korsgaard
2015-11-18 9:28 ` Hiroshi Kawashima
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2015-11-17 22:29 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Dear Hiroshi Kawashima,
> On Wed, 18 Nov 2015 00:50:10 +0900, Hiroshi Kawashima wrote:
>> Ported from bdwgc package.
>> When build with BR2_STATIC_LIBS environment, prevent to use dlopen().
>>
>> Fix:
>> http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1
>>
>> Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
> This patch is not sufficient. It still fails to build, later, because
> gauche tries to build a shared library. So I believe gauche really
> needs to depend on !BR2_STATIC_LIBS. Here is the failure you get:
Ok, I'll drop it then.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild
2015-11-17 20:40 ` Thomas Petazzoni
2015-11-17 22:29 ` Peter Korsgaard
@ 2015-11-18 9:28 ` Hiroshi Kawashima
1 sibling, 0 replies; 5+ messages in thread
From: Hiroshi Kawashima @ 2015-11-18 9:28 UTC (permalink / raw)
To: buildroot
Dear Thomas.
Thank you for your test.
Realy... I reproduced this.
I will send new patch next.
Regards,
Kawashima
Thomas Petazzoni writes:
> Dear Hiroshi Kawashima,
>
> On Wed, 18 Nov 2015 00:50:10 +0900, Hiroshi Kawashima wrote:
> > Ported from bdwgc package.
> > When build with BR2_STATIC_LIBS environment, prevent to use dlopen().
> >
> > Fix:
> > http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92
> 536419c1
> >
> > Signed-off-by: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
>
> This patch is not sufficient. It still fails to build, later, because
> gauche tries to build a shared library. So I believe gauche really
> needs to depend on !BR2_STATIC_LIBS. Here is the failure you get:
>
> gcc -O2 -DHAVE_CONFIG_H -o arm-buildroot-linux-uclibcgnueabi-gauche-config ga
> uche-config.c
> TARGETLIB=`pwd` /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux
> -gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -
> static -std=gnu99 -DGC_NO_DLOPEN -fPIC -Wl,--rpath -Wl,`pwd` -L. -static -o
> gauche-config gauche-config.o -lcrypt -lutil -lrt -lm -lpthread
> TARGETLIB=`pwd` /home/thomas/projets/buildroot/output/host/usr/bin/arm-linux
> -gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -
> static -std=gnu99 -DGC_NO_DLOPEN -fPIC -Wl,--rpath -Wl,`pwd` -L. -static -Wl
> ,--soname,libgauche-0.9.so.0.4 -shared -o libgauche-0.9.so box.o core.o vm.o
> compaux.o macro.o code.o error.o class.o prof.o collection.o boolean.o char.
> o string.o list.o hash.o treemap.o bits.o port.o write.o read.o vector.o weak
> .o symbol.o gloc.o compare.o regexp.o signal.o parameter.o module.o proc.o nu
> mber.o bignum.o load.o paths.o lazy.o repl.o autoloads.o system.o compile.o l
> ibalpha.o libbool.o libchar.o libcode.o libcmp.o libdict.o libeval.o libexc.o
> libfmt.o libio.o liblazy.o liblist.o libmisc.o libmod.o libnum.o libobj.o li
> bomega.o libproc.o librx.o libstr.o libsym.o libsys.o libvec.o `ls -1 ../gc/.
> libs/*.o | grep -v '/cord' | grep -v '/staticrootslib'` `ls -1 ../gc/libatomi
> c_ops/src/.libs/*.o` -lcrypt -lutil -lrt -lm -lpthread
> ls: cannot access ../gc/.libs/*.o: No such file or directory
> ls: cannot access ../gc/libatomic_ops/src/.libs/*.o: No such file or director
> y
> /home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnue
> abi/sysroot/usr/lib/libc.a(__uClibc_main.os): In function `__uClibc_fini':
> __uClibc_main.c:(.text+0x138): undefined reference to `__fini_array_end'
> __uClibc_main.c:(.text+0x13c): undefined reference to `__fini_array_start'
> __uClibc_main.c:(.text+0x140): undefined reference to `__fini_array_start'
> /home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnue
> abi/sysroot/usr/lib/libc.a(__uClibc_main.os): In function `__uClibc_main':
> __uClibc_main.c:(.text+0x568): undefined reference to `__preinit_array_start'
> __uClibc_main.c:(.text+0x56c): undefined reference to `__preinit_array_end'
> __uClibc_main.c:(.text+0x570): undefined reference to `__preinit_array_start'
> __uClibc_main.c:(.text+0x574): undefined reference to `__init_array_start'
> __uClibc_main.c:(.text+0x578): undefined reference to `__init_array_end'
> __uClibc_main.c:(.text+0x57c): undefined reference to `__init_array_start'
> /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/a
> rm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibc
> gnueabi/bin/ld: libgauche-0.9.so: hidden symbol `__fini_array_end' isn't defi
> ned
> /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/a
> rm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibc
> gnueabi/bin/ld: final link failed: Bad value
>
> When building the following minimal configuration:
>
> BR2_arm=y
> BR2_STATIC_LIBS=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarball
> s/br-arm-full-static-2015.08-647-gc356fb2.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14=y
> BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
> BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_GAUCHE=y
> # BR2_TARGET_ROOTFS_TAR is not set
>
> Best regards,
>
> Thomas
============================================================
Hiroshi Kawashima
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-18 9:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-17 15:50 [Buildroot] [PATCH v2] package/gauche: fix 'dlfcn.h: No such file' on autobuild Hiroshi Kawashima
2015-11-17 20:26 ` Peter Korsgaard
2015-11-17 20:40 ` Thomas Petazzoni
2015-11-17 22:29 ` Peter Korsgaard
2015-11-18 9:28 ` Hiroshi Kawashima
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.