Source: mfem Version: 4.5.2+ds-1.1 Severity: serious Justification: the directories hardcoded in header file points to unexisting locations.
Hello, I found some issues on the packaging of mfem, and I would like to see them fixed because I don't think the package is good for stable in this way, but feel free to close if you think this isn't the case! First issue: this is passed in configure: -DINSTALL_LIB_DIR=lib/x86_64-linux-gnu instead of DEB_HOST_MULTIARCH, causing a lot of pain a little bit after: dh_fixperms chrpath -d debian/libmfem4*/usr/lib/*-*/libmfem.so* # one day this will also work on non x86_64-linux-gnu # debian/libmfem-dev/usr/lib/cmake/mfem/*.cmake are with absolute wrong/build paths sed -i "s,/.*/lib/.*/libmfem.so.4.5.2,/usr/lib/x86_64-linux-gnu/libmfem.so.4.5.2,g" debian/libmfem-dev/usr/lib/cmake/mfem/MFEMTargets-*.cmake # one day someone will fix the -ffile-prefix-map sed -i "s,/.*/lib/.*x86_64-linux-gnu,/usr/lib/x86_64-linux-gnu,g" debian/libmfem-dev/usr/lib/cmake/mfem/MFEMConfig.cmake (for some reasons the DESTDIR contains the full path of the build, not the relative one, so this causes a lot of other issues) Second issue: cat /usr/include/mfem/config/_config.hpp |grep build #define MFEM_SOURCE_DIR "/build/reproducible-path/mfem-4.5.2+ds" MFEM_SOURCE_DIR and MFEM_INSTALL_DIR are used in many places in the code, and this will fail. fem/ceed/interface/util.cpp: const char *install_dir = MFEM_INSTALL_DIR "/include/mfem/fem/ceed"; fem/ceed/interface/util.cpp: MFEM_ABORT("Cannot find libCEED kernels in MFEM_INSTALL_DIR or " general/device.cpp: if (occa::io::exists(MFEM_INSTALL_DIR "/include/mfem/")) general/device.cpp: mfemDir = MFEM_INSTALL_DIR "/include/mfem/"; general/device.cpp: MFEM_ABORT("Cannot find OCCA kernels in MFEM_INSTALL_DIR or MFEM_SOURCE_DIR"); fem/ceed/interface/util.cpp: const char *source_dir = MFEM_SOURCE_DIR "/fem/ceed"; fem/ceed/interface/util.cpp: "MFEM_SOURCE_DIR"); general/device.cpp: else if (occa::io::exists(MFEM_SOURCE_DIR)) general/device.cpp: mfemDir = MFEM_SOURCE_DIR; general/device.cpp: MFEM_ABORT("Cannot find OCCA kernels in MFEM_INSTALL_DIR or MFEM_SOURCE_DIR"); Third issue: the shipped cmake file looks wrong and broken (this is a good candidate for autopkgtest :) ) cat ../CMakeLists.txt cmake_minimum_required(VERSION 3.27) project(foo) find_package(MFEM) cmake .. -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at /usr/lib/cmake/mfem/MFEMConfig.cmake:88 (message): File or directory /usr/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi referenced by variable MFEM_INCLUDE_DIR does not exist ! Call Stack (most recent call first): /usr/lib/cmake/mfem/MFEMConfig.cmake:106 (set_and_check) CMakeLists.txt:3 (find_package) -- Configuring incomplete, errors occurred! I'm stopping here, but I think we need some fixes before considering it good enough for stable, what do you think? Gianfranco
OpenPGP_signature
Description: OpenPGP digital signature