[netcdfgroup] netcdf-4.4.0-rc3 on cygwin

Tested netcdf-4.4.0-rc3 on cygwin 64bit with the attached patch
to add shared lib capability.
The patch is a better version of the one I was using before for the cygwin package releases.

The test with
--enable-shared --enable-netcdf4

is fine except ctest.c and ctest64.c as they segfault.

I presume the problem is in the test as copying the
ctest.c and ctest64.c from 4.3.3.1 version build is fine.
They do not segfault.

Same happened on 4.4.0-rc2

Regards
Marco
--- origsrc/netcdf-c-4.4.0-rc3/configure.ac     2015-10-08 21:25:39.000000000 
+0200
+++ src/netcdf-c-4.4.0-rc3/configure.ac 2015-10-29 22:38:30.039691700 +0100
@@ -1145,6 +1144,19 @@ AH_BOTTOM(
 # Access netcdf specific version of config.h
 AH_BOTTOM([#include "ncconfigure.h"])
 
+AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared 
libraries])
+case "`uname`" in
+  CYGWIN*|MINGW*|AIX*)
+    ## Add in the -no-undefined flag to LDFLAGS for libtool.
+    AC_MSG_RESULT([yes])
+    NOUNDEFINED=" -no-undefined"
+    ;;
+  *)
+    ## Don't add in anything.
+    AC_MSG_RESULT([no])
+    ;;
+esac
+
 ##################################################
 # Uncomment this to keep a copy of autoconf defines at this point, for
 # debugging purposes.
@@ -1163,6 +1175,7 @@ AC_SUBST([LDFLAGS])
 AC_SUBST([AM_CFLAGS])
 AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AM_LDFLAGS])
+AC_SUBST([NOUNDEFINED])
 
 # Args:
 # 1. netcdf_meta.h variable
--- origsrc/netcdf-c-4.4.0-rc3/liblib/Makefile.am       2015-10-08 
21:25:39.000000000 +0200
+++ src/netcdf-c-4.4.0-rc3/liblib/Makefile.am   2015-10-29 21:50:55.677096400 
+0100
@@ -19,7 +19,7 @@ lib_LTLIBRARIES = libnetcdf.la
 # for information regarding incrementing `-version-info`.
 ##
 
-libnetcdf_la_LDFLAGS = -version-info 10:0:3
+libnetcdf_la_LDFLAGS = -version-info 10:0:3 ${NOUNDEFINED}
 
 libnetcdf_la_CPPFLAGS = ${AM_CPPFLAGS}
 libnetcdf_la_LIBADD =
  • 2015 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: