<div dir="ltr">Package: libblaspp-dev<br>Version: 2025.05.28-1<br><br>Dear Maintainer,<br><br>libblaspp-dev ships only a static libblaspp.a. debian/rules builds it<br>with -DBUILD_SHARED_LIBS=NO, so CMake does not add -fPIC and the objects<br>are compiled as PIE (the GCC default). As a result the archive cannot be<br>linked into any shared library, e.g. a Python extension module. Linking<br>into executables works.<br><br>Reproducer (debian:sid amd64 container, g++ 4:16.1.0-3, binutils 2.47-6):<br><br>  $ cat blas_plugin.cc<br>  #include <blas.hh><br>  double dot3 (double const* x, double const* y)<br>  { return blas::dot( 3, x, 1, y, 1 ); }<br><br>  $ g++ -shared -fPIC blas_plugin.cc -o libb.so -lblaspp -lblas<br>  /usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/16/../../../x86_64-linux-gnu/libblaspp.a(dot.cc.o): warning: relocation against `_ZTIN4blas5ErrorE' in read-only section `.text._ZN4blas4impl3dotIdEET_lPKS2_lS4_l[_ZN4blas4impl3dotIdEET_lPKS2_lS4_l]'<br>  /usr/bin/x86_64-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-linux-gnu/16/../../../x86_64-linux-gnu/libblaspp.a(dot.cc.o): relocation R_X86_64_PC32 against symbol `_ZTVN4blas5ErrorE' can not be used when making a shared object; recompile with -fPIC<br>  /usr/bin/x86_64-linux-gnu-ld.bfd: final link failed: bad value<br>  collect2: error: ld returned 1 exit status<br><br>Suggested fix: we could also ship the shared library, which is the<br>upstream default (upstream sets SOVERSION, i.e. libblaspp.so.2 for<br>2025.05.28). I saw that the Debian policy 10.2 discourages -fPIC in<br>static archives, so this seems cleaner than building the static<br>library with CMAKE_POSITION_INDEPENDENT_CODE=ON.<br>Note that debian/rules configures twice (override_dh_auto_configure and<br>override_dh_auto_build), so any flag change is needed in both places.<br><br>Real-world impact: the Python bindings of WarpX fail to build against<br>this package (seen on Ubuntu 26.04, same version):<br><a href="https://github.com/BLAST-WarpX/warpx/issues/7250">https://github.com/BLAST-WarpX/warpx/issues/7250</a><br><br>liblapackpp-dev has the same problem, I reported it separately.<br><br>Thanks,<br>Axel Huebl</div>