CMake error for mysql-8.0.15 “Please do not build in-source.”

환경
OS : CentOS-7 (별 의미는 없음)
cmake-3.12.4
mysql-8.0.15

에러메세지
컴파일 작업중 갑자기 아래와 같은 에러메세지 출력

CMake Error at CMakeLists.txt:283 (MESSAGE):
Please do not build in-source. Out-of source builds are highly
recommended: you can have multiple builds for the same source, and there is
an easy way to do cleanup, simply remove the build directory (note that
‘make clean’ or ‘make distclean’ does not work)

You can force in-source build by invoking cmake with
-DFORCE_INSOURCE_BUILD=1

— Configuring incomplete, errors occurred!

해결

1. 기존
cd mysql-8.0.15
cmake \
-DCMAKE_INSTALL_PREFIX…. (이하 생략)

2. 변경
cd mysql-8.0.15
rm -f CMakeCache.txt
mkdir choilha01
cd choilha01
cmake \
.. \
-DCMAKE_INSTALL_PREFIX…. (이하 생략)

즉, 소스 디렉토리 내에 build 를 위한 디렉토리를 추가 생성하고
(옵션에서 생성하는 디렉토리(choilha01) – “디렉토리 이름은 자유롭게 가능”)
그 하단에서 작업을 진행하도록 “(강제)권고” 되어 버렸다.
8.0.14 부터인지… 8.0.15 부터인지 찾아보지는 않았다.
초기 8.0 버전은 아니었다는것…

조금 귀챦기는 하지만…
컴파일 옵션에 대한 변경을 많이 줘(봐)야 하거나
궁금한 사람들이 테스트를 하기 위해서는 상당히 잘 권고된 내용이라고 볼 수 있겠다.

본인이 작업하는 내용에 따라
choilha01
choilha02
뭐 이런식으로 차이를 주면서 컴파일을 해볼 수 있다… 압축을 새로 풀지 않고…

작업을 하면 대략 이런 형태로 확인 가능 하다.
# ls -1d mysql-8.0.15/choilha*
mysql-8.0.15/choilha01
mysql-8.0.15/choilha02

# ls mysql-8.0.15/choilha01
CMakeCache.txt library_output_directory
CMakeFiles libservices
CPackConfig.cmake make_dist.cmake
CPackSourceConfig.cmake man
CTestTestfile.cmake mysql-test
DartConfiguration.tcl mysys
Docs mysys_ssl
Makefile packaging
Testing plugin
VERSION.dep plugin_output_directory
archive_output_directory router
bin runtime_output_directory
client scripts
cmake_install.cmake share
components sql
dbug storage
extra strings
include support-files
info_macros.cmake testclients
lib unittest
libbinlogevents utilities
libbinlogstandalone vio
libmysql


이렇게 좋은 기능을 이제서야 알다니… ㄷ ㄷ ㄷ

About KENNETH 19688 Articles
지락문화예술공작단

Be the first to comment

Leave a Reply

Your email address will not be published.


*


이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.