LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-09-2020, 09:49 PM   #1
compton
LQ Newbie
 
Registered: May 2018
Posts: 18

Rep: Reputation: Disabled
Question Building programs with multiple versions of gcc installed


I'm on Slackware64-14.2. I have found a new audio software to play with, called Geonkick. The new program requires =>gcc-7. I upgraded stock gcc-5.5.0 package to gcc-9.3.0. The new program has a standalone version and an lv2 plugin version for use in host software. Both the standalone and the plugin, which is a shared object(.so), build and run with gcc-9.3.0 installed. Then I downgraded gcc.9.3.0 back to gcc-5.5, and Geonkick wouldn't run anymore, neither the shared object, nor the standalone executable. They look in /usr/lib64 for GLIBCXX_3.4.26 not /usr/gcc93/lib64. I figured I need both versions of gcc installed. I modified gcclegacy494.SlackBuild from SBo to install gcc-9.3.0 as package gcc93-9.3.0 in /usr/gcc93 concurrently with stock gcc-5.5. In order to make Geonkick build with gcc-9.3.0 I exported these varables:
Code:
export CC=/usr/gcc93/bin/gcc-9.3.0
export CXX=/usr/gcc93/bin/g++-9.3.0
So as not to have to prepend geonkick with
Code:
LD_PRELOAD=/usr/gcc93/lib64/libstdc++.so.6.0.28
every time I use the program I added theses linker options to $SLKCFLAGS variable in the slackbuild.
Code:
-L/usr/gcc93/lib64 -Wl,-rpath=/usr/gcc93/lib64
...and
Code:
export LD_RUN_PATH=/usr/gcc93/lib64/
Now the standalone executable works normally, but when loading the plugin in an lv2 plugin host, geonkick still fails with:
Code:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib64/lv2/geonkick.lv2/libgeonkick_lv2.so)
$ strings /usr/lib64/libstdc++.so | grep GLIBC
Code:
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBC_2.3
GLIBC_2.2.5
GLIBC_2.14
GLIBC_2.18
GLIBC_2.17
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
$ strings /usr/gcc93/lib64/libstdc++.so | grep GLIBC
Code:
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.14
GLIBC_2.6
GLIBC_2.4
GLIBC_2.18
GLIBC_2.16
GLIBC_2.17
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
$ ldd /usr/lib64/lv2/geonkick.lv2/libgeonkick_lv2.so |grep libstdc++.so
Code:
libstdc++.so.6 => /usr/gcc93/lib64/libstdc++.so.6 (0x00007fca354ff000)
Any feedback would be greatly appreciated.
 
Old 06-10-2020, 04:30 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,574

Rep: Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338
Programs come numbered program-x.y.z, where
z+1 indicates a bug fix in latest release.
y+1 = feature addition in latest release.
x+1 = compatibility break in latest release.

From my days over at LFS, the toolchain consists of: kernel headers; gcc; glibc, and you won't get far without binutils. For such differing versions of gcc, I'd be thinking of making /opt a directory you can chroot into, and do your crazy stuff with gcc-5.5.0 there. You can install retro duplicates there, build there, etc, safely out of the way of your base system. Stick /opt/lib(64) & /opt/usr/lib(64) on to the end of /etc/ld.so.conf, run ldconfig, and it should go. Even pkgtools accommodate a different root dir. And whoever thinks this is a bad idea will chime in shortly after I post this
 
Old 06-10-2020, 08:58 AM   #3
moesasji
Member
 
Registered: May 2008
Distribution: Slackware Current / 14.2
Posts: 306

Rep: Reputation: 98
For situations like this I suggest you could look at guix on top of Slackware. Guix has this application packaged, which should make this relatively straight-forward. Note that although Guix takes a bit of getting used to it definitely helps installing bits of software that require newer compilers
 
Old 06-10-2020, 11:25 AM   #4
mickski56
Member
 
Registered: Mar 2018
Posts: 31

Rep: Reputation: Disabled
@compton Don't know the solution but the problem is the plugin host is compiled with a different older compiler and c libraries.
recompiling the plugin host just seems to push the problem deeper into the system.
Any solutions would be welcomed, but I'm unsure there are any.
 
Old 06-11-2020, 05:08 AM   #5
compton
LQ Newbie
 
Registered: May 2018
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by mickski56 View Post
... the problem is the plugin host is compiled with a different older compiler and c libraries.
Thats what I was thinking.

Quote:
Originally Posted by mickski56 View Post
recompiling the plugin host just seems to push the problem deeper into the system.
But maybe not. Recompiling the host doesn't seem that bad, its not an official Slackware package. I guess I'd have to recompile all the other plugins though. I will consider that.

Quote:
Originally Posted by mickski56 View Post
For situations like this I suggest you could look at guix on top of Slackware.
That looks cool. I wanna try it out.
I've been considering upgrading to current as well.

Thanks for the reply's
 
Old 06-13-2020, 04:17 PM   #6
mickski56
Member
 
Registered: Mar 2018
Posts: 31

Rep: Reputation: Disabled
Quote:
But maybe not. Recompiling the host doesn't seem that bad, its not an official Slackware package. I guess I'd have to recompile all the other plugins though. I will consider that.
What I was getting at is the host my now be compiled with the same compiler and libraries as the plugin but some of the libraries it links against will not be, so it still won't work. I've only tried this with retoarch mind you not an audio plugin and host ymmv.
 
Old 06-14-2020, 04:49 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,574

Rep: Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338
Drawing on my Jesuit education which, incidentally, I have mainly refuted & rejected), they did teach how to break the law with style.

If you compile plugins with static libs(?? I'm getting lost at this stage) They'll have their own libs included. They will be bigger, but the 'linked against' problems will disappear.

@OP: Personally, I think we've talked this around enough. Let's see you try something, see how it works out and we'll go forward from there.
 
Old 06-29-2020, 11:07 AM   #8
DarrenDrapkin
Member
 
Registered: Aug 2014
Location: Leeds, England
Distribution: Slackware x86 64 current
Posts: 96
Blog Entries: 1

Rep: Reputation: 19
As a contrast to all this assertion about what you need to do. I present my analysis of what may have happened here. The bulid process may be linking to the compiler itself, always a bad idea.
 
Old 06-30-2020, 03:18 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,574

Rep: Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338Reputation: 1338
Maybe we should wait until we see what the OP does, as I'm sure he has enough useful ideas. He's the one who wants to gain experience with a compiler that is at this stage, a subject of interest only to computer archaeologists & paleontologists.
 
  


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
install gcc (already installed) erase gcc (not installed) huh ? kvenl Linux - Newbie 4 01-19-2011 02:24 PM
How to Instal GCC without prior gcc versions. shri_tech007 Linux - Software 4 12-09-2010 02:15 PM
Building multiple versions of one software sudarshan22 Linux - Software 3 05-29-2010 10:23 PM
manually building GCC versions on linux systems ron7000 Programming 1 09-17-2008 10:41 AM
gcc versions compatibility with kernel versions.. mahesh_manthapuri SUSE / openSUSE 1 03-22-2006 12:28 AM

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

All times are GMT -5. The time now is 07:59 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