how to solve a dependency bug AKA subversion pseudobug
Posted: 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
But you can trace the problem back to the origin:
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:
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):
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.
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:
And looking in package contents you find the library we are looking for:
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:
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!
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
Code: Select all
# find /mnt/live/memory/images/ -name 'libdb-*'
/mnt/live/memory/images/001-core.xzm/lib64/libdb-4.8.so
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
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
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:
And looking in package contents you find the library we are looking for:
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
So you can solve the problem in a local system way or in a more shareable way, the final decision is up to you!