Distributing Linux plugins


#1

I’m new to distributing plugins on Linux. Some users are complaining they don’t load because they can’t find the c++ standard library. User says:

If anyone else experiences a no-go with these plugs it’s likely due to versioned dependencies of the binaries. This is a crappy way of doing things, it absolutely forbids the use of the plugins on another system. It’s unnecessary too - IIRC we had some problems with the early u-he plugs because of versioned dependencies but abique resolved that issue.

To wit:

CODE: SELECT ALL
$ ldd #TAuto\ Filter.so
./#TAuto Filter.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21’ not found (required by ./#TAuto Filter.so)

Is it possible to statically link on Linux? Or is there another way around issue. I’m not much of a Linux guru.


#2

What version of Linux did you build them with?


#3

You basically have to use an old enough distribution of Linux and GCC to compile your plug-in. Some host applications define a reference platform. For instance see the VFX reference platform. I think the main limitation is compiling for an old enough GLIBC.

Note how the reference platform for 2014 specifies GCC 4.1, which was 7 years old back then.


#4

From experience the only reliable way of avoiding these kind of issues is to compile on a really old machine - symbol versioning was not a magic bullet, but I can’t remember the specifics of why.

At a couple of places I’ve worked the lower bound was a CentOS 5 machine with more recent compilers installed.


#5

I’m building my plugin on an old debian stable in order to avoid issues with libstdc++ or libc symbols. I think the current debian stable would be a good choice. If you’re already running an ubuntu or another debian derived distribution, you can easily setup the environnement for that with debootstrap & schroot

You can statically link, I used to do it for some time with the -static-libstdc++ option of gcc , but if you do that you have to build gcc yourself, as the libstdc++.a is not built with the -fPIC flag by default, which is required for you since you’re building a plugin.


#6

I’m building with Ubuntu 16.04.


#7

I spent quite a bit of time a week ago trying to build on later versions of ubuntu for earlier compatibility and it turned out to be a whole can of worms.

Probably the easiest and safest bet is to build with ubuntu 12.04 as that gives a good range of compatibility. Failing that, 15.04 is probably the next best option. 16 is a bit too new for other Debian based distros to be compatible.


#8

I went back to 14.04 and that seems to have fixed the issue. Thanks everybody.