Bug #106719 cannot build mysql shell from source
Submitted: 13 Mar 2022 5:04 Modified: 14 Mar 2022 9:07
Reporter: Ye Jinrong Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Document Store: MySQL Shell Severity:S3 (Non-critical)
Version:8.0.25 OS:CentOS (CentOS Linux release 7.9.2009 (Core))
Assigned to: CPU Architecture:Any

[13 Mar 2022 5:04] Ye Jinrong
Description:
According to the document https://github.com/mysql/mysql-shell/blob/master/INSTALL Suggestions, prepare the following
- gcc (GCC) 10.2.1 20210130 (Red Hat 10.2.1-11)
- cmake version 3.5.1
- Python 3.8.12

From https://dev.mysql.com/downloads/ get mysql-server and mysql-shell 8.0.25 source code package.

The process of compiling mysql-server is very smooth without any error.
```
cd /opt/mysql-8.0.25
rm -fr bld
mkdir bld
cd bld
/usr/bin/cmake .. -DBOOST_INCLUDE_DIR=/opt/boost_1_73_0/ \
-DLOCAL_BOOST_DIR=/opt/boost_1_73_0/ \
-DWITH_SSL=system && \
/usr/bin/cmake --build . --target mysqlclient && \
/usr/bin/cmake --build . --target mysqlxclient
```

But compiling mysql-shell failed, please see the attachment cmakeerror for details log.
```
cd /opt/mysql-shell-8.0.25-src
rm -fr bld
mkdir bld
cd bld
/usr/bin/cmake .. -DMYSQL_SOURCE_DIR=/opt/mysql-8.0.25 -DMYSQL_BUILD_DIR=/opt/mysql-8.0.25/bld/ -DHAVE_PYTHON=1 && make -j16
...
[ 59%] Built target mysql-secret-store-core
[ 60%] Built target mysqlshdk-static
[ 61%] Built target mysql-secret-store-login-path
[ 99%] Built target api_modules_objlib
[ 99%] Built target api_modules
make[2]: *** No rule to make target `/opt/mysql-8.0.25/bld/extra/protobuf/protobuf-3.11.4/cmake/libprotobuf.a', needed by `bin/mysqlsh'.  Stop.
make[1]: *** [src/CMakeFiles/mysqlsh.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target `/opt/mysql-8.0.25/bld/extra/protobuf/protobuf-3.11.4/cmake/libprotobuf.a', needed by `bin/mysqlshrec'.  Stop.
make[1]: *** [src/CMakeFiles/mysqlshrec.dir/all] Error 2
make: *** [all] Error 2
```

How to repeat:
As described above.
[13 Mar 2022 5:04] Ye Jinrong
mysql-shell cmake error log

Attachment: CMakeError.log (application/octet-stream, text), 13.09 KiB.

[14 Mar 2022 8:28] Ye Jinrong
I have successfully compiled mysql-shell, close it please, Sorry, and thanks
[14 Mar 2022 9:07] MySQL Verification Team
Thank you, Ye Jinrong for confirming that you are able to build.
Closing it for now.

regards,
Umesh