bugGNU Scientific Library - Bugs: bug #37894, Shared library does not build on...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #37894: Shared library does not build on Cygwin

Submitted by:  Jean-Pierre Flori <jpflori>
Submitted on:  Mon Dec 10 18:05:08 2012  
 
Category: BuildSeverity: 3 - Normal
Operating System: CygwinStatus: None
Assigned to: NoneOpen/Closed: Open
Release: 

Thu Feb 20 16:31:43 2014, comment #4:

Any chance to integrate the suggested patch into the next release?
We've been using it in Sage for months without any problem on any kind of platform we support.

Jean-Pierre Flori <jpflori>
Mon Feb 4 21:42:48 2013, comment #3:

Here comes a patch implementing the proposed changes.
(Also note that some autotools variable used are deprecated.)
You would need to run "autoreconf -i" or something similar after applying the patch.

By the way, tests in the histogram and ode-initval (some message about too large order change or something like that) directories fail and correctly building a shared library let Sage (http://www.sagemath.org) pass some tests it failed before.

(file #27387)

Jean-Pierre Flori <jpflori>
Mon Dec 10 18:43:44 2012, comment #2:

The way I would do it, inspired by other project, is to modify configure.ac where MINGW and MINGW32_HOST are defined (from line 150) to something like:
AC_SUBST(GSL_LDFLAGS)
AC_SUBST(GSL_LIBADD)
case "$host_os" in
cygwin | mingw )
if test "$enable_shared" = yes; then
GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined"
GSL_LIBADD="cblas/libgslcblas.la"
fi
;;
esac

And in cblas/Makefile.am, replace at the top
libgslcblas_la_LDFLAGS = -version-info $(GSL_LT_CBLAS_VERSION)

MINGW32_HOST = @MINGW32_HOST@
if MINGW32_HOST
libgslcblas_la_LDFLAGS += -no-undefined
endif
by
libgslcblas_la_LDFLAGS = @GSL_LDFLAGS@ -version-info $(GSL_LT_CBLAS_VERSION)

And in Makefile.am, do something similar and get
libgsl_la_LIBADD = @GSL_LIBADD@ $(SUBLIBS)
libgsl_la_LDFLAGS = @GSL_LDFLAGS@ -version-info $(GSL_LT_VERSION)

See https://github.com/wbhart/mpir/blob/master/configure.in#L1840 for how this is done in MPIR.

And here https://gforge.inria.fr/scm/viewvc.php/trunk/configure.ac?view=markup&root=mpfr for MPFR.

Best,
JP

Jean-Pierre Flori <jpflori>
Mon Dec 10 18:16:52 2012, comment #1:

Could you suggest an "if" statement that would detect those platforms?

- Rhys

Rhys Ulerich <rhysu>
Project Administrator
Mon Dec 10 18:05:08 2012, original submission:

Dear all,

Your autotools configuration files let shared library build on MinGW by passing the -no-undefined flag to libtool with the following piece of code:
MINGW32_HOST = @MINGW32_HOST@
if MINGW32_HOST
libgsl_la_LIBADD += cblas/libgslcblas.la
libgsl_la_LDFLAGS += -no-undefined
endif

The same is done for libgslcblas.

A similar trick is needed on Cygwin (and surely other flavours of MinGW which now exist).

Could you modify the tests so that the flag is passed as well on such platforms?

Best,
JP

Jean-Pierre Flori <jpflori>

 

Attached Files
file #27387:  gsl-autotools.diff added by jpflori (2kB - text/x-diff - Patch for autotools files)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rhysu (Posted a comment)
  • -unavailable- added by jpflori (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Feb 4 21:42:48 2013jpfloriAttached File-=>Added gsl-autotools.diff, #27387

    Back to the top


    Powered by Savane 3.1-cleanup