Builds broken libdunealbertagrid3d.so - it isn't linked with alberta shared libraries
It finds Alberta at the configure time:
-- Found Alberta: /usr/local (found suitable version "3.0.3", minimum required is "3.0")
and then builds and installs successfully.
Later duneproject
-built test project fails:
1) Name of your new Project? (e.g.: dune-grid): dune-testing
2) Which modules should this module depend on?
The following modules have been found:
dune-common dune-geometry dune-uggrid dune-grid
Enter space-separated list: dune-grid dune-uggrid
3) Project/Module version? 1.0
4) Maintainer's email address? testing@test.com
[yuri@yv /tmp/dune]$ cmake --build build/
[ 50%] Building CXX object src/CMakeFiles/dune-testing.dir/dune-testing.cc.o
[100%] Linking CXX executable dune-testing
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to alloc_macro_data [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to free_mesh [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to free_dof_real_d_vec [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to alberta_realloc [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to compute_neigh_fast [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to fill_elinfo [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to free_fe_space [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to get_dof_space [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to get_dof_uchar_vec [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to read_dof_int_vec_xdr [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to alberta_alloc [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to get_dof_int_vec [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to macro_test [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to write_dof_int_vec_xdr [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to get_dof_real_d_vec [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to free_dof_int_vec [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to free_dof_uchar_vec [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to read_macro [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to funcName [--no-allow-shlib-undefined]
ld: error: /usr/local/lib/libdunealbertagrid3d.so: undefined reference to fill_macro_info [--no-allow-shlib-undefined]
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [src/CMakeFiles/dune-testing.dir/build.make:112: src/dune-testing] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1181: src/CMakeFiles/dune-testing.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
The shared library isn't linked to alberta-fem:
[yuri@yv /tmp/dune]$ ldd -a /usr/local/lib/libdunealbertagrid3d.so
/usr/local/lib/libdunealbertagrid3d.so:
libdunegrid.so => /usr/local/lib/libdunegrid.so (0x801277000)
libdunegeometry.so => /usr/local/lib/libdunegeometry.so (0x801563000)
libduneuggrid.so => /usr/local/lib/libduneuggrid.so (0x801798000)
libdunecommon.so => /usr/local/lib/libdunecommon.so (0x801b62000)
libopenblas.so.0 => /usr/local/lib/libopenblas.so.0 (0x801e00000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x8006ab000)
libtbb.so.12 => /usr/local/lib/libtbb.so.12 (0x8006af000)
libmpi.so.40 => /usr/local/mpi/openmpi/lib/libmpi.so.40 (0x803ae7000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800727000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libdunegrid.so:
libdunegeometry.so => /usr/local/lib/libdunegeometry.so (0x801563000)
libduneuggrid.so => /usr/local/lib/libduneuggrid.so (0x801798000)
libdunecommon.so => /usr/local/lib/libdunecommon.so (0x801b62000)
libopenblas.so.0 => /usr/local/lib/libopenblas.so.0 (0x801e00000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x8006ab000)
libtbb.so.12 => /usr/local/lib/libtbb.so.12 (0x8006af000)
libmpi.so.40 => /usr/local/mpi/openmpi/lib/libmpi.so.40 (0x803ae7000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800727000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libdunegeometry.so:
libdunecommon.so => /usr/local/lib/libdunecommon.so (0x801b62000)
libopenblas.so.0 => /usr/local/lib/libopenblas.so.0 (0x801e00000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x8006ab000)
libtbb.so.12 => /usr/local/lib/libtbb.so.12 (0x8006af000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800727000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libduneuggrid.so:
libmpi.so.40 => /usr/local/mpi/openmpi/lib/libmpi.so.40 (0x803ae7000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800727000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libdunecommon.so:
libopenblas.so.0 => /usr/local/lib/libopenblas.so.0 (0x801e00000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x8006ab000)
libtbb.so.12 => /usr/local/lib/libtbb.so.12 (0x8006af000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800727000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libopenblas.so.0:
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libgfortran.so.5 => /usr/local/lib/gcc10/libgfortran.so.5 (0x804200000)
libomp.so => /usr/lib/libomp.so (0x80400a000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/lib/libm.so.5:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/lib/libdl.so.1:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libtbb.so.12:
libdl.so.1 => /usr/lib/libdl.so.1 (0x8006ab000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800727000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/mpi/openmpi/lib/libmpi.so.40:
libopen-rte.so.40 => /usr/local/mpi/openmpi/lib/libopen-rte.so.40 (0x8046d2000)
libopen-orted-mpir.so => /usr/local/mpi/openmpi/lib/libopen-orted-mpir.so (0x804986000)
libopen-pal.so.40 => /usr/local/mpi/openmpi/lib/libopen-pal.so.40 (0x804b88000)
libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x8007f9000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libutil.so.9 => /lib/libutil.so.9 (0x8040d1000)
libz.so.6 => /lib/libz.so.6 (0x8040e9000)
libhwloc.so.15 => /usr/local/lib/libhwloc.so.15 (0x804105000)
libevent_core-2.1.so.7 => /usr/local/lib/libevent_core-2.1.so.7 (0x804150000)
libevent_pthreads-2.1.so.7 => /usr/local/lib/libevent_pthreads-2.1.so.7 (0x801df0000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/lib/libc++.so.1:
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d7f000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/lib/libcxxrt.so.1:
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/gcc10/libgcc_s.so.1:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/lib/libthr.so.3:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/gcc10/libgfortran.so.5:
libquadmath.so.0 => /usr/local/lib/gcc10/libquadmath.so.0 (0x804e32000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/lib/libomp.so:
libm.so.5 => /lib/libm.so.5 (0x800674000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/mpi/openmpi/lib/libopen-rte.so.40:
libopen-pal.so.40 => /usr/local/mpi/openmpi/lib/libopen-pal.so.40 (0x804b88000)
libopen-orted-mpir.so => /usr/local/mpi/openmpi/lib/libopen-orted-mpir.so (0x804986000)
libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x8007f9000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libutil.so.9 => /lib/libutil.so.9 (0x8040d1000)
libz.so.6 => /lib/libz.so.6 (0x8040e9000)
libhwloc.so.15 => /usr/local/lib/libhwloc.so.15 (0x804105000)
libevent_core-2.1.so.7 => /usr/local/lib/libevent_core-2.1.so.7 (0x804150000)
libevent_pthreads-2.1.so.7 => /usr/local/lib/libevent_pthreads-2.1.so.7 (0x801df0000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/mpi/openmpi/lib/libopen-orted-mpir.so:
libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x8007f9000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libutil.so.9 => /lib/libutil.so.9 (0x8040d1000)
libz.so.6 => /lib/libz.so.6 (0x8040e9000)
libhwloc.so.15 => /usr/local/lib/libhwloc.so.15 (0x804105000)
libevent_core-2.1.so.7 => /usr/local/lib/libevent_core-2.1.so.7 (0x804150000)
libevent_pthreads-2.1.so.7 => /usr/local/lib/libevent_pthreads-2.1.so.7 (0x801df0000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/mpi/openmpi/lib/libopen-pal.so.40:
libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x8007f9000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libutil.so.9 => /lib/libutil.so.9 (0x8040d1000)
libz.so.6 => /lib/libz.so.6 (0x8040e9000)
libhwloc.so.15 => /usr/local/lib/libhwloc.so.15 (0x804105000)
libevent_core-2.1.so.7 => /usr/local/lib/libevent_core-2.1.so.7 (0x804150000)
libevent_pthreads-2.1.so.7 => /usr/local/lib/libevent_pthreads-2.1.so.7 (0x801df0000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/lib/libexecinfo.so.1:
libelf.so.2 => /lib/libelf.so.2 (0x800247000)
libgcc_s.so.1 => /usr/local/lib/gcc10/libgcc_s.so.1 (0x803df2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/lib/libutil.so.9:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/lib/libz.so.6:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libhwloc.so.15:
libm.so.5 => /lib/libm.so.5 (0x800674000)
libpciaccess.so.0 => /usr/local/lib/libpciaccess.so.0 (0x801df5000)
libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x805079000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libevent_core-2.1.so.7:
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libevent_pthreads-2.1.so.7:
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/gcc10/libquadmath.so.0:
libm.so.5 => /lib/libm.so.5 (0x800674000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libpciaccess.so.0:
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/local/lib/libxml2.so.2:
libz.so.6 => /lib/libz.so.6 (0x8040e9000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x804186000)
libm.so.5 => /lib/libm.so.5 (0x800674000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/usr/lib/liblzma.so.5:
libmd.so.6 => /lib/libmd.so.6 (0x8041b2000)
libthr.so.3 => /lib/libthr.so.3 (0x801da2000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
/lib/libmd.so.6:
libc.so.7 => /lib/libc.so.7 (0x800263000)
I think this isessentially the same issue I discovered when I first added the Alberta-fem option: #136 (closed)
You said there:
Yes, only the application can be linked against alberta.
But this is probably only true when static libraries are used. We use shared libraries and they seem to be broken.
Version: 2.8.0
OS: FreeBSD 13
Edited by Yuri Vic