#1413 Installed static dune libraries are not linked correctly with libtool
Metadata
Property | Value |
---|---|
Reported by | Markus Blatt (markus@dr-blatt.de) |
Reported at | Jan 9, 2014 20:53 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Markus Blatt (markus@dr-blatt.de) |
Last edited at | Jan 9, 2014 22:44 |
Closed by | Markus Blatt (markus@dr-blatt.de) |
Closed at | Jan 9, 2014 22:44 |
Closed in version | 2.3 |
Resolution | Not a bug |
Comment | in the core module. It was caused by errors in LDADD see http://cgit.dune-project.org/repositories/dune-pdelab/commit/?id=795acb4d45ed92d002fb7856bd407e7f79e513a6 |
Description
Hi,
I am finally back in libtool hell. How I missed this ;)
I am totally helpless and would appreciate any input.
The problem occurs with an installed DUNE (mine is installed from the tarballs generated with the following opts file:
CONFIGURE_FLAGS="--prefix=/home/mblatt/dune_install --enable-documentation --enable-officialtarballs" BUILDDIR=build-dist MAKE_FLAGS="-j4 dist"
The installed libraries are (note: no dynamic libraries!): mblatt@boromir:/tmp/auto/dune-pdelab/dune/pdelab/test$ ls ~/dune_install/lib/ dunecommonam2cmake.lib libdunealbertagrid_2d.a libdunegeometry.la dunecontrol libdunealbertagrid_2d.la libdunegrid.a dunegridam2cmake.lib libdunealbertagrid_3d.a libdunegrid.la duneistlam2cmake.lib libdunealbertagrid_3d.la pkgconfig dunemodules.lib libdunecommon.a symbols.txt libdunealbertagrid_1d.a libdunecommon.la libdunealbertagrid_1d.la libdunegeometry.a
The problem occurs when compiling dune/pdelab/test/testelasticity during make check where I get a lot of missing symbols errors. I will attach a log.
Ther problem seems to be set linker statements are extracted with pkgconfig and are e.g. DUNE_GEOMETRY_LIBS = -L/home/mblatt/dune_install/lib -ldunegeometry. These are passed via libtool unchanged to g++, which fails miserably.
The funny thing is that all tests that link to e.g. to alberta compile without any errors. The reason is that due to ALBERTA1D_LIBS = $(DUNE_GRID_LIBDIR)/libdunealbertagrid_1d.la $(DUNE_GRID_LIBDIR)/libdunegrid.la $(ALBERTA_LIBPATHFLAGS) -lalberta_1d $(ALBERTA_BASE_LIBS) libtool gets implicitly presented with the lib*.la files of all the modules.
If I specify the complete path to the static lib then linking is successfull. The same holds for presenting the full path to the lib*.la files to libtool.
The question is how to resolve this.
- simply compute the *.la file from the *.pc files in the module tests and pass them libtool
- Use another way to presuade g++ to also try the static libraries (how?)