This is an old revision of the document!


Unresolved issues

In order to generate DLLs, libtool needs LDFLAGS=-no-undefined. We need to

  1. understand why
  2. figure out where to handle it

THIS SECTION IS INCORRECT

Now that's strange:

libtool: link: g++ -o .libs/dsets.exe dsets.o h5cpputil.o  ../../test/.libs/libh5test.a ../../c++/src/.libs/libhdf5_cpp.a /mingw/lib/gcc/mingw32/4.4.0/libstdc++.dll.a ../../src/.libs/libhdf5.a -lws2_32 -L/mingw/lib/gcc/mingw32/4.4.0
g++.exe: C:/MinGW/lib/gcc/mingw32/4.4.0/libstdc++.dll.a: No such file or directory

This is a well-known issue, see for instance http://old.nabble.com/forum/Search.jtp?query=mingw+%22dll.a%22. Executive summary: the .la files contain incorrect information.

The simplest fix is to clear library_names in all .la files:

$ find /mingw/lib -name '*.la' | while read f ; do echo $f ; sed -e "s/library_names='[^']*'/library_names=\'\'/" $f > $f- && mv $f- $f ; done

The problem is that the same will happen to your own shared libraries, unless you fix libtool. You need to edit /mingw/share/aclocal/libtool.m4, /mingw/share/libtool/libltdl/configure, /mingw/share/libtool/config/ltmain.sh and /mingw/bin/libtool; replace any occurrence of library_names_spec='$libname.dll.a' with library_names_spec='', and any occurrence of *.dll.a) with *.a.

/bin/sh ../libtool --tag=F77   --mode=compile gfortran  -g -O2 -x f77-cpp-input -c -o getvar.lo getvar.f
libtool: compile:  gfortran -g -O2 -x f77-cpp-input -c getvar.f  -DDLL_EXPORT -o .libs/getvar.o getvar.f:93.65:

      data cend/ ' ' , '.' , '/' , '$' , '#' , '?' , ',' , ';' , '\\' / 
                                                                 1
Warning: initialization string truncated to match variable at (1)
libtool: compile:  gfortran -g -O2 -x f77-cpp-input -c getvar.f -o getvar.o >/dev/null 2>&1

This does not happen on Ubuntu, but in all fairness, we're using a different compiler (or, to be exact a different compiler version: gfortran 4.2.4 on Ubuntu, gfortran 4.4.0 on Windows).

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • diana/windows/building/issues.1258369950.txt.gz
  • Last modified: 2022-05-31 09:23:14
  • (external edit)