Bug#1058868: [Debichem-devel] Bug#1058868: gemmi: Please build shared library
Control: tags -1 + wontfix On 12/19/23 12:43, Andrius Merkys wrote: Hi, On 2023-12-17 11:31, Yadd wrote: currently src:gemmi builds gemmi and gemmi-dev. This doesn't permit to build any software using gemmi-dev without static linking. The proposed patch adds package libgemmi1 which contains the shared library. I looked into the shared library provided by gemmi v0.6.4 (newer upstream release than in your patch). This version of gemmi builds the shared library by default. However, the produced shared library does not carry a soversion, thus according to Debian principles it is not suitable to be packaged as public shared library, alas. Thus static linking is the only option for now. Best wishes, Andrius Noted, thank you very much for your time! Cheers, Yadd
Bug#1058868: [Debichem-devel] Bug#1058868: gemmi: Please build shared library
Hi, On 2023-12-17 11:31, Yadd wrote: currently src:gemmi builds gemmi and gemmi-dev. This doesn't permit to build any software using gemmi-dev without static linking. The proposed patch adds package libgemmi1 which contains the shared library. I looked into the shared library provided by gemmi v0.6.4 (newer upstream release than in your patch). This version of gemmi builds the shared library by default. However, the produced shared library does not carry a soversion, thus according to Debian principles it is not suitable to be packaged as public shared library, alas. Thus static linking is the only option for now. Best wishes, Andrius
Bug#1058868: [Debichem-devel] Bug#1058868: gemmi: Please build shared library
Control: owner -1 ! Control: tags -1 - moreinfo Hi, On 2023-12-18 09:47, Yadd wrote: yas I'm going to package ovito which depends on it. If shared library isn't provided, cmake automatically uses libgemmi_cpp.a which then embed gemmi into ovito I see. OK, let me apply your patch and build the shared library for gemmi, and let's see what happens. Best wishes, Andrius
Bug#1058868: gemmi: Please build shared library
> I appreciate the idea and your patch, thanks for giving gemmi a look. > However, I am hesitant to package gemmi shared library for Debian for > now. The previous two releases had breaking API changes each. If > upstream handles this properly and bumps the soversion, then this is > fine, although having to undergo a transition twice a year is still > quite some work. However, if the upstream does not maintain ABI > stability inside the same soversion, then I would say the shared > library is not yet ready for Debian. > > You have marked this bug as severity:important. Does this mean you > need gemmi's shared library for some package? Hi, yas I'm going to package ovito which depends on it. If shared library isn't provided, cmake automatically uses libgemmi_cpp.a which then embed gemmi into ovito :-( > I never had the need to manually trigger the ldconfig before. The > issue might be the lack of 'Section: libs' in binary package > description. Maybe it's the issue Best regards, Yadd
Bug#1058868: [Debichem-devel] Bug#1058868: gemmi: Please build shared library
Control: tags -1 + moreinfo Hi Yadd, On 2023-12-17 11:31, Yadd wrote: Source: gemmi Version: 0.6.3+ds-1 Severity: important Tags: patch X-Debbugs-Cc: y...@debian.org Hi, currently src:gemmi builds gemmi and gemmi-dev. This doesn't permit to build any software using gemmi-dev without static linking. The proposed patch adds package libgemmi1 which contains the shared library. I appreciate the idea and your patch, thanks for giving gemmi a look. However, I am hesitant to package gemmi shared library for Debian for now. The previous two releases had breaking API changes each. If upstream handles this properly and bumps the soversion, then this is fine, although having to undergo a transition twice a year is still quite some work. However, if the upstream does not maintain ABI stability inside the same soversion, then I would say the shared library is not yet ready for Debian. You have marked this bug as severity:important. Does this mean you need gemmi's shared library for some package? I never had the need to manually trigger the ldconfig before. The issue might be the lack of 'Section: libs' in binary package description. Thanks, Andrius
Bug#1058868: gemmi: Please build shared library
Source: gemmi Version: 0.6.3+ds-1 Severity: important Tags: patch X-Debbugs-Cc: y...@debian.org Hi, currently src:gemmi builds gemmi and gemmi-dev. This doesn't permit to build any software using gemmi-dev without static linking. The proposed patch adds package libgemmi1 which contains the shared library. -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (900, 'testing'), (100, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 6.5.0-5-amd64 (SMP w/12 CPU threads; PREEMPT) Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -- no debconf information diff --git a/debian/control b/debian/control index 9f5e3d6..0490b00 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,7 @@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, + libgemmi1 (= ${binary:Version}) Description: library for structural biology - executable Library for macromolecular crystallography and structural bioinformatics. For working with coordinate files (mmCIF, PDB, mmJSON), refinement restraints @@ -38,11 +39,27 @@ Description: library for structural biology - executable . This package contains main gemmi executable. +Package: libgemmi1 +Architecture: any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Description: sharred library for structural biology + Library for macromolecular crystallography and structural bioinformatics. For + working with coordinate files (mmCIF, PDB, mmJSON), refinement restraints + (monomer library), electron density maps (CCP4), and crystallographic + reflection data (MTZ, SF-mmCIF). It understands crystallographic symmetries, + it knows how to switch between the real and reciprocal space and it can do a + few other things. + . + This package contains main gemmi shared library. + Package: gemmi-dev Architecture: any Section: libdevel Depends: ${misc:Depends}, + libgemmi1 (= ${binary:Version}) Description: library for structural biology Library for macromolecular crystallography and structural bioinformatics. For working with coordinate files (mmCIF, PDB, mmJSON), refinement restraints diff --git a/debian/gemmi-dev.install b/debian/gemmi-dev.install index 91a7942..7de1c21 100644 --- a/debian/gemmi-dev.install +++ b/debian/gemmi-dev.install @@ -1,2 +1,2 @@ usr/include/gemmi -usr/lib/${DEB_HOST_MULTIARCH} +usr/lib/${DEB_HOST_MULTIARCH}/cmake diff --git a/debian/libgemmi1.install b/debian/libgemmi1.install new file mode 100644 index 000..65440b7 --- /dev/null +++ b/debian/libgemmi1.install @@ -0,0 +1 @@ +usr/lib/${DEB_HOST_MULTIARCH}/*.so diff --git a/debian/libgemmi1.postinst b/debian/libgemmi1.postinst new file mode 100644 index 000..fb2c2d8 --- /dev/null +++ b/debian/libgemmi1.postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "$1" = "triggered" ] || [ "$1" = "configure" ]; then + ldconfig -r "$DPKG_ROOT/" || ldconfig --verbose -r "$DPKG_ROOT/" + exit 0 +fi + +exit 0 diff --git a/debian/rules b/debian/rules index 8228c67..b3e31be 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ export DEB_CXXFLAGS_MAINT_APPEND = -fexcess-precision=fast # See #1042379 dh $@ --buildsystem cmake --with python3 override_dh_auto_configure: - dh_auto_configure -- -DUSE_PYTHON=1 -DINSTALL_EGG_INFO=OFF + dh_auto_configure -- -DUSE_PYTHON=1 -DINSTALL_EGG_INFO=OFF -DBUILD_SHARED_LIBS=ON override_dh_auto_test: dh_auto_build -- check