From fe13d591464220b1bc34bd39777a4f3027e7f67b Mon Sep 17 00:00:00 2001 From: Rudi Chen Date: Sun, 6 Sep 2015 16:53:26 -0400 Subject: [PATCH 1/3] Troubleshooting tip for repeated build failures with cmake. --- BUILD.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD.md b/BUILD.md index ad365fcde2..ae4a67c2ee 100644 --- a/BUILD.md +++ b/BUILD.md @@ -53,6 +53,8 @@ Create a build directory in the root of your checkout and then run the CMake bui cd build cmake .. +If cmake gives you the same error message repeatedly after the build fails (e.g. you had a typo in the QT_CMAKE_PREFIX_PATH that you fixed but the `.cmake` files still cannot be found), try removing `CMakeCache.txt`. + ####Variables Any variables that need to be set for CMake to find dependencies can be set as ENV variables in your shell profile, or passed directly to CMake with a `-D` flag appended to the `cmake ..` command. From f2fdb97f1600f76fcfa7e8787fb0f54affa74641 Mon Sep 17 00:00:00 2001 From: Rudi Chen Date: Sun, 6 Sep 2015 17:31:37 -0400 Subject: [PATCH 2/3] Add additional linux dependencies. It is a dependency of libjack-dev but without manually specifying it, I would get the error message (on Linux Mint 17.2): ``` The following packages have unmet dependencies: libjack-dev : Depends: libjack0 (= 1:0.121.3+20120418git75e3e20b-2.1ubuntu1) but it is not going to be installed ``` libudev-dev is used in linking the interface executable. --- BUILD_LINUX.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 38f5628c64..55cd647f66 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -1,6 +1,6 @@ -Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only Linux specific instructions are found in this file. +Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only Linux specific instructions are found in this file. ###Qt5 Dependencies Should you choose not to install Qt5 via a package manager that handles dependencies for you, you may be missing some Qt5 dependencies. On Ubuntu, for example, the following additional packages are required: - libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-dev libxrandr-dev + libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev From b703ce01fb61094d0c651ba9ef2148ae43106edf Mon Sep 17 00:00:00 2001 From: Rudi Chen Date: Sun, 6 Sep 2015 21:08:50 -0400 Subject: [PATCH 3/3] Make sure libdl is linked after libcrypto. Fixes a `undefined reference to symbol 'dlclose@@GLIBC_2.2.5' error I was running into on Linux Mint 17.2. --- assignment-client/CMakeLists.txt | 4 ---- domain-server/CMakeLists.txt | 5 +++++ libraries/networking/CMakeLists.txt | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index c9fd769822..84a36c6c51 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -13,10 +13,6 @@ link_hifi_libraries( physics ) -if (UNIX) - target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS}) -endif (UNIX) - include_application_version() copy_dlls_beside_windows_executable() diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index e4fa1d874d..ce683df698 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -31,5 +31,10 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") # append OpenSSL to our list of libraries to link target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES}) +# libcrypto uses dlopen in libdl +if (UNIX) + target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS}) +endif (UNIX) + include_application_version() copy_dlls_beside_windows_executable() diff --git a/libraries/networking/CMakeLists.txt b/libraries/networking/CMakeLists.txt index 400fc5446a..274dae7420 100644 --- a/libraries/networking/CMakeLists.txt +++ b/libraries/networking/CMakeLists.txt @@ -27,6 +27,11 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") # append OpenSSL to our list of libraries to link target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES} ${TBB_LIBRARIES}) +# libcrypto uses dlopen in libdl +if (UNIX) + target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS}) +endif (UNIX) + # append tbb includes to our list of includes to bubble target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS}) include_application_version()