Closed longlene closed 11 years ago
The problem you are reporting is showing up during compilation of the Boehm Conservative Garbage Collector (known as libgc in the code). Boehm GC is a utility library that MKCL uses for its Garbage Collection service but is not an integral part of MKCL per se.
I suspect that such a problem is coming from an error during configuration that resulted in a non-functional Boehm GC setup. Could you post the whole output of the "configure" script you ran to initialize MKCL (along with any arguments you passed to "configure")?
I would need also a precise description of the platform you are trying to compile MKCL onto (OS exact version, relevant hardware (i.e.: CPU)).
Cheers,
J.-C.
Pushed the wrong button! Sorry.
The following is the output of configure, I just run ./ocnfigure and get the output,
Switching to directory `/home/loong0/mkcl-1.1.4/src' to continue configuration. checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C preprocessor... gcc -E checking for ranlib... ranlib checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets $(MAKE)... yes checking for ld flags when building shared libraries... -shared checking for required libraries... -ldl checking for architecture... X86_64 checking for software type... linux / checking for thread local data... yes checking for install-info... /usr/bin/install-info checking for getpwnam in -lsun... no checking for library containing strerror... none required checking for use of thread... no checking for __gmpz_init in -lgmp... yes checking for soname flags... -Wl,-soname,libmkcl.so.1.1 checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for ANSI C header files... (cached) yes checking whether time.h and sys/time.h may both be included... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking fenv.h usability... yes checking fenv.h presence... yes checking for fenv.h... yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/utsname.h usability... yes checking sys/utsname.h presence... yes checking for sys/utsname.h... yes checking float.h usability... yes checking float.h presence... yes checking for float.h... yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking link.h usability... yes checking link.h presence... yes checking for link.h... yes checking mach-o/dyld.h usability... no checking mach-o/dyld.h presence... no checking for mach-o/dyld.h... no checking ulimit.h usability... yes checking ulimit.h presence... yes checking for ulimit.h... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for size_t... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for working volatile... yes checking for ptrdiff_t... yes checking size of long long... 64 checking whether byte ordering is bigendian... no checking appropiate type for fixnums... long int checking for stdint.h... (cached) yes checking uint8_t type... uint8_t checking uint16_t type... uint16_t checking uint32_t type... uint32_t checking uint64_t type... uint64_t checking character sequence for end of line... lf checking for _longjmp... yes checking whether we can dynamically build calls to C functions... yes checking for code to detect FP exceptions... x86_64 checking whether stack grows downwards... callee frame = 0x7fff6db2f07f, caller frame = 0x7fff6db2f0af, yes checking whether closedir returns void... no checking for error_at_line... yes checking for pid_t... yes checking vfork.h usability... no checking vfork.h presence... no checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking whether gcc needs -traditional... no checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for working memcmp... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... (cached) yes checking for getpagesize... yes checking for working mmap... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for sys/select.h... (cached) yes checking for sys/socket.h... (cached) yes checking types of arguments for select... int,fd_set ,struct timeval checking return type of signal handlers... void checking whether lstat correctly handles trailing slash... yes checking whether stat accepts an empty string... no checking for working strtod... yes checking for floor... yes checking for getcwd... yes checking for gethostbyaddr... yes checking for gethostbyname... yes checking for getpagesize... (cached) yes checking for memmove... yes checking for memset... yes checking for mkdir... yes checking for putenv... yes checking for socket... yes checking for sqrt... yes checking for strcasecmp... yes checking for strchr... yes checking for strerror... yes checking for strtol... yes checking for nanosleep... yes checking for alarm... yes checking for times... yes checking for select... yes checking for setenv... yes checking for putenv... (cached) yes checking for lstat... yes checking for mkstemp... yes checking for sigprocmask... yes checking for isatty... yes checking for feenableexcept... yes checking for tzset... yes checking for gettimeofday... yes checking for getrusage... yes checking for expf... yes checking for logf... yes checking for sqrtf... yes checking for cosf... yes checking for sinf... yes checking for tanf... yes checking for sinhf... yes checking for coshf... yes checking for tanhf... yes checking for floorf... yes checking for ceilf... yes checking for fabsf... yes checking for frexpf... yes checking for ldexpf... yes checking for log1p... yes checking for log1pf... yes checking for log1pl... yes checking for sched_yield... yes checking for uname... yes checking for fseeko... yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes configure: Configuring included Boehm GC library: (destdir=/home/loong0/mkcl-1.1.4/src; cd gc; CC=gcc -fPIC CFLAGS=-DMK_GC_BUILD -D_GNU_SOURCE -fno-strict-aliasing -g -O2 -fPIC -pthread LDFLAGS= /home/loong0/mkcl-1.1.4/src/gc/configure --disable-shared --prefix= --includedir=/mkcl/ --libdir= --build= --host= --enable-large-config --enable-threads=posix --enable-parallel-mark) checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking GC version numbers... major=7 minor=2 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for style of include used by make... GNU checking for gcc... gcc -fPIC checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -fPIC accepts -g... yes checking for gcc -fPIC option to accept ISO C89... none needed checking dependency style of gcc -fPIC... gcc3 checking whether gcc -fPIC and cc understand -c and -o together... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking dependency style of gcc -fPIC... gcc3 checking for inline... inline checking for pthread_self in -lpthread... yes checking for xlc... no checking whether gcc supports -fno-strict-aliasing... yes checking for dlopen in -ldl... yes checking whether to build shared libraries... no checking which machine-dependent code should be used... checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc -fPIC... /usr/x86_64-pc-linux-gnu/bin/ld checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc -fPIC object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -fPIC -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc -fPIC supports -fno-rtti -fno-exceptions... no checking for gcc -fPIC option to produce PIC... -fPIC -DPIC checking if gcc -fPIC PIC flag -fPIC -DPIC works... yes checking if gcc -fPIC static flag -static works... yes checking if gcc -fPIC supports -c -o file.o... yes checking if gcc -fPIC supports -c -o file.o... (cached) yes checking whether the gcc -fPIC linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64 checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether Solaris gcc optimization fix is necessary... no checking sys/dg_sys_info.h usability... no checking sys/dg_sys_info.h presence... no checking for sys/dg_sys_info.h... no checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for ATOMIC_OPS... yes checking which libatomic_ops to use... external configure: creating ./config.status config.status: creating Makefile config.status: creating bdw-gc.pc config.status: creating include/private/config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing default commands configure: creating ./config.status config.status: creating bare.lsp config.status: creating lsp/load.lsp config.status: creating clos/load.lsp config.status: creating cmp/load.lsp config.status: creating ../Makefile config.status: creating Makefile config.status: creating c/Makefile config.status: creating doc/Makefile config.status: creating doc/mkcl.man config.status: creating doc/mkcl-config.man config.status: creating mkcl/mkcl-gc.h config.status: creating mkcl/configpre.h config.status: creating bin/mkcl-config.pre config.status: creating lsp/config.pre config.status: creating compile.pre config.status: creating cmp/cmpdefs.pre config.status: creating mkcl/config.h Configuration complete. To build MKCL, issue make in this directory.
My OS is Funtoo Linux, I want to write a ebuild for MKCL.
In the "configure" output you have:
checking for ATOMIC_OPS... yes
This happens during the Boehm GC configuration. This never happened on the Linux distros I use to test on so I never had to face it.
On your system it seems that the following command returns true:
pkg-config --exists --print-errors "atomic_ops"
And this leads the configure script to believe you want to use a system provided libatomic_ops library. And although the Boehm GC code pretends to support it, that feature seems pretty broken in fact.
Working on a workaround...
Yes, I've instlled the boehm-gc and libatomic_ops package on my Funtoo. I run ./configure --help and find no option like --with-boehm=system, what should I do if want to continue to compile it?
Thanks a lot for your reply!
The issue is not as simple as it seems. I had to doctor the Boehm GC source code a bit too much which makes using a system provided Boehm GC not a workable option anymore.
Right now all I can suggest is that you apply this patch:
----------------------------------------------------------------------------
diff --git a/src/configure.in b/src/configure.in
index b479e2b..7140d39 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -761,12 +761,12 @@ dnl if mkdir gc; then
CC="${CC} ${PICFLAG}" CFLAGS="-DMK_GC_BUILD ${CFLAGS}" LDFLAGS="${LDFLAGS}" \
$srcdir/gc/configure --disable-shared --prefix=${destdir} \
--includedir=${destdir}/mkcl/ --libdir=${destdir} --build=${build_alias} \
- --host=${host_alias} --enable-large-config ${boehm_configure_flags})"
+ --host=${host_alias} --enable-large-config --with-libatomic-ops=no ${boehm_configure_flags})"
(destdir=`${PWDCMD}`; cd gc; \
CC="${CC} ${PICFLAG}" CFLAGS="-DMK_GC_BUILD ${CFLAGS}" LDFLAGS="${LDFLAGS}" \
$srcdir/gc/configure --disable-shared --prefix=${destdir} \
--includedir=${destdir}/mkcl/ --libdir=${destdir} --build=${build_alias} \
- --host=${host_alias} --enable-large-config ${boehm_configure_flags})
+ --host=${host_alias} --enable-large-config --with-libatomic-ops=no ${boehm_configure_flags})
MKCL_BOEHM_GC_HEADER='mkcl/gc/gc.h'
dnl else
dnl AC_MSG_ERROR([Unable to create 'gc' directory])
----------------------------------------------------------------------------
To fix the mkcl-1.1.4/src/configure.in and then run command "autoconf" in the mkcl-1.1.4/src directory and finally rerun configure.
I think the patch is good but I have yet to test it for real... After I test it somewhat properly I will commit it to the MKCL git repo. I think I will do a MKCL 1.1.5 rather soon (end of this week?) since quite a few things have come up lately, this one being the cherry on the cake.
Cheers.
Patch tested and committed to git repo. Will be included in MKCL 1.1.5 due to be released in a few days.
Thanks a lot! I compiled it successfully! Expecting the 1.1.5!
The following is the error message.
make[2]: Leaving directory
/home/loong0/mkcl-1.1.4/src/c' cd gc; make make[2]: Entering directory
/home/loong0/mkcl-1.1.4/src/gc' make[3]: Entering directory/home/loong0/mkcl-1.1.4/src/gc' /bin/sh ./libtool --tag=CC --mode=compile gcc -fPIC -DHAVE_CONFIG_H -I./include -I./include -fexceptions -DMK_GC_BUILD -D_GNU_SOURCE -fno-strict-aliasing -g -O2 -fPIC -pthread -fno-strict-aliasing -MT allchblk.lo -MD -MP -MF .deps/allchblk.Tpo -c -o allchblk.lo allchblk.c libtool: compile: gcc -fPIC -DHAVE_CONFIG_H -I./include -I./include -fexceptions -DMK_GC_BUILD -D_GNU_SOURCE -fno-strict-aliasing -g -O2 -fPIC -pthread -fno-strict-aliasing -MT allchblk.lo -MD -MP -MF .deps/allchblk.Tpo -c allchblk.c -o allchblk.o In file included from allchblk.c:17:0: ./include/private/gc_priv.h:797:3: error: unknown type name 'MK_AO_t' ./include/private/gc_priv.h:2031:5: error: unknown type name 'MK_AO_TS_t' make[3]: *** [allchblk.lo] Error 1 make[3]: Leaving directory
/home/loong0/mkcl-1.1.4/src/gc' make[2]: * [all-recursive] Error 1 make[2]: Leaving directory `/home/loong0/mkcl-1.1.4/src/gc' make[1]: * [gc/.libs/libgc.a] Error 2 make[1]: Leaving directory`/home/loong0/mkcl-1.1.4/src' make: *\ [all] Error 2