Search code examples
mysqlbuildcompilationopen-sourcealmalinux

Compile fail Mysql8.0.32 on AlmaLinux8


Compiling MySQL8.0.32 on AlmaLinux8 gives the following error message:

[ 54%] Linking CXX executable ../runtime_output_directory/build_id_test
Verifying build-id 
make[2]:*** [mysys/CMakeFiles/build_id_test.dir/build.make:116:runtime_output_directory/build_id_test] Error 1 
make[2]: *** File 'runtime_output_directory/build_id_test' delete 
make[1]: *** [CMakeFiles/Makefile2:7006: mysys/CMakeFiles/build_id_test.dir/all] Error 2 
make: *** [Makefile:166: all] Error 2

I don't know what is causing the failure. Is there any way to know the exact cause?


Solution

  • In my case, it was resolved by setting the environment variable LANG=C.

    In mysys/CMakeFiles/build_id_test.dir/build.make at line 116

        cd /home/kubo/build-mysql/runtime_output_directory && /usr/bin/readelf -n ./build_id_test | grep "Build ID:" | egrep -o [0-9a-f]{40} > build_id_test_2
    

    These commands tries to find Build ID: in the output of readelf command. However it fails on non-English environment. For example ビルドID: is printed in place of Build ID: on Japanese locale and grep "Build ID:" fails. I set export LANG=C in order to force readelf to use English.

    I'm not sure whether it is your case. That's because your make command output is English.