Package: gmsh Version: 2.5.1~beta1~svn9559~dfsg-1 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu oneiric ubuntu-patch
the package gmsh fails to build with ld --as-needed when building with ld --as-needed the libraries must be placed after the objects needing their symbols. The package sets libraries in CMAKE_CXX_FLAGS, so they get placed in the wrong position and one gets undefined references. See the log in the ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/gmsh/+bug/803181 Attached patch fixes this issue adding them to target_link_libraries(gmsh,..) and removes them from debian/rules.
diff -Nru gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/fix-as-needed-build.patch gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/fix-as-needed-build.patch --- gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/fix-as-needed-build.patch 1970-01-01 01:00:00.000000000 +0100 +++ gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/fix-as-needed-build.patch 2011-07-10 15:22:39.000000000 +0200 @@ -0,0 +1,11 @@ +--- gmsh-2.5.1~beta1~svn9559~dfsg.orig/CMakeLists.txt ++++ gmsh-2.5.1~beta1~svn9559~dfsg/CMakeLists.txt +@@ -925,7 +925,7 @@ elseif(HAVE_QT) + else(HAVE_FLTK) + add_executable(gmsh Common/Main.cpp ${GMSH_SRC}) + endif(HAVE_FLTK) +-target_link_libraries(gmsh ${LINK_LIBRARIES}) ++target_link_libraries(gmsh ${LINK_LIBRARIES} -lgl2ps -lGL -lglut) + + # increase stack to 16Mb on Windows to avoid overflows in recursive + # tet classification for large 3D Delaunay grids + force static diff -Nru gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/series gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/series --- gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/series 2011-07-06 15:06:52.000000000 +0200 +++ gmsh-2.5.1~beta1~svn9559~dfsg/debian/patches/series 2011-07-10 15:22:39.000000000 +0200 @@ -3,3 +3,4 @@ fix_spelling_errors.patch switch_off_metis_and_tetgen.patch delete_gl2ps_from_source.patch +fix-as-needed-build.patch diff -Nru gmsh-2.5.1~beta1~svn9559~dfsg/debian/rules gmsh-2.5.1~beta1~svn9559~dfsg/debian/rules --- gmsh-2.5.1~beta1~svn9559~dfsg/debian/rules 2011-07-06 14:52:29.000000000 +0200 +++ gmsh-2.5.1~beta1~svn9559~dfsg/debian/rules 2011-07-10 15:22:12.000000000 +0200 @@ -4,7 +4,7 @@ %: dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) -extra_flags += -DCMAKE_CXX_FLAGS="-DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -fopenmp -lgl2ps -lGL -lglut" -DCMAKE_INCLUDE_PATH:="/usr/include/mpi" +extra_flags += -DCMAKE_CXX_FLAGS="-DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX -fopenmp" -DCMAKE_INCLUDE_PATH:="/usr/include/mpi" override_dh_auto_clean: rm -rf $(BUILDDIR)
signature.asc
Description: OpenPGP digital signature