I'm having an unexpected linking error with code that has previously
built without problem against earlier GSL versions.

I'm using Kubuntu 11.10 with GSL 1.15, newly installed.  The errors
during build are as follows:

************************************************************************
/bin/bash ../libtool --tag=CXX   --mode=link g++ -I.. -g -O2 -lgsl
-lgslcblas -lm    -o minga minga.o libminga.la
libtool: link: g++ -I.. -g -O2 -o .libs/minga minga.o  -lgsl -lgslcblas
-lm ./.libs/libminga.so
./.libs/libminga.so: undefined reference to `gsl_rng_uniform_int'
./.libs/libminga.so: undefined reference to `gsl_rng_uniform'
collect2: ld returned 1 exit status
************************************************************************

I don't see why I should be generating these errors given that the
various calls to gsl, gslcblas and the maths library are all present in
the g++ call.  This code has previously built without problem (i.e.
prior to the install of the latest Kubuntu).  libgsl0-dev is installed;
running ldconfig -p reveals,

$ ldconfig -p | grep gsl
        libgslcblas.so.0 (libc6,x86-64) => /usr/lib/libgslcblas.so.0
        libgslcblas.so (libc6,x86-64) => /usr/lib/libgslcblas.so
        libgsl.so.0 (libc6,x86-64) => /usr/lib/libgsl.so.0
        libgsl.so (libc6,x86-64) => /usr/lib/libgsl.so

... so it's not a case of the libraries not being installed.

I've attached a copy of my configure.ac file, in case this can shed any
light.  Perhaps the autotools placing the LDFLAGS in the wrong position
in the call to g++?

Thanks in advance for any advice,

    -- Joe
AC_INIT([Minga],[development version])
AC_CONFIG_SRCDIR([minga/minga.cpp])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

AC_CONFIG_HEADERS([config.h])

AC_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX


MINGA_LT_VERSION="0:0:0"
AC_SUBST(MINGA_LT_VERSION)

AC_LANG(C)
AC_LANG(C++)
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LN_S

dnl Swig specific options

AM_PATH_PYTHON([2.5])
AC_PROG_SWIG([1.3.21])
SWIG_ENABLE_CXX
SWIG_PYTHON


dnl Disable unnecessary libtool tests for FORTRAN and Java
define([AC_LIBTOOL_LANG_F77_CONFIG],[:])dnl
define([AC_LIBTOOL_LANG_GCJ_CONFIG],[:])dnl
AC_PROG_LIBTOOL

dnl Check for Python

AX_PYTHON

dnl Check for Boost libraries

AX_BOOST_BASE([1.36.0])
AX_BOOST_PYTHON

PKG_CHECK_MODULES(DEPS,[gsl >= 1.8])
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_CXXFLAGS)
AC_SUBST(DEPS_LIBS)

MINGA_CFLAGS="-I$includedir $DEPS_CFLAGS"
MINGA_CXXFLAGS="-I$includedir $DEPS_CXXFLAGS"
MINGA_LDFLAGS="$DEPS_LIBS"
MINGA_LIBS="-L$libdir -lminga $MINGA_LDFLAGS"

AC_SUBST([MINGA_CFLAGS])
AC_SUBST([MINGA_CXXFLAGS])
AC_SUBST([MINGA_LDFLAGS])
AC_SUBST([MINGA_LIBS])

dnl CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Werror"
dnl CXXFLAGS="$CXXFLAGS -ansi -pedantic -Wall"

AC_CONFIG_FILES([minga/minga.pc minga/minority/agent/Makefile 
minga/minority/game/Makefile minga/minority/interactive/Makefile 
minga/minority/reward/Makefile minga/minority/Makefile minga/Makefile 
pyminga/Makefile Makefile pyminga/api_spec/Makefile])
AC_OUTPUT
_______________________________________________
Help-gsl mailing list
Help-gsl@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to