kicad-developers team mailing list archive
Mailing list archive
Re: Re: libstdc++
--- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:
Just distributing the libstdc++.so from your Ubuntu, placing it in a
fixed directory (such as where you place the binaries), and making the
CMake install command put a LD_LIBRARY_PATH statement in there, pointing
to this directory, (e.g. /usr/local/bin ) should fix the problem for 95%
of all contemporary 32 bit distros.
The invocation command line would then look like this:
$ LD_LIBRARY_PATH=/usr/local/bin kicad
Thereafter, I believe and child processes, pcbnew, eeschema, etc, will
inherit the same environment as their parent (kicad program), and get
the LD_LIBRARY_PATH setting.
If you can simply set this environment variable in the desktop
shortcuts, then I cannot think of an easier solution. Otherwise, there
may need to be an intermediate invoking shell script that does the same
thing, such as a shell script that has that single line in it. The
shortcuts could then call than launching script.
That's more or less what the mozilla people do these days (look in the 'firefox' shell script). But I think about a possible source of troubles:
wxWindows uses *itself* the stdc++/gsup, that could conflict/not being compatible with the supplied one.
I mean: debian wx using debian stdc++, loaded in the same address space as kicad using kicad stdc++...
I don't know what ld.so does in this situation. Experimentation is needed:D
Good point. But I was thinking that Jean Pierre was statically linking
in the wxWidgets libraries to the apps. If not, I don't see how he has
gotten as far as he has with these "universal x86 linux binaries".
If he is statically linking in wxWidgets, then this LD_LIBRARY_PATH
strategy is probably OK. I am not crazy about my directory suggestion,
usr/local/bin, but then again, I probably would not be putting the Kicad
binaries there either. If I was to re-architect the linux install
strategy, I would put the binaries in a place like /opt/kicad, and put
symlinks from /usr/bin to the kicad binaries. This way you could put
the replacement libstdc++ in
and make the LD_LIBRARY_PATH override be optional. The mere presence of
the libstdc++ has no effect unless it is given in the environment variable.