[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Compiling htcondor on Gentoo



I'm in the process of compiling htcondor on Gentoo Linux, and I ran into a cmake problem. It looks like -DPLATFORM gets set by looking at /etc/issue. Gentoo's /etc/issue file is, um, special. It's a blank line, followed by "This is \n.\O (\s \m \r) \t", followed by another blank line. That leads to the flags.make files having a very broken CXX_DEFINES line as cmake tries to put a linefeed into -DPLATFORM.ÂÂ The following patch seems to have worked:

diff --git a/build/cmake/macros/SystemSpecificInformations.cmake b/build/cmake/macros/SystemSpecificInformations.cmake
index 9f2fe2961d..a5ccea6e0f 100644
--- a/build/cmake/macros/SystemSpecificInformations.cmake
+++ b/build/cmake/macros/SystemSpecificInformations.cmake
@@ -110,6 +110,8 @@ if(UNIX)
ÂÂÂÂÂÂ set(LINUX_NAME "")
ÂÂÂÂÂÂ if(EXISTS "/etc/redhat-release")
ÂÂÂÂÂÂÂÂ file(READ "/etc/redhat-release" LINUX_ISSUE)
+ÂÂÂÂÂ elseif(EXISTS "/etc/gentoo-release")
+ÂÂÂÂÂÂÂ file(READ "/etc/gentoo-release" LINUX_ISSUE)
ÂÂÂÂÂÂ else()
ÂÂÂÂÂÂÂÂ file(READ "/etc/issue" LINUX_ISSUE)
ÂÂÂÂÂÂ endif()
@@ -156,6 +158,13 @@ if(UNIX)
ÂÂÂÂÂÂÂ set(SYSTEM_NAME "Ubuntu-${CMAKE_MATCH_1}")
ÂÂÂÂÂÂÂ set(DEB_SYSTEM_NAME "ubuntu_${CMAKE_MATCH_1}")
ÂÂÂÂÂÂ endif(LINUX_ISSUE MATCHES "Ubuntu")ÂÂÂÂÂÂÂÂÂÂÂÂÂ
+ÂÂÂÂÂ # Gentoo case
+ÂÂÂÂÂ if(LINUX_ISSUE MATCHES "Gentoo")
+ÂÂÂÂÂÂÂ string(REGEX MATCH "Gentoo .*elease ([0-9]+(\\.[0-9]+)?)" Gentoo "${LINUX_ISSUE}")
+ÂÂÂÂÂÂÂ set(LINUX_NAME "Gentoo")
+ÂÂÂÂÂÂ set(LINUX_VER "${CMAKE_MATCH_1}")ÂÂÂÂÂÂÂ
+ÂÂÂÂÂÂ set(SYSTEM_NAME "Gentoo-${CMAKE_MATCH_1}")
+ÂÂÂÂÂ endif(LINUX_ISSUE MATCHES "Gentoo")ÂÂÂÂÂ
ÂÂÂÂÂÂ # Debian case
ÂÂÂÂÂÂ if(LINUX_ISSUE MATCHES "Debian")
ÂÂÂÂÂÂÂÂ string(REGEX MATCH "Debian .*ux ([0-9]+(\\.[0-9]+)?)" DEBIAN "${LINUX_ISSUE}")

Thanks for some awesome software!

Regards,
Grant Goodyear

--
Grant Goodyear   Â
web: http://www.grantgoodyear.org Â
e-mail: grant@xxxxxxxxxxxxxxxxx