On 10/31/2010 11:24 PM, Aleksej Saushev wrote:
Paolo Bonzini<[email protected]> writes:
On 10/31/2010 11:03 PM, Aleksej Saushev wrote:
This indicates bug in GNU Smalltalk build system, it doesn't link
against libpthread.
Can you post a patch here too, when you look at it? It works
for Linux, where you have this in libgst.la:
# Linker flags that can not go in dependency_libs.
inherited_linker_flags=' -pthread'
# Libraries that this one depends upon.
dependency_libs=' -ldl -lsigsegv -lffi -lreadline -lltdl -lgmp
-lpthread -lrt -lm'
and then libtool picks the dependencies automatically.
Can you "grep LIBTHREAD libgst/Makefile"?
I can't reproduce it on my 5.99.39, it looks specific to 5.0.2,
see ref. 1, I don't know why, it needs further investigation.
I'll see what I can do in this respect.
Since 5.0.2 is expected to go away soon, someone should check 5.1 RC.
I'll see what I can do with this too.
If you're interested in already existing fixes, you can find patches
at ref. 2, some of them add DragonFly support, some of them fix builds
on NetBSD at least (my primary working platform), FreeBSD, and DragonFly
(those who touched the package last work on those platforms).
patch-aa => this is for libffi, the package should depend on a libffi
port. The included libffi is only for simplicity, it's not meant to be
used by distributions.
patch-ac => same. Except I'm upstream for libsigsegv and I'll push it.
patch-ae, first hunk => already upstream
patch-af => included
patch-ae + patch-ah => can you try the attached fix instead?
Also, please compile this program (gcc x.c -I.) after configure has been
run, and send the output:
#include <config.h>
#include <lib-src/ltdl_.h>
#include <lib-src/ltdl.c>
int
main ()
{
lt_dlinit();
printf ("%p ", lt_dlopenext("libc"));
printf ("%s\n", lt_dlerror());
return 0;
}
Thanks!
Paolo
commit a58ac1377a6146dfaef3146590e751322a9c78e7
Author: Paolo Bonzini <[email protected]>
Date: Mon Nov 1 01:18:59 2010 +0100
do not install libc.la if it is not necessary
diff --git a/Makefile.am b/Makefile.am
index 90619dd..576b578 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,7 +59,10 @@ dist_noinst_SCRIPTS = build-aux/texi2dvi build-aux/texi2html
\
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = gnu-smalltalk.pc
+if NEED_LIBC_LA
module_DATA = libc.la
+endif
+
noinst_DATA = gst.im
dist_noinst_DATA += smalltalk-mode-init.el.in gst-mode.el.in \
.gdbinit scripts/Finish.st gsticon.ico packages/xml/ChangeLog \
diff --git a/build-aux/libc-so-name.m4 b/build-aux/libc-so-name.m4
index 6ba110a..603fe58 100644
--- a/build-aux/libc-so-name.m4
+++ b/build-aux/libc-so-name.m4
@@ -9,7 +9,30 @@ dnl the same distribution terms as the rest of that program.
dnl Sets the variables LIBC_SO_NAME and LIBC_SO_DIR to the directory
dnl and basename for the C library.
AC_DEFUN([GST_LIBC_SO_NAME],
-[AC_CACHE_CHECK([how to dlopen the C library], gst_cv_libc_so_name, [
+[AC_CACHE_CHECK([whether lt_dlopenext("libc") works], gst_cv_libc_dlopen_works,
+[save_CFLAGS=$CFLAGS
+save_LIBS=$LIBS
+CFLAGS="$CFLAGS $INCLTDL"
+LIBS="$CFLAGS $LIBLTDL"
+AC_RUN_IFELSE(AC_LANG_PROGRAM([[
+#include <ltdl`test $with_system_libltdl = no && echo _`.h>
+`test $with_system_libltdl = no && echo '#include "ltdl.c"' `
+]], [[
+lt_dlinit();
+return lt_dlopenext("libc") == NULL ? 1 : 0;
+]]), [gst_cv_libc_dlopen_works=yes],
+ [gst_cv_libc_dlopen_works=no],
+ [gst_cv_libc_dlopen_works=no])
+CFLAGS=$save_CFLAGS
+LIBS=$save_LIBS
+])
+
+AM_CONDITIONAL([NEED_LIBC_LA], [test "$gst_cv_libc_dlopen_works" = no])
+if test "$gst_cv_libc_dlopen_works" = no; then
+ AC_CONFIG_FILES(libc.la)
+fi
+
+AC_CACHE_CHECK([how to dlopen the C library], gst_cv_libc_so_name, [
if test $GCC = yes; then
gst_lib_path=`$CC --print-multi-os-directory $CFLAGS $CPPFLAGS`
case $gst_lib_path in
diff --git a/configure.ac b/configure.ac
index 18d53ef..f780339 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,8 +295,6 @@ AC_CHECK_SIZEOF(wchar_t, , [[
AC_CHECK_SIZEOF(OOP, , [[
typedef void *OOP;]])
-GST_LIBC_SO_NAME
-
AC_LIBTOOL_DLOPEN
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
@@ -400,6 +398,7 @@ dnl ------------------------- OTHER LIBRARIES
-------------------
{ echo; echo "${term_bold}Auxiliary libraries:${term_norm}"; } >& AS_MESSAGE_FD
+GST_LIBC_SO_NAME
GST_HAVE_GMP
GST_HAVE_READLINE
@@ -877,7 +876,6 @@ AC_CONFIG_FILES(gnu-smalltalk.pc)
AC_CONFIG_FILES(gst-config, chmod +x gst-config)
AC_CONFIG_FILES(tests/gst, chmod +x tests/gst)
AC_CONFIG_FILES(tests/atlocal)
-AC_CONFIG_FILES(libc.la)
dnl Master Makefile
AC_CONFIG_FILES(Makefile)
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk