how to solve a dependency bug AKA subversion pseudobug

Post tutorials, HOWTO's and other useful resources here.
port
Samurai
Samurai
Posts: 137
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

how to solve a dependency bug AKA subversion pseudobug

Post#1 by port » 04 Mar 2016, 11:01

In the wish this being useful for newbies coming to Porteus I will show how to solve common dependency problems with packages and modules you build.

When I tried to install subversion from slackware using usm, after generating a bundle and activating it, svn doesn't work because it fails to find library libdb-4.4.so

There's a library libdb-4.8.so in /lib64/ but subversion needs version 4.4 so a simple patch is just to link it as libdb-4.4.so

Code: Select all

# cd /lib64 && ln -s libdb-4.8.so libdb-4.4.so
But you can trace the problem back to the origin:

Code: Select all

# find /mnt/live/memory/images/ -name 'libdb-*'
/mnt/live/memory/images/001-core.xzm/lib64/libdb-4.8.so
 
As you can see library libdb is provided by bundle 001-core.xzm

The question is how to correct that problem for other users, there's two options:

1- You can include in bundle 001-core.xzm a libdb-4.4.so link to real 4.8 version included, but that seems weird because you should include a link for every previous version of the library in case some program to be installed use it, bad idea

2- You can patch the subversion bundle generated by usm to include the version 4.4 link:

Code: Select all

# xzm2dir subversion-1.7.16-x86_64-bundle.xzm t
# cd t
# ls 
usr  var
# mkdir lib64
# cd lib64
# ln -s /lib64/libdb-4.8.so libdb-4.4.so
# cd ../..
# dir2xzm t subversion-1.7.16-x86_64-bundle.xzm 
This way you can customize the bundle to your system particular needings but this has the inconveniet it makes harder to share the bundle because the link will hide existing library, you may think this isn't a problem because you are providing a newer library and an access to it for old ones but reality is compatibility is not perfect and system programs may be affected.

So a better solution is to include the real version library needed, the real file rather than a link, so we need to know which package provides the library currently installed (libdb-4.8.so):

Code: Select all

# grep libdb- /var/log/packages/*
/var/log/packages/aaa_elflibs-14.1-x86_64-1ftm:lib64/libdb-4.8.so
Now we know the package providing the library is aaa_elflibs and thus we use http://packages.slackare.com to search for a version of the package including our desired version of library.

Image

And after selecting your architecture in the release droplist (in my case Slackware64) you can enter the package name aaa_elflibs in search edit box. To see the detais of the package just click on the name:

Image

And looking in package contents you find the library we are looking for:

Image

A more direct way to find the library is to search for library name selecting content in Mode droplist.

Once you have the package just download it from http://packages.slackare.com in package details view, unzip the contents and copy the real library file to the uncompressed bundle directory:

Code: Select all

# pwd
/home/guest
# mkdir tmp && cd tmp && tar xvJf ~guest/Downloads/aaa_elflibs-14.2-x86_64-10.txz
# cd /home/guest
# xzm2dir subversion-1.7.16-x86_64-bundle.xzm t
# cd t
# ls 
usr  var
# mkdir lib64
# cd lib64
# cp ~guest/tmp/usr/lib64/libdb-4.4.so .
# cd /home/guest
# dir2xzm t subversion-1.7.16-x86_64-bundle.xzm 
This way is more secure to share the bundle you've built because even when this package will hide the user installed library if any, the library included in the package is the real one so no changes at all if library version already installed and if the user has no library version installed the bundle will supply the right one.

So you can solve the problem in a local system way or in a more shareable way, the final decision is up to you!
Last edited by port on 11 Mar 2016, 10:17, edited 2 times in total.

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Re: how to solve a dependency bug AKA subversion pseudobug

Post#2 by Rava » 10 Mar 2016, 06:40

Where do you find that zm2dir ? I don't have it in Porteus 3.1!
Cheers!
Yours Rava

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: how to solve a dependency bug AKA subversion pseudobug

Post#3 by francois » 11 Mar 2016, 02:11

Nice demonstration port. Your contribution is appreciated. :)
Prendre son temps, profiter de celui qui passe.

port
Samurai
Samurai
Posts: 137
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Re: how to solve a dependency bug AKA subversion pseudobug

Post#4 by port » 11 Mar 2016, 10:12

thank you for the warning, Rava ;) Already corrected.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: how to solve a dependency bug AKA subversion pseudobug

Post#5 by Bogomips » 05 Apr 2016, 18:46

Maybe this thread should be in Tutorials, if deemed to be of a helpful nature.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: how to solve a dependency bug AKA subversion pseudobug

Post#6 by Ed_P » 05 Apr 2016, 19:21

If people have bookmarked a thread or posts and you move it won't their links then fail?
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: how to solve a dependency bug AKA subversion pseudobug

Post#7 by Bogomips » 06 Apr 2016, 10:33

Ed_P wrote:If people have bookmarked a thread or posts and you move it won't their links then fail?
Looks unlikely, as the move leaves a shadow post behind.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: how to solve a dependency bug AKA subversion pseudobug

Post#8 by Ed_P » 06 Apr 2016, 21:20

Perfect. :good:
Ed

Post Reply