You are not logged in.

#1 2021-12-26 14:33:57

Meta-chan
Member
Registered: 2021-12-21
Posts: 2

Update dependencies without recompiling?

Hi! I'm using Arch for several month, and here is a problem I face very often:

I have gazebo build from AUR (robotics simulator, written in C++), it depends on boost_thread (and many other libraries).

Sometimes boost has it's .so libraries updated. For example today it got updated from libboost_thread.so.1.76.0 to libboost_thread.so.1.78.0. gazebo was compiled with libboost_thread.so.1.76.0, and it obviously can't find libboost_thread.so.1.78.0. I program C++ for quite a while, I know why is it happening. I just think that it would be much easier if gazebo was compiled with libboost_thread.so, which always points to latest version. Isn't that how things supposed to happen? Is there a way to force compilation against .so files with no versions?

I know that the program is not going to be started once some used function gets deprecated, but is there no solution to this? Or is it specific for each package? I'm just tired of recompiling all the stuff, which takes 4-5 hours. Now I am just doing `cp libboost_thread.so.1.78.0 libboost_thread.so.1.76.0`, but I understand it is wrong.

Thanks in advance.

Offline

#2 2021-12-26 15:06:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,154

Re: Update dependencies without recompiling?

Those boost versions aren't ABI compatible so even if you'd link the gneric .so, you're just asking for stack corruptions.

but I understand it is wrong

Yes. Very.

You can rather keep the old boost libraries around (so there's libboost_thread.so.1.78.0 and libboost_thread.so.1.76.0 and libboost_thread.so links libboost_thread.so.1.78.0 but your binary can still resolve libboost_thread.so.1.76.0) - ideally by creating and installing a package with just those versioned shared objects.

Offline

#3 2021-12-26 15:19:05

Meta-chan
Member
Registered: 2021-12-21
Posts: 2

Re: Update dependencies without recompiling?

Arch won't let me install specific version, so seems like the the only option is to keep the old one (at least .so files) while updating. Is there a way to automate it?

Offline

#4 2021-12-26 15:24:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,154

Re: Update dependencies without recompiling?

Because it's a rolling release distro.
You could use a pacman hook that archives the shared object(s) and restores them after the package was updated, https://wiki.archlinux.org/title/Pacman#Hooks and https://wiki.archlinux.org/title/Pacman … de/removal

Offline

Board footer

Powered by FluxBB