KiCad shoud install libraries to lib64 on 64-bit Linux systems

Bug #1679795 reported by Vlad Ivanov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

KiCad should take into account LIB_SUFFIX CMake definition passed by some build environments. KiCad daily builds in Fedora COPR repo fail because of this:

https://copr-be.cloud.fedoraproject.org/results/%40kicad/kicad/fedora-26-x86_64/00536162-kicad/build.log.gz

Current stable KiCad package in Fedora replaces the hardcoded path during build preparation:

sed -i "s|KICAD_PLUGINS lib/kicad/plugins|KICAD_PLUGINS %{_lib}/kicad/plugins|" CMakeLists.txt

I have attached a patch that should fix the issue.

Revision history for this message
Vlad Ivanov (vlad-mbx) wrote :
Revision history for this message
Nick Østergaard (nickoe) wrote :

Hmm, what about using https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html

Which includes CMAKE_INSTALL_LIBDIR, maybe this is a better way without using a "custom" and undocumented variable when it seems that an official cmake method is available?

(I have not attempted this, I was just wondering if cmake didn't have some provisions for this already)

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1679795] Re: KiCad shoud install libraries to lib64 on 64-bit Linux systems

On 4/5/2017 6:37 AM, Nick Østergaard wrote:
> Hmm, what about using
> https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
>
> Which includes CMAKE_INSTALL_LIBDIR, maybe this is a better way without
> using a "custom" and undocumented variable when it seems that an
> official cmake method is available?
>
> (I have not attempted this, I was just wondering if cmake didn't have
> some provisions for this already)
>

It probably does and this would be my preference. Someone please test
this and confirm before we merge this patch and have yet another
non-cmake way of installing targets in our build config.

Revision history for this message
Vlad Ivanov (vlad-mbx) wrote :

I have actually tested GNUInstallDirs before resorting to this solution.
On my system (Fedora 25) LIBDIR is just lib, without 64 — I don't know why.

LIB_PREFIX is, however, defined in default RPM macros, and thus automatically defined when building RPMs on x86_64 systems.

https://fedoraproject.org/wiki/Packaging:Cmake#RPM_Macros

Revision history for this message
Vlad Ivanov (vlad-mbx) wrote :

I just checked again and it turns out I had to clean the build directory in order to make GNUInstallDirs work. Therefore, my previous comment is invalid — sorry about that. I'll update the patch.

Revision history for this message
Vlad Ivanov (vlad-mbx) wrote :
Revision history for this message
Vlad Ivanov (vlad-mbx) wrote :

I have updated the patch.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Can some of our linux devs who use other distros please test this patch before I commit it. It doesn't appear to break anything on windows msys2 builds and it looks like it wont effect osx builds but I would feel better if we tested it on other linux distros first.

Revision history for this message
Nick Østergaard (nickoe) wrote :

I tested this on archlinux, I think this patch should be fine on other linux systems also. I think most systems symlink lib to lib64 on 64-bit systems.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I committed this patch to the master archive. Hopefully it doesn't break any linux builds. Thank you for your contribution to KiCad.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 1e25c4736233a4971c85189ea1e9faa8f0a36722
https://git.launchpad.net/kicad/patch/?id=1e25c4736233a4971c85189ea1e9faa8f0a36722

Changed in kicad:
status: New → Fix Committed
Revision history for this message
Nick Østergaard (nickoe) wrote :

Thank you, the fedora copr build got green now.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.