Re: Help requested: r-bioc-rhdf5lib patches need updating for bioc-3.19 upgrade

"Michael R. Crusoe" <[email protected]>
Newsgroups gmane.linux.debian.devel.medical
Message-ID <[email protected]>

On 10/07/2024 15.58, Nilesh Patra wrote:
> On Wed, Jul 10, 2024 at 12:14:05PM +0200, Michael R. Crusoe wrote:
>> I upgraded r-bioc-rhdf5lib from 1.24.2 to 1.26.0 in the "debian/experimental" branch on salsa.
>>
>> https://salsa.debian.org/r-pkg-team/r-bioc-rhdf5lib/-/tree/debian/experimental?ref_type=heads
>>
>> However when I try to build other packages using the resulting "r-bioc-rhd5lib" binary package, I get the following build errors:
>>
>> # From r-bioc-alabaster.base https://salsa.debian.org/r-pkg-team/r-bioc-alabaster.base
>> g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-z,relro -o alabaster.base.so RcppExports.o check_csv.o check_list.o choose_numeric_missing_placeholder.o is_rfc3339.o load_csv.o load_list.o validate.o /usr/lib/R/site-library/Rhdf5lib/libs/libhdf5_cpp.a /usr/lib/R/site-library/Rhdf5lib/libs/libhdf5.a -lcrypto -lcurl -lpthread -lsz -lz -ldl -lm -lz -L/usr/lib/R/lib -lR
>> /usr/bin/ld: cannot find /usr/lib/R/site-library/Rhdf5lib/libs/libhdf5_cpp.a: No such file or directory
>> /usr/bin/ld: cannot find /usr/lib/R/site-library/Rhdf5lib/libs/libhdf5.a: No such file or directory
>> collect2: error: ld returned 1 exit status
>>
>> Can I get some help with this?
>>
>> Please push any fixes directly to the "debian/experimental" branch on Salsa and let me know, thank you!
> 
> I don't have the time to write a patch/hack around this right now, but I
> understood what the issue is and it should be relatively easy to fix.
> 
> alabaster.base used Rhdf5lib::pkgconfig("PKG_CXX_LIBS") to get the linker flags
> for Rhdf5 lib as can be see here[1]
> 
> This has been set to an incorrect value as per the debian installed package[2].
> It points to a path that does not exist since we are using hdf5 packaged in
> debian instead of building and using embedded copies.
> 
> Patching the code to point to the correct path should fix the issue for you.

Thank you, Nilesh, that got me further!

With https://salsa.debian.org/r-pkg-team/r-bioc-rhdf5lib/-/commit/13333ce8837d34d244f60b4a26469ba378babcb0
I get

g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-z,relro -o alabaster.base.so RcppExports.o check_csv.o check_list.o choose_numeric_missing_placeholder.o is_rfc3339.o load_csv.o load_list.o validate.o /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.a /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a -lcrypto -lcurl -lpthread -lsz -lz -ldl -lm -lz -L/usr/lib/R/lib -lR
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.a(H5Exception.o): warning: relocation against `_ZTVN2H518DataTypeIExceptionE' in read-only section `.text'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.a(H5Exception.o): relocation R_X86_64_PC32 against symbol `_ZTVN2H59ExceptionE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/share/R/share/make/shlib.mk:10: alabaster.base.so] Error 1

> 
>> For building r-bioc-alabaster.base, feel free to use the bioc-3.19 test packages I've been making: https://people.debian.org/~crusoe/bioc/
>>
>> -- 
>> Michael R. Crusoe
> 
> [1]: https://salsa.debian.org/r-pkg-team/r-bioc-alabaster.base/-/blob/master/src/Makevars?ref_type=heads#L1
> [2]: https://salsa.debian.org/r-pkg-team/r-bioc-rhdf5lib/-/blob/debian/experimental/R/zzz.R?ref_type=heads#L73
> 
> Best,
> Nilesh
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEck1gkzcRPHEFUNdHPCZ2P2xn5uIFAmaOsM8FAwAAAAAACgkQPCZ2P2xn5uIM
BA//eMXkrmA0rJVjoxl0N6REPbAA2WCDS4my3hAl2mkPigR2TSzw5FSmhHlh59PKuVojAVW2oeJG
mdXBzOGDyytVcSdb6qe/2mnfVa8ksTidtSTvMMjtkle+Cqu/0JUkyB53UzuZ1RyfSphOfNpLqfl5
x+zOZTB2I2ZfpShXqbWo5gBEUmBMeaLZwvkAO8YkOqBhdcS+OZ8/v/+EbrUaD9FiE/f4ylK9smM5
jgMdZ61otKuxha7U8e/sX/cUpjt5ey8es2Zep8yLwc1LHbTb/xmRE1oQfB1He0VC6ToQvBQaOtGo
RRt7hZ14REm02Irns2zmgcwvhcIN41yVBW+KoPZb0UlTpT1sSLWt6nig5hbceRlMWi7n4x5+kcJ5
F2MeB4xhUeNUlTcXkOw3IWdfvjtXdWDb1Ky7tj9ygmJvFsDlZzyXEMNx69dGki8a5ZKuCzqdITuI
YA4yia/OEcM5eF+yRcLKafQSfg9zxK0E7NCEOPBNp0l5VMkeDIDEYlOOTCE3dyFqp6Ro/t4On1R3
P2v/pGAJfhqKVDrwKCZJI2usEnr31SqkIUlLqqhkeaC4oSwVZJB+2BQs/gfNeSmFHRxa3HpIqmRU
xtyyYWZwaCdPEVcxrf1A4HIuNZT2igGigffW1wQTkbqkDDXpKcWZfzhAl6+OQ/ShRuX851zqt+Bz
7yw=
=SwgG
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.