[MDEV-5124] cmake failure when fullhostname is not resolved Created: 2013-10-10  Updated: 2013-11-12  Resolved: 2013-11-12

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.33a
Fix Version/s: 5.5.34

Type: Bug Priority: Major
Reporter: Honza Horak Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux, Fedora, seen only when building using mock



 Description   

When building using mock, cmake failed with the following error:

CMake Error at storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake:63 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake:70 (hostname)
  storage/tokudb/ft-index/CMakeLists.txt:12 (include)

It seems to be caused by wrong resolution of fullhostname, since the following patch fixes this issue:

--- mariadb-5.5.33a/storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake.cmakehostname    2013-10-10 16:21:18.904236776 +0200
+++ mariadb-5.5.33a/storage/tokudb/ft-index/cmake_modules/TokuSetupCTest.cmake  2013-10-10 16:21:29.718243555 +0200
@@ -60,7 +60,7 @@ macro(hostname out)
     COMMAND hostname
     OUTPUT_VARIABLE fullhostname
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-  string(REGEX REPLACE "\\.tokutek\\.com$" "" ${out} ${fullhostname})
+  string(REGEX REPLACE "\\.tokutek\\.com$" "" ${out} "${fullhostname}")
 endmacro(hostname)
 
 ## gather machine info


Generated at Thu Feb 08 07:01:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.