Bug #69827 Hardcoded libdir in cmake
Submitted: 23 Jul 2013 13:11 Modified: 1 Sep 2015 7:47
Reporter: Michal Hrusecky Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.12, 5.6.13, 5.5.33 OS:Any
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D3 (Medium)

[23 Jul 2013 13:11] Michal Hrusecky
Description:
In cmake/install_layout.cmake there is hardcoded path for libdir to be lib64 only for x86_64. But there is also ppc64 and nowadays aarch64 (armv8).

How to repeat:
Try to install mysql on 64bit ppc or arm

Suggested fix:
Drop hardcoded check for that enforces libdir to be lib on other platforms that x86_64
[23 Jul 2013 19:02] Sveta Smirnova
Thank you for the report.

Verified as described using code analysis.
[22 Jan 2014 12:56] Norvald Ryeng
Hi Michal,

We need some more information to fix this.

Is there a reason you can't set the path using -DINSTALL_LIBDIR=/usr/lib64 on the cmake line?

The lib path is not the same on all 64 bit platforms, not even in all Linux distros. E.g., on my Ubuntu box, it's /usr/lib/x86_64-linux-gnu. We could change the path to match what you need, but I'm afraid someone else would then ask for a different path. My view on this is that we should try to provide sensible defaults and then make it easy to deviate from our defaults when needed.

You can choose a set of defaults with -DINSTALL_LAYOUT (see http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html#option_cmake_inst...). The details about each of the layouts can be found in cmake/install_layout.cmake. Do you have any suggestions for new defaults?
[1 Sep 2015 7:47] Ståle Deraas
Posted by developer:
 
We close this bug, as there has been no response to the question from Norvald, and we think that the solution to use -DINSTALL_LIBDIR for this problem is appropriate.