SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to install two versions of one package (GDAL library) in parallel. GDAL 1.8 is already installed and it used as default in my system (and many other programs compiled against it). Now I need to install GDAL 1.9 (development version) and then use it to compile and test some additional packages.
I want to leave GDAL 1.8 as my default and use GDAL 1.9 only to compile and testing of several programs. When I finish this work I also want to remove GDAL 1.9 in easy way.
Which is a best way to do this? I have all necessary SlackBuilds but don't know how to modify them to suite my requirements.
the cleanest and less harmful, in my opinion, is to build and test on a virtual machine.
you can also install it in a non-standard place, passing a different --prefix (like, for example, --prefix=/opt/gdal) to the configure in the gdal.SlackBuild, but then, when you'll build other programs over that, you have to add the path of the non-standard installed libraries to LDFLAGS and LD_LIBRARY_PATH and specify the custom location of the new gdal headers.
then, to use the new libraries when running programs built against them, you will still need a custom LD_LIBRARY_PATH.
I think getting crazy with installing things in non-standard place, with many easy virtualization solutions around, is not worth the hassle, assumed also that you have to modify stuff again later to reinstall in the proper place
Yep, I can confirm what ponce is telling, which is a good advice. I am (was) the king in installing software manually in totally different locations with library in totally strange directories. In the end, my whole filesystem was a big cobweb with directories, until my computer totally failed, my Slackware could not even boot anymore. I think I have seen every possible error messages one can get in kernel boot messages, and more.
Then, I did format my hard drive and started freshly. Now, I always install in default locations with Slackware tools as sbopkg or src2pkg, and I dont have any annoying problems anymore.
a package of an application usually doesn't contain binaries only: you can verify the contents making a folder, cd'ing into it, and extracting the package with explodepkg.
you will find inside always the install scripts, the description and the docs; depending on the package there can be also man pages, /usr/share stuff, libraries, includes and other various files and folders (/var/*,/etc/* and so on).
you can rename the binary (and for ease of not losing it between all the others in /usr/bin, maybe move it in /usr/local/bin), but when you upgradepkg the original, all the other old components will be substituted by the new ones.
if you are sure the two versions don't overlap, use installpkg, it won't complain and will install it (but slackpkg will warn you at the next upgrade that you have two different versions of the same package installed - if in your opinion is safe, you can ignore that).
maybe that is an old option (I never used it in the past so I don't even remember it), seems that's not in the present installpkg code: if you try exploding a package in a folder and use it with the supposed syntax
Code:
installpkg -r elviz
it replies
Code:
Cannot install -r: file not found
Cannot install elviz: file not found
you can rename the package before installpkg it (from elvis-2.2... to elviz-2.2..., for example) to have the same result, but if files/folders have the same name they will be simply overwritten and when you are going to removepkg one of the two, the files/folders named the same way won't be removed because they will be found in another package.
the cleanest and less harmful, in my opinion, is to build and test on a virtual machine.
I'm thought about this solution. But this will slowdown some operations like compiling.
Quote:
Originally Posted by ponce
you can also install it in a non-standard place, passing a different --prefix (like, for example, --prefix=/opt/gdal) to the configure in the gdal.SlackBuild, but then, when you'll build other programs over that, you have to add the path of the non-standard installed libraries to LDFLAGS and LD_LIBRARY_PATH and specify the custom location of the new gdal headers.
then, to use the new libraries when running programs built against them, you will still need a custom LD_LIBRARY_PATH.
This looks a bit easy, but I agree that this is not good to install in non-standard directories.
Anyway, thanks for all suggestions. I think, I'll try to setup virtual machine and run my test on it.
I'm not sure how old those pages are but Slackware's installpkg hasn't had those options since Slackware 8.0 and maybe even older. Those pages badly need updating.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.