LC_RPATH related error
Closed this issue · 3 comments
wateret commented
When I run build.py
second time, I get this error. First time it is OK.
% The error does not make the build failure, but just want to remove the message.
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with
path: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/gui found in: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game (for architecture x86_64), required for specified option "-delete_rpath /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/gui"
cc: @seanshpark
seanshpark commented
I'm not sure and don't have a mac so could you please test this ?
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 170f15d..83ec48c 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -22,6 +22,8 @@ add_subdirectory(src/gui)
add_executable(game ${SOURCES} ${HEADERS})
+set_target_properties(game PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
+
# Project Libraries
target_link_libraries(game lua util core gui)
wateret commented
@seanshpark It did not fix but thank you for your try. FYI, the full message is as below.
make install
[ 7%] Built target util
[ 11%] Built target lua
[ 42%] Built target core
[ 98%] Built target gui
[100%] Built target game
Install the project...
-- Install configuration: "Debug"
-- Up-to-date: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/gui found in: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game (for architecture x86_64), required for specified option "-delete_rpath /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/gui"
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/core found in: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game (for architecture x86_64), required for specified option "-delete_rpath /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/core"
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/lua found in: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game (for architecture x86_64), required for specified option "-delete_rpath /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/lua"
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/util found in: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game (for architecture x86_64), required for specified option "-delete_rpath /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/game/src/util"
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: for: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/game (for architecture x86_64) option "-add_rpath ./" would duplicate path, file already has LC_RPATH for: ./
-- Installing: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/liblua.dylib
-- Installing: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/libutil.dylib
-- Installing: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/libcore.dylib
-- Installing: /Users/hanjoung/ws/proj/mengde/build/Darwin.x86_64.Debug/mengde/libgui.dylib
wateret commented
I don't know why but I don't face any errors like this anymore. Closing.