kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #34292
Re: RPATH issue on _pcbnew.so
The RUNPATH should be stripped by the linker, if it isn't then there is a
problem in our build system. I created the various dynamic plugins and
the scenegraph library and made sure that the RUNPATH is removed;
it is of value primarily to developers and in general is nothing but a
headache when deploying software which is genuinely intended to
share libraries.
On Sat, Feb 24, 2018 at 9:37 PM, Carsten Schoenert
<c.schoenert@xxxxxxxxxxx> wrote:
> Hello Wayne,
>
> Am 24.02.18 um 21:44 schrieb Wayne Stambaugh:
>> Carsten,
>>
>> On 02/24/2018 02:08 PM, Carsten Schoenert wrote:
>>> Hi,
>>>
>>> I guess it's not intended that the library / shared object _pcbnew.so
>>> build in pcbnew/ set up a RPATH based on the build directory?
>>
>> This is the kicad python scripting shared object which should get
>> installed in the correct python library path. CMake installs it in the
>> correct place on both my Debian and Ubuntu builds so I don't understand
>> what the issue is here.
>
> the build and installation is just fine, the issue is that this file has
> a RUNPATH set to folder there it was compiled. It should have *no* RUNPATH.
>
>>>> root@i5:/# ldd build/kicad-5.0.0~rc0+dfsg1/debian/build/pcbnew/_pcbnew.so | grep build
>>>> libkicad_3dsg.so.2.0.0 => /build/kicad-5.0.0~rc0+dfsg1/debian/build/3d-viewer/3d_cache/sg/libkicad_3dsg.so.2.0.0 (0x00007f8188148000)
>>>
>>> This causes that lintian (a big QS tool for Debian packaging) is writing
>>> a error out on this. This package wouldn't be accepted from the FTP
>>> master if I'd do a upload to NEW. And I need to upload to NEW as the
>>> package structure will change.
>>
>> This is the build path not the install path.
>
> Partially correct. :-)
> In Debian the build folder is created by '/build/$PACKAGE_$VERSION', the
> out of tree build is typically done within the folder debian/build so
> the root for building all is
>
> /build/kicad-5.0.0~rc0+dfsg1/debian/build/...
>
> So yes, the the first line from my paste is the build path, the second
> line is just the output of 'ldd' with a grepped 'build' as argument.
> _pcbnew.so is looking for libkicad_3dsg.so.2.0.0 in the path which is
> shown there. And this is obviously wrong.
>
>> By default on linux builds the shared object gets installed in
>> /usr/local/lib/libkicad_3dsg.so.2.0.0. This is the 3D viewer plugin so
>> I don't know if this the correct convention for plugins but as it is a
>> shared object, it will get recognized by the os and load properly. If
>> plugins should be installed in a different path, please let me know what
>> that path should be and we can change the cmake install path for this
>> shared object.
>
> The installation of this private library is no problem, kicad does here
> exactly what the standard folder is if the INSTALL_PATH isn't given. No
> need something to change here.
>
> ...
>>> I don't know what has to be changed here so I'd like to ask someone who
>>> is more experienced with the cmake world.
>>> I could change this with chrpath but it's better if upstream would fix
>>> this. Surprisingly the library _pcbnew.kiface hasn't this issue so I'm a
>>> bit clueless.
>>
>> I don't know that anything changed that I am aware of with _pcbnew.so.
>> The 3D viewer plugin was introduced during this development cycle but I
>> have been successfully building and installing from source on Debian
>> during the entire current development cycle so I don't have any good
>> answers for you.
>
> I have really no knowledge about cmake, but I can see some information
> of setting the RUNPATH to an empty string while installing binaries or
> shared objects in opposite of this Python library.
>
>> -- Installing: /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/share/kicad/scripting/kicad_pyshell/__init__.py
>> -- Installing: /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/python2.7/dist-packages/_pcbnew.so <------- no modification here
>> -- Installing: /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/bin/pl_editor
>> ....> -- Installing:
> /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/bin/_pcb_calculator.kiface
>> -- Installing: /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/x86_64-linux-gnu/kicad/plugins/3d/libs3d_plugin_idf.so
>> -- Set runtime path of "/build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/x86_64-linux-gnu/kicad/plugins/3d/libs3d_plugin_idf.so" to "" <------
>> -- Installing: /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/x86_64-linux-gnu/kicad/plugins/3d/libs3d_plugin_vrml.so
>> -- Set runtime path of "/build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/x86_64-linux-gnu/kicad/plugins/3d/libs3d_plugin_vrml.so" to "" <------
>> -- Installing: /build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/x86_64-linux-gnu/kicad/plugins/3d/libs3d_plugin_oce.so
>> -- Set runtime path of "/build/kicad-5.0.0~rc0+dfsg1/debian/tmp/usr/lib/x86_64-linux-gnu/kicad/plugins/3d/libs3d_plugin_oce.so" to "" <------
>
> It's probably just a small thing that is needed to add $SOMETHERE to the
> installation of this Python library.
>
> --
> Regards
> Carsten Schoenert
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
References