[MCOL-3981] doesn't build with old (2.8.x) cmake Created: 2020-05-01  Updated: 2020-11-12  Resolved: 2020-05-05

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5.1

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-22197 test columnstore for 10.5 Closed
Sprint: 2020-7

 Description   

Old cmake (that is used on some buildbot builders) doesn't understand DEFINES_FILE in the BISON_TARGET. As a workaround, specify --defines= explicitly in COMPILE_FLAGS. On the other hand, newer cmake that supports DEFINES_FILE needs it for proper dependency tracking. So, as a fix, use both, yes, it's redundant.

diff --git a/dbcon/ddlpackage/CMakeLists.txt b/dbcon/ddlpackage/CMakeLists.txt
index c18bf6ab..7ce5207f 100644
--- a/dbcon/ddlpackage/CMakeLists.txt
+++ b/dbcon/ddlpackage/CMakeLists.txt
@@ -1,7 +1,9 @@
 INCLUDE_DIRECTORIES( ${ENGINE_COMMON_INCLUDES} )
 
 FIND_PACKAGE(BISON REQUIRED)
-BISON_TARGET(ddl_gram ddl.y ${CMAKE_CURRENT_BINARY_DIR}/ddl-gram.cpp DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/ddl-gram.h COMPILE_FLAGS "-l -d -p ddl")
+BISON_TARGET(ddl_gram ddl.y ${CMAKE_CURRENT_BINARY_DIR}/ddl-gram.cpp
+  DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/ddl-gram.h
+  COMPILE_FLAGS "-l -p ddl --defines=${CMAKE_CURRENT_BINARY_DIR}/ddl-gram.h")
 
 FIND_PACKAGE(FLEX REQUIRED)
 FLEX_TARGET(ddl_scan ddl.l ${CMAKE_CURRENT_BINARY_DIR}/ddl-scan.cpp COMPILE_FLAGS "-i -L -Pddl")
diff --git a/dbcon/dmlpackage/CMakeLists.txt b/dbcon/dmlpackage/CMakeLists.txt
index 8982de1a..da3129ac 100644
--- a/dbcon/dmlpackage/CMakeLists.txt
+++ b/dbcon/dmlpackage/CMakeLists.txt
@@ -2,7 +2,9 @@
 INCLUDE_DIRECTORIES( ${ENGINE_COMMON_INCLUDES} )
 
 FIND_PACKAGE(BISON REQUIRED)
-BISON_TARGET(dml_gram dml.y ${CMAKE_CURRENT_BINARY_DIR}/dml-gram.cpp DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/dml-gram.h COMPILE_FLAGS "-l -d -p dml")
+BISON_TARGET(dml_gram dml.y ${CMAKE_CURRENT_BINARY_DIR}/dml-gram.cpp
+  DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/dml-gram.h
+  COMPILE_FLAGS "-l -p dml --defines=${CMAKE_CURRENT_BINARY_DIR}/dml-gram.h")
 
 FIND_PACKAGE(FLEX REQUIRED)
 FLEX_TARGET(dml_scan dml.l ${CMAKE_CURRENT_BINARY_DIR}/dml-scan.cpp COMPILE_FLAGS "-i -L -Pdml")



 Comments   
Comment by Sergei Golubchik [ 2020-05-03 ]

also, please, add

utils/loggingcpp/errorids-temp.h
utils/loggingcpp/messageids-temp.h

to .gitignore

Comment by Roman [ 2020-05-04 ]

Plz review.

Comment by Patrick LeBlanc (Inactive) [ 2020-05-04 ]

Looks fine, and BB seems to approve. Needs to also get into 1.4 though.

Comment by Patrick LeBlanc (Inactive) [ 2020-05-04 ]

For QA, this is an unobservable change.

Comment by Patrick LeBlanc (Inactive) [ 2020-05-05 ]

Talked with Roman; this isn't an issue for 1.4 b/c that is enterprise-only, and enterprise builders use an updated cmake.

Generated at Thu Feb 08 02:46:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.