package/gauche: fix 'dlfcn.h: No such file' on autobuild
PATCH v2 1/1 package/gauche: fix 'dlfcn.h: No such file' on autobuild
Ported from bdwgc package.
When build with BR2_STATIC_LIBS environment, prevent to use dlopen().
Fix:
http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1
---
Changes:
v1 -> v2
- refelect comment from Thomas for refine.
---
package/gauche/gauche.mk +9 -1
@@ -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
PATCH v2 1/1 package/gauche: fix 'dlfcn.h: No such file' on autobuild
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Hiroshi" == Hiroshi Kawashima <[email protected]> writes:
Ported from bdwgc package.
When build withBR2_STATIC_LIBSenvironment, prevent to usedlopen().
Quoted 8 lines
Fix:
http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1Signed-off-by Hiroshi Kawashima <[email protected]>---
Changes:
v1 -> v2
- refelect comment from Thomas for refine.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/1 package/gauche: fix 'dlfcn.h: No such file' on autobuild
In reply to Hiroshi KawashimaDear Hiroshi Kawashima,
Quoted 7 lines · Hiroshi Kawashima
Ported from bdwgc package.
When build withBR2_STATIC_LIBSenvironment, prevent to usedlopen().Fix:
http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1Signed-off-by Hiroshi Kawashima <[email protected]>
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 package/gauche: fix 'dlfcn.h: No such file' on autobuild
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Dear Hiroshi Kawashima,
Quoted 3 lines · Hiroshi Kawashima
Ported from bdwgc package.
When build withBR2_STATIC_LIBSenvironment, prevent to usedlopen().
Quoted 8 lines
Quoted 4 lines
Fix:
http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92536419c1Signed-off-by Hiroshi Kawashima <[email protected]>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.
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH v2 1/1 package/gauche: fix 'dlfcn.h: No such file' on autobuild
In reply to Thomas PetazzoniDear Thomas.
Thank you for your test.
Realy... I reproduced this.
I will send new patch next.
Regards,
Kawashima
Quoted 80 lines · Thomas Petazzoni
Dear Hiroshi Kawashima,
Quoted 5 lines · Hiroshi Kawashima
Ported from bdwgc package.
When build withBR2_STATIC_LIBSenvironment, prevent to usedlopen().Fix:
http://autobuild.buildroot.org/results/da5/da5b9605552d4914c5e6f0d890367b92
536419c1Quoted 2 lines
Signed-off-by Hiroshi Kawashima <[email protected]>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.ols -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-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-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/arm-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/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibc gnueabi/bin/ld: final link failed: Bad valueWhen 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_DEBUGis 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_BUSYBOXis not set
BR2_PACKAGE_GAUCHE=y
#BR2_TARGET_ROOTFS_TARis not set
Quoted 3 lines
Best regards,
Thomas
============================================================
Hiroshi Kawashima