[MDEV-14867] make fails on 10.3 branch unable to generate mariadb.pp Created: 2018-01-04  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.3
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Simon Mudd Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None


 Description   

When trying to build the latest 10.3 code I get a failure:

[myuser@myhost ~/src/server/_build]$ make
[  0%] Built target INFO_BIN
[  0%] Built target INFO_SRC
[  0%] Built target abi_check
[  1%] Built target yassl
[  2%] Built target taocrypt
[  3%] Built target readline
[  4%] Built target pcre
[  4%] Built target pcreposix
[  4%] Built target pcregrep
[  4%] Built target pcretest
[  4%] Built target mytap
[  6%] Built target strings
[  6%] Built target mysys_ssl
[ 11%] Built target mysys
[ 11%] Built target dbug
[ 11%] Built target strings-t
[ 11%] Built target no_plan-t
[ 11%] Built target simple-t
[ 11%] Built target skip-t
[ 11%] Built target skip_all-t
[ 11%] Built target todo-t
[ 11%] Built target aes-t
[ 11%] Built target base64-t
[ 11%] Built target bitmap-t
[ 11%] Built target dynstring-t
[ 11%] Built target lf-t
[ 11%] Built target ma_dyncol-t
[ 11%] Built target my_atomic-t
[ 11%] Built target my_getopt-t
[ 11%] Built target my_malloc-t
[ 11%] Built target my_rdtsc-t
[ 11%] Built target my_vsnprintf-t
[ 11%] Built target my_decimal-t
[ 11%] Built target json_lib-t
[ 11%] Built target comp_err
[ 11%] Built target GenError
[ 11%] Built target partition
[ 15%] Built target innobase
[ 16%] Built target heap
[ 16%] Built target csv
[ 18%] Built target myisam
[ 21%] Built target aria
[ 22%] Built target myisammrg
[ 22%] Built target gen_lex_hash
[ 22%] Built target gen_lex_token
[ 22%] Built target GenServerSource
[ 24%] Built target perfschema
[ 24%] Built target sequence
[ 24%] Built target feedback
[ 24%] Built target user_variables
[ 24%] Built target userstat
[ 24%] Built target vio
[ 24%] Built target wsrep
[ 24%] Built target sql_sequence
[ 32%] Built target sql
[ 32%] Built target explain_filename-t
[ 32%] Built target mf_iocache-t
[ 32%] Built target my_apc-t
[ 33%] Built target mariadb_obj
[ 33%] Built target mariadbclient
[ 33%] Built target SYM_libmysqlclient.a
[ 33%] Built target libmariadb
[ 33%] Built target SYM_libmysqlclient.so
[ 33%] Built target SYM_libmysqlclient_r.a
[ 33%] Built target SYM_libmysqlclient_r.so
[ 33%] Built target dialog
[ 33%] Built target mysql_clear_password
[ 33%] Built target mariadb_config
[ 34%] Built target cctap
[ 34%] Built target ma_getopt
[ 34%] Built target async
[ 34%] Built target basic-t
[ 34%] Built target bulk1
[ 34%] Built target charset
[ 34%] Built target connection
[ 34%] Built target cursor
[ 34%] Built target dyncol
[ 34%] Built target errors
[ 34%] Built target features-10_2
[ 34%] Built target fetch
[ 34%] Built target logs
[ 34%] Built target misc
[ 35%] Built target performance
[ 35%] Built target ps
[ 35%] Built target ps_bugs
[ 35%] Built target ps_new
[ 35%] Built target result
[ 35%] Built target sp
[ 35%] Built target sqlite3
[ 35%] Built target t_aurora
[ 35%] Built target t_conc173
[ 35%] Built target thread
[ 35%] Built target view
[ 36%] Built target mysqlservices
[ 36%] Built target archive
[ 36%] Built target blackhole
[ 38%] Built target connect
[ 38%] Built target csv_embedded
[ 38%] Built target example
[ 38%] Built target federated
[ 38%] Built target federatedx
[ 39%] Built target heap_embedded
[ 39%] Built target hp_test1
[ 39%] Built target hp_test2
[ 44%] Built target innobase_embedded
[ 44%] Built target crc
[ 45%] Built target mariabackup
[ 45%] Built target mbstream
[ 45%] Built target aria_chk
[ 45%] Built target aria_dump_log
[ 48%] Built target aria_embedded
[ 48%] Built target aria_ftdump
[ 48%] Built target aria_pack
[ 48%] Built target aria_read_log
[ 48%] Built target ma_rt_test
[ 48%] Built target ma_sp_test
[ 48%] Built target ma_test1
[ 48%] Built target ma_test2
[ 48%] Built target ma_test3
[ 48%] Built target ma_control_file-t
[ 48%] Built target ma_pagecache_consist_1k-t
[ 48%] Built target ma_pagecache_consist_1kHC-t
[ 48%] Built target ma_pagecache_consist_1kRD-t
[ 49%] Built target ma_pagecache_consist_1kWR-t
[ 49%] Built target ma_pagecache_consist_64k-t
[ 49%] Built target ma_pagecache_consist_64kHC-t
[ 49%] Built target ma_pagecache_consist_64kRD-t
[ 49%] Built target ma_pagecache_consist_64kWR-t
[ 49%] Built target ma_pagecache_rwconsist2_1k-t
[ 49%] Built target ma_pagecache_rwconsist_1k-t
[ 49%] Built target ma_pagecache_single_1k-t
[ 49%] Built target ma_pagecache_single_64k-t
[ 49%] Built target ma_pagecache_single_8k-t
[ 49%] Built target ma_test_loghandler-t
[ 50%] Built target ma_test_loghandler_first_lsn-t
[ 50%] Built target ma_test_loghandler_long-t
[ 50%] Built target ma_test_loghandler_max_lsn-t
[ 50%] Built target ma_test_loghandler_multigroup-t
[ 50%] Built target ma_test_loghandler_multithread-t
[ 50%] Built target ma_test_loghandler_noflush-t
[ 50%] Built target ma_test_loghandler_nologs-t
[ 50%] Built target ma_test_loghandler_pagecache-t
[ 51%] Built target ma_test_loghandler_purge-t
[ 51%] Built target ma_test_loghandler_readonly-t
[ 51%] Built target trnman-t
[ 56%] Built target libgroonga
[ 56%] Built target mysql_normalizer
[ 58%] Built target mroonga
[ 58%] Built target suggest
[ 58%] Built target tsv_query_expander
[ 58%] Built target stop_word_token_filter
[ 59%] Built target index_column_functions
[ 59%] Built target math_functions
[ 59%] Built target number_functions
[ 59%] Built target string_functions
[ 60%] Built target time_functions
[ 60%] Built target vector_functions
[ 60%] Built target mi_test1
[ 60%] Built target mi_test2
[ 60%] Built target mi_test3
[ 62%] Built target myisam_embedded
[ 63%] Built target myisam_ftdump
[ 63%] Built target myisamchk
[ 63%] Built target myisamlog
[ 63%] Built target myisampack
[ 63%] Built target rt_test
[ 63%] Built target sp_test
[ 63%] Built target myisammrg_embedded
[ 66%] Built target perfschema_embedded
[ 66%] Built target pfs_server_stubs
[ 66%] Built target pfs-t
[ 66%] Built target pfs_account-oom-t
[ 66%] Built target pfs_host-oom-t
[ 66%] Built target pfs_instr-oom-t
[ 67%] Built target pfs_instr-t
[ 67%] Built target pfs_instr_class-oom-t
[ 67%] Built target pfs_instr_class-t
[ 67%] Built target pfs_misc-t
[ 67%] Built target pfs_timer-t
[ 67%] Built target pfs_user-oom-t
[ 75%] Built target rocksdblib
[ 75%] Built target rocksdb_aux_lib
[ 75%] Built target rocksdb_tools
[ 75%] Built target mysql_ldb
[ 76%] Built target rocksdb
[ 76%] Built target sst_dump
[ 76%] Built target sequence_embedded
[ 76%] Built target sphinx
[ 77%] Built target spider
[ 77%] Built target test_sql_discovery
[ 78%] Built target tokuportability_static_conv
[ 78%] Built target tokuportability_static
[ 78%] Built target logformat
[ 78%] Built target generate_log_code
[ 78%] Built target make_tdb
[ 78%] Built target install_tdb_h
[ 78%] Built target tokudb_static_conv
[ 78%] Built target build_lzma
[ 78%] Built target build_snappy
[ 79%] Built target util_static
[ 81%] Built target ft_static
[ 81%] Built target locktree_static
[ 81%] Built target tokufractaltree_static
[ 81%] Built target tokudb
[ 81%] Built target tokuportability
[ 81%] Built target util
[ 83%] Built target ft
[ 84%] Built target locktree
[ 85%] Built target tokufractaltree
[ 85%] Built target ftcxx
[ 85%] Built target ftverify
[ 85%] Built target tdb-recover
[ 85%] Built target tokudb_dump
[ 85%] Built target tokuft_logprint
[ 85%] Built target tokuftdump
[ 85%] Built target audit_null
[ 86%] Built target auth_ed25519
[ 88%] Built target ref10
[ 88%] Built target client_ed25519
[ 88%] Built target ed25519-t
[ 88%] Built target auth_0x0100
[ 89%] Built target auth_test_plugin
[ 89%] Built target dialog_examples
[ 89%] Built target qa_auth_client
[ 89%] Built target qa_auth_interface
[ 89%] Built target qa_auth_server
[ 89%] Built target auth_socket
[ 89%] Built target daemon_example
[ 89%] Built target debug_key_management
[ 89%] Built target example_key_management
[ 90%] Built target feedback_embedded
[ 90%] Built target file_key_management
[ 90%] Built target ftexample
[ 90%] Built target hsclient
[ 90%] Built target handlersocket
[ 90%] Built target locales
[ 90%] Built target metadata_lock_info
[ 90%] Built target query_cache_info
[ 90%] Built target query_response_time
[ 90%] Built target server_audit
[ 90%] Built target simple_password_check
[ 90%] Built target sql_errlog
[ 91%] Built target user_variables_embedded
[ 91%] Built target userstat_embedded
[ 91%] Built target wsrep_info
[ 91%] Built target dbug-unit-tests
[ 91%] Built target factorial
[ 91%] Built target tests
[ 91%] Built target user_ps
[ 91%] Built target user_t
[ 91%] Built target test_hash
[ 91%] Built target thr_lock
[ 91%] Built target thr_timer
[ 91%] Built target async_example
[ 92%] Built target mysql
[ 92%] Built target mysql_plugin
[ 92%] Built target comp_sql
[ 92%] Built target GenFixPrivs
[ 92%] Built target mysql_upgrade
[ 92%] Built target mysqladmin
[ 92%] Built target mysqlbinlog
[ 92%] Built target mysqlcheck
[ 92%] Built target mysqldump
[ 92%] Built target mysqlimport
[ 92%] Built target mysqlshow
[ 92%] Built target mysqlslap
[ 92%] Built target mysqltest
[ 93%] Built target innochecksum
[ 93%] Built target my_print_defaults
[ 93%] Built target mysql_waitpid
[ 93%] Built target mysqld_safe_helper
[ 93%] Built target perror
[ 93%] Built target replace
[ 93%] Built target resolve_stack_dump
[ 93%] Built target resolveip
[ 93%] Built target bug25714
[ 93%] Built target mysql_client_test
[ 93%] Built target mysql_tzinfo_to_sql
[ 93%] Built target mysqld
[ 93%] Built target partition_embedded
[ 93%] Built target sql_sequence_embedded
[ 93%] Built target udf_example
[100%] Built target sql_embedded
[100%] Built target mysqlserver
[100%] Built target libmysqld
[100%] Built target mysql_client_test_embedded
[100%] Built target mysql_embedded
[100%] Built target mysqltest_embedded
[100%] Built target my_safe_process
[100%] Generating mariadb.pp
/bin/sh: /usr/bin/checkmodule: No such file or directory
make[2]: *** [support-files/mariadb.pp] Error 127
make[1]: *** [support-files/CMakeFiles/mariadb-pp.dir/all] Error 2
make: *** [all] Error 2
[myuser@myhost1 ~/src/server/_build]$

