[MDEV-22336] CMAKE_INSTALL_PREFIX is ignored in 10.5 recently Created: 2020-04-22  Updated: 2020-04-26  Resolved: 2020-04-26

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.5.3
Fix Version/s: 10.5.3

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 1
Labels: regression
Environment:

Ubuntu 16.04



 Description   

I noted that recently CMAKE_INSTALL_PREFIX setting seem to be ignored in 10.5 branch from GitHub:

openxs@ao756:~/git/server$ git branch
  10.0
...
  10.4
* 10.5
  5.5
  bb-10.2-compatibility
  bb-10.2-marko
openxs@ao756:~/git/server$ git log -1
commit 1b81e9659377973e2044a1e3f0001a259bbd7199
Author: Kentoku SHIBA <kentokushiba@gmail.com>
Date:   Wed Apr 22 04:44:28 2020 +0900
 
    MDEV-21884 MariaDB with Spider crashes on a query
 
    Fix a test result.

I build as usual (out of source in build subdirectory):

cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=OFF -DENABLED_LOCAL_INFILE=1 -DWITH_JEMALLOC=system -DWITH_INNODB_DISALLOW_WRITES=ON -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/maria10.5

and setting seem to be there:

openxs@ao756:~/git/server/build$ grep -rn CMAKE_INSTALL_PREFIX * | grep maria10
zlib/cmake_install.cmake:5:  set(CMAKE_INSTALL_PREFIX "/home/openxs/dbs/maria10.5")
 
openxs@ao756:~/git/server/build$ time make -j 2
...
[ 99%] Linking CXX executable explain_filename-t
[ 99%] Linking CXX executable mariadb-backup
[ 99%] Built target explain_filename-t
[ 99%] Linking CXX executable mariadbd
Creating mariabackup link
[100%] Built target mariadb-backup
Creating mysqld link
[100%] Built target mariadbd
 
real    4m8.257s
user    2m10.360s
sys     0m32.984s
 
openxs@ao756:~/git/server/build$ make install
...
[100%] Built target wsrep_check_version
[100%] Built target my_safe_process
Linking CXX executable CMakeFiles/CMakeRelink.dir/mariadb-backup
Linking CXX shared module CMakeFiles/CMakeRelink.dir/ha_rocksdb.so
Linking CXX executable CMakeFiles/CMakeRelink.dir/sst_dump
Linking CXX executable CMakeFiles/CMakeRelink.dir/mariadb-ldb
Linking CXX executable CMakeFiles/CMakeRelink.dir/mariadb
Linking CXX executable CMakeFiles/CMakeRelink.dir/mariadbd
Install the project...
-- Install configuration: "RelWithDebInfo"
CMake Error at cmake_install.cmake:43 (file):
  file cannot create directory: /usr/local/mysql/..  Maybe need
  administrative privileges.
 
 
Makefile:115: recipe for target 'install' failed
make: *** [install] Error 1

But as you can see above it tries to install to the default path, /usr/local/mysql/.

It was not the case just few days ago, so must be a result of some recent enough change in the code. 10.4 branch was built and installed without problems yesterday.



 Comments   
Comment by Valerii Kravchuk [ 2020-04-26 ]

No longer repeatable with this commit:

openxs@ao756:~/git/server$ git log -1
commit fbe2712705d464bf8488df249c36115e2c1f63f7
Merge: 6290343 a197825
Author: Marko Mцєkelцє <marko.makela@mariadb.com>
Date:   Sat Apr 25 21:57:52 2020 +0300
 
    Merge 10.4 into 10.5
 
    The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1
    (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.

Generated at Thu Feb 08 09:13:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.