LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-08-2019, 02:41 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,753

Rep: Reputation: Disabled
Is it doable to have two glib2 versions installed?


Hello,

Currently glib2-2.46.2 is included in Slackware version 14.2

However I want to upgrade a software to a version that needs glib2 >= 2.48.0.

Upgrading glib2 is easy but I fear that would break other software that depend on it. Am I right?

If the answer is yes, is there a way to make two versions of glib2 coexist, and then how?

Maybe something like installing the newer version in another location and indicate it to the dependent software that needs this one at build time, although that'd make maintenance harder.

Any clue appreciated.

Last edited by Didier Spaier; 03-08-2019 at 02:46 PM.
 
Old 03-08-2019, 02:50 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,730

Rep: Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733
Install the newer glib2 to /usr/lib64/theSoftware/, and have it in the same package as theSoftware. Set "-Wl,-rpath" when building theSoftware to get it to load glib2 from there.
 
2 members found this post helpful.
Old 03-08-2019, 02:59 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,753

Original Poster
Rep: Reputation: Disabled
Thanks Dugan. But if I have several software needing a newer glib2 version, I would have to do it for each?
 
1 members found this post helpful.
Old 03-08-2019, 04:32 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,730

Rep: Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733Reputation: 3733
That's what I'd recommend, yeah.
 
Old 03-09-2019, 03:23 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,753

Original Poster
Rep: Reputation: Disabled
Well, actually I just need glib2-2.48.2 to be able to upgrade the whole a11y stack from ftp.gnome.org including pygobject which is what I want to do. The commit that brings the bump of required glib2 from 2.38.0 to 2.48.0 in the setup.py of pygobject says:
Quote:
build: bump glib requirement to 2.48

It's the one shipped with Ubuntu 16.04, which is the oldest distro we run test on
As the NEWS file in the source archive of glib2 does not mention any backward incompatible change between 2.46 and 2.48.2, I feel safe to just upgrade to this version, applying among the patches applied by Ubuntu at least those that address a CVE.

I don't mark this thread as [SOLVED] though as this does not the address the question asked in its title.

Last edited by Didier Spaier; 03-09-2019 at 03:30 AM.
 
Old 03-09-2019, 07:11 AM   #6
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 410

Rep: Reputation: 171Reputation: 171
Quote:
Originally Posted by Didier Spaier View Post
Upgrading glib2 is easy but I fear that would break other software that depend on it. Am I right?

If the answer is yes, is there a way to make two versions of glib2 coexist, and then how?
I think it will not break anything, but, of course, you could install both, versioned. Just the symlinks will stay pointed to one of them only so by default all applications will use that one:
Code:
/usr/lib/libglib-2.0.so -> libglib-2.0.so.0.<version>
/usr/lib/libglib-2.0.so.0 -> libglib-2.0.so.0.<version>
so all applications that need the other will need to have the exact version specified, either when compiling/linking or when executing, as by default the references are to the links, not to the actual specific library.

Edit:
What you could try is save the info of the current symbolic links and then install, not upgrade, the newer version. Then the links will point to the newer one but when you do get problems you can always restore the original symlinks.
The glib2-2.<version> script will also do this.

Last edited by ehartman; 03-09-2019 at 10:12 AM. Reason: Installing instead of upgrading
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Version issues. Installed Glib2 not recognised by the system and apps (gimp, gegl) intmail01 Linux - General 8 12-28-2018 04:59 PM
colord-1.4.3 requires glib2-2.5.6 or greater but slackware 14.2 only ships with glib2-2.46.2 nimbusdin Slackware 8 08-19-2018 03:43 PM
[SOLVED] Do I have two versions of LibreOffice installed? TristanDee Linux - Newbie 7 02-09-2015 01:24 AM
glib2.0 installed. xmms could not be configured ramkri Linux - Newbie 1 07-11-2007 03:30 AM
Does this sound Doable? BajaNick General 3 08-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration