qgis build failure with Qt Framework in /Library SOLVED

Subject: Fink install of QGIS 2.10 failing on Mac OS 10.11.2




  • http://article.gmane.org/gmane.os.apple.fink.general/40195

  • http://pastebin.com/EDX1qV80

  • http://pastebin.com/eK5hntC4



CMakeCache.txt does not contain any Qt.Framework, but Fink's /sw/lib/qt4-mac.



The failed build long contains a line:



/sw/var/lib/fink/path-prefix-clang/c++  ... -std=c++11 ... -F/Library/Frameworks ... ../../output/lib/qgis_core.framework/Versions/2.10/qgis_core  ...


On my box, the equivalent line is:



cd /sw/src/fink.build/qgis212-py27-2.12.2-1/qgis-2.12.2/build/src/core && /sw/bin/cmake -E cmake_link_script CMakeFiles/qgis_core.dir/link.txt --verbose=1
/sw/var/lib/fink/path-prefix-clang/c++ ... -std=c++11 -Wno-error=c++11-narrowing ... -F/Library/Frameworks ... -o ../../output/lib/qgis_core.framework/Versions/2.12/qgis_core ...


So, my guess is c++ ignores CMake options and picks /Library/Frameworks anyway. I searched where /Library/Frameworks are set and found:



cd /data/fink/qgis-2.12.0
Babas-MacBook-Pro:qgis-2.12.0 baba$ grep -r -e -F/Library/Frameworks *
CMakeLists.txt: SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -F/Library/Frameworks")
CMakeLists.txt: SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -F/Library/Frameworks")
CMakeLists.txt: SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -F/Library/Frameworks")
cmake/FindOSGEARTH.cmake: SET(CMAKE_REQUIRED_LIBRARIES "-F/Library/Frameworks" ${CMAKE_REQUIRED_LIBRARIES})
cmake/FindSPATIALITE.cmake: SET(CMAKE_REQUIRED_LIBRARIES "-F/Library/Frameworks" ${CMAKE_REQUIRED_LIBRARIES})


I think removing all the -F things will solve the issue but it may cause another issue. So, It would take a while to make sure everything goes whithout them.