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 authentication level.

bug #37894: Shared library does not build on Cygwin

Submitter:  Jean-Pierre Flori <jpflori>
Submitted:  Mon 10 Dec 2012 06:05:08 PM UTC
   
 
Category:  Build Severity:  3 - Normal
Operating System:  Cygwin Status:  None
Assigned to:  None Open/Closed:  Open
Release: 

Thu 20 Feb 2014 04:31:43 PM UTC, 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 04 Feb 2013 09:42:48 PM UTC, 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 10 Dec 2012 06:43:44 PM UTC, 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 10 Dec 2012 06:16:52 PM UTC, comment #1: 

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

- Rhys

Rhys Ulerich <rhysu>
Group administrator
Mon 10 Dec 2012 06:05:08 PM UTC, 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #27387:  gsl-autotools.diff added by jpflori (2KiB - 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
  • -email is unavailable- added by rhysu (Posted a comment)
  • -email is unavailable- added by jpflori (Submitted the item)
  •  

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-04 jpflori Attached File- Added gsl-autotools.diff, #27387

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code