2019-08-22 11:24 CEST

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0005329Spring engineLinuxpublic2016-08-03 01:09
Reportersusnux 
Assigned Toabma 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version103.0 
Target VersionFixed in Version 
Summary0005329: CMake errors when trying to compile
DescriptionWhen trying to compile the engine on openSUSE Linux I get some CMake errors.
The first one is that the XSL Style-Sheets are not found, this happens because they are installed in versioned directories.
The second issue is that libCUtils's linking will fail with: Undefined reference to dlopen, it seems libdl is missing as target_link_libraries.
And the last one is that gold detection will fail because quotes are missing (cmake will throw "unknown argument" because linkerVersion evaluates to a string containing spaces).
Additional InformationI have attached a patch to fix the errors.
TagsNo tags attached.
Checked infolog.txt for lua Errors
Attached Files
  • patch file icon fix-cmake.patch (1,464 bytes) 2016-08-02 00:50 -
    diff -Nur spring_103.0/AI/Wrappers/CUtils/CMakeLists.txt new/AI/Wrappers/CUtils/CMakeLists.txt
    --- spring_103.0/AI/Wrappers/CUtils/CMakeLists.txt	2016-07-19 15:28:47.000000000 +0200
    +++ new/AI/Wrappers/CUtils/CMakeLists.txt	2016-08-01 22:18:59.955050201 +0200
    @@ -17,5 +17,6 @@
     	"${mySourceDir}/TimeUtil.cpp"
     	)
     add_library(CUtils STATIC ${mySources})
    +target_link_libraries(CUtils dl)
     
     AIMessage(STATUS "Found AI Wrapper: ${myName} (sources only wrapper)")
    diff -Nur spring_103.0/CMakeLists.txt new/CMakeLists.txt
    --- spring_103.0/rts/build/cmake/FindAsciiDoc.cmake	2016-07-19 15:28:48.000000000 +0200
    +++ new/rts/build/cmake/FindAsciiDoc.cmake	2016-08-01 22:18:59.959050216 +0200
    @@ -40,6 +40,8 @@
     	PATHS /usr /usr/share /usr/local /usr/local/share
     	PATH_SUFFIXES
     		xml/docbook/stylesheet/nwalsh/manpages
    +		xml/docbook/stylesheet/nwalsh/1.78.1/manpages
    +		xml/docbook/stylesheet/nwalsh/1.79.0/manpages
     		sgml/docbook/xsl-stylesheets/manpages
     		xsl/docbook/manpages
     	DOC "DocBook XSL Style-Sheet"
    diff -Nur spring_103.0/rts/build/cmake/TestCXXFlags.cmake new/rts/build/cmake/TestCXXFlags.cmake
    --- spring_103.0/rts/build/cmake/TestCXXFlags.cmake	2016-07-19 15:28:48.000000000 +0200
    +++ new/rts/build/cmake/TestCXXFlags.cmake	2016-08-01 22:18:59.959050216 +0200
    @@ -161,7 +161,7 @@
     		ERROR_VARIABLE linkerVersion
     	)
     	set(hasGold FALSE)
    -	if (${linkerVersion} MATCHES "gold")
    +	if ("${linkerVersion}" MATCHES "gold")
     		set(hasGold TRUE)
     	endif()
     
    
    patch file icon fix-cmake.patch (1,464 bytes) 2016-08-02 00:50 +

-Relationships
+Relationships

-Notes

~0016593

abma (administrator)

Fix 0c787264c3a3d490c9feef275260d0caa4674f76 committed to develop branch: fix 0005329: apply patch to fix cmake errors (thanks susnux!), repo: spring changeset id: 7254

~0016594

abma (administrator)

thanks! i slightly changed the patch:

+target_link_libraries(CUtils dl)
->
+target_link_libraries(CUtils ${CMAKE_DL_LIBS})
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2016-08-02 00:50 susnux New Issue
2016-08-02 00:50 susnux File Added: fix-cmake.patch
2016-08-03 01:08 abma Changeset attached => spring develop 0c787264
2016-08-03 01:08 abma Note Added: 0016593
2016-08-03 01:08 abma Assigned To => abma
2016-08-03 01:08 abma Status new => resolved
2016-08-03 01:08 abma Resolution open => fixed
2016-08-03 01:09 abma Note Added: 0016594
+Issue History