Earlier builds of 10.3 worked fine.
Build attempt was against commit 145ae15a33210e13d33d6f41b145b3f04cab2263

/usr/bin/checkmodule does not exist. Should it?
This is running on CentOS 7.



 Comments   
Comment by Simon Mudd [ 2018-01-04 ]

An earlier build against 34f2f4fa431893db555093edf0577b35c5cb4b0d worked fine.

Comment by Elena Stepanova [ 2018-01-04 ]

Is it possible that you have changed some CMAKE options, like maybe BUILD_CONFIG, or RPM, or anything?
I see checkmodule in the cmake files, but it doesn't look new.

Comment by Hartmut Holzgraefe [ 2018-01-07 ]

The "checkmodule" build step (which depends on the SElinux "checkpolicy" package) is only part of the build process when "-DBUILD_CONFIG=mysql_release" and "-DRPM=..." are used together.

Unfortuantely the "checkmodule" path is just hardcoded in the cmake build files, and there is no check whether it actually exists in the cmake build process, so things only fail in the actual build step.

The same is true for the "rpmbuild" utility: this is not checked for, and "make package" fails when trying to call it

Comment by Elena Stepanova [ 2018-01-07 ]

This was the point of the question, it's hardcoded, but I don't see anything having been changed recently there, while Simon says that it only started happening now. So either something changed in build options (or on the build machine), or we are missing something.

It makes a difference, because the path is hardcoded in all versions, starting from 5.5. So if it only stopped working on 10.3 and only recently, there must be something else wrong.

Comment by Sergei Golubchik [ 2018-02-12 ]

checkmodule is intentionally required and hardcoded. cmake -DBUILD_CONFIG=mysql_release -DRPM is the command to build our release rpm packages. And our release rpm packages must have SElinux policy files.

So this specific build combination ensures that. This was introduced in mariadb-5.5.55 as a fix for MDEV-12231.

If you want to build RPMs exactly as our release RPMs are, you need to have /usr/bin/checkmodule. If you just want to build RPM packages, use -DRPM without -DBUILD_CONFIG=mysql_release.

Comment by Hartmut Holzgraefe [ 2018-03-05 ]

Ok for the absolute path then,

but still existence should be checked for when running cmake, instead of failing late in the build process.

when "-DBUILD_CONFIG=mysql_release" is given cmake should know that /usr/bin/checkmodule will be needed at some point, and should complain if it isn't installed

Generated at Thu Feb 08 08:16:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.