Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpath 配置不生效,目录都存在但是 check日志输出 全部为 no,系统目录也为 no #5852

Open
davidxiaozhi opened this issue Nov 21, 2024 · 7 comments
Labels

Comments

@davidxiaozhi
Copy link

Xmake 版本

2.9.6

操作系统版本和架构

Linux algserver 5.4.0-128-generic #144-Ubuntu SMP Tue Sep 20 11:00:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

描述问题

checking for flags (-Wl,-rpath=/opt/tops/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /opt/tops/lib) ... no
checking for flags (-Wl,-rpath=/usr/local/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /usr/local/lib) ... no
checking for flags (-Wl,-rpath=/usr/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /usr/lib) ... no

期待的结果

rpath 生效

工程配置

target("gcu_test_tkvcache_update")
set_kind("binary")
if is_mode("debug") then
add_defines("DEBUG")
add_cxxflags("-g")
end
add_includedirs("./include")
-- add_includedirs("/opt/tops/factor_backend/lib/clang/11.0.0/include/")
add_includedirs("/opt/tops/include/tops_wrappers")
set_toolchains("venus_clang")
add_deps("gcu_tkvcache_lib")
add_linkdirs("$(projectdir)/gcu3.0/lib")
add_rpathdirs("$(projectdir)/gcu3.0/lib/")
add_files("./test/test_embeddingcacheUpdate.cc")
set_targetdir("$(projectdir)/gcu3.0/lib")

附加信息和错误日志

checking for cmake ... no
checking for cmake ... /usr/local/bin/cmake
checking for xmake::benchmark ... benchmark 1.8.5
checking for clang++ ... /opt/tops/bin/clang++
checking for the c++ compiler (cxx) ... clang++
checking for /opt/tops/bin/clang++ ... ok
checking for the c++ compiler (cxx) ... clang++
checking for flags (-fPIC) ... no
checking for flags (-fvisibility-inlines-hidden) ... ok
checking for flags (-O3) ... no
checking for flags (-DNDEBUG) ... ok
checking for clang++ ... /opt/tops/bin/clang++
checking for the shared library linker (sh) ... clang++
checking for flags (-fPIC) ... no
checking for flags (-Wl,-rpath=/opt/tops/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /opt/tops/lib) ... no
checking for flags (-Wl,-rpath=/usr/local/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /usr/local/lib) ... no
checking for flags (-Wl,-rpath=/usr/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /usr/lib) ... no
checking for clang++ ... /opt/tops/bin/clang++
checking for the linker (ld) ... clang++
checking for flags (-fPIC) ... no
checking for flags (-Wl,-rpath=/mae_pat/zhipeng.li/develop/project/git_projects/inspire-op/gcu3.0/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /mae_pat/zhipeng.li/develop/project/git_projects/inspire-op/gcu3.0/lib) ... no
checking for flags (-Wl,-rpath=@loader_path) ... no
checking for flags (-Xlinker -rpath -Xlinker @loader_path) ... no
checking for flags (-Wl,-rpath=/opt/tops/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /opt/tops/lib) ... no
checking for flags (-Wl,-rpath=/usr/local/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /usr/local/lib) ... no
checking for flags (-Wl,-rpath=/usr/lib) ... no
checking for flags (-Xlinker -rpath -Xlinker /usr/lib) ... no

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: rpath configuration does not take effect, the directories all exist, but the check log output is all no, and the system directory is also no.

@waruqi
Copy link
Member

waruqi commented Nov 21, 2024

加 -vD 给下 log

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Add -vD to log

@davidxiaozhi
Copy link
Author

davidxiaozhi commented Nov 25, 2024

log 如下 xmake build -vD gcu_test_tkvcache_update
[ 37%]: cache compiling.release gcu3.0/tkvCache/src/embedding_cache_update_kernel.cc
/opt/tops/bin/clang++ -c -Qunused-arguments -m64 -Tops --include tops.h -fno-jump-tables -Wno-unused-command-line-argument -Wno-cuda-compat -Qunused-arguments -DMYCLANG -Wall -fPIC --cuda-gpu-arch=gcu300 -std=c++17 -Igcu3.0/tkvCache/include -I/opt/tops/include/tops_wrappers -I/opt/tops/include -I/usr/local/include -I/usr/include -DMYCLANG -DNDEBUG -o build/.objs/gcu_tkvcache_lib/linux/x86_64/release/gcu3.0/tkvCache/src/embedding_cache_update_kernel.cc.o gcu3.0/tkvCache/src/embedding_cache_update_kernel.cc
[ 50%]: cache compiling.release gcu3.0/tkvCache/test/test_embeddingcacheUpdate.cc
/opt/tops/bin/clang++ -c -Qunused-arguments -m64 -Tops --include tops.h -fno-jump-tables -Wno-unused-command-line-argument -Wno-cuda-compat -Qunused-arguments -DMYCLANG -Wall -fPIC --cuda-gpu-arch=gcu300 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++17 -Igcu3.0/tkvCache/include -I/opt/tops/include/tops_wrappers -I/opt/tops/include -I/usr/local/include -I/usr/include -DMYCLANG -DNDEBUG -o build/.objs/gcu_test_tkvcache_update/linux/x86_64/release/gcu3.0/tkvCache/test/test_embeddingcacheUpdate.cc.o gcu3.0/tkvCache/test/test_embeddingcacheUpdate.cc

[ 62%]: linking.release libgcu_tkvcache_lib.so
/opt/tops/bin/clang++ -o /mae_pat/zhipeng.li/develop/project/git_projects/inspire-op/gcu3.0/lib/libgcu_tkvcache_lib.so build/.objs/gcu_tkvcache_lib/linux/x86_64/release/gcu3.0/tkvCache/src/embedding_cache_update_kernel.cc.o -shared -m64 -Tops --include tops.h -fno-jump-tables -Wno-unused-command-line-argument -Wno-cuda-compat -Qunused-arguments -DMYCLANG -Wall -fPIC --cuda-gpu-arch=gcu300 -s -L/opt/tops/lib -L/usr/local/lib -L/usr/lib -ltopsrt -ldl -lpthread
[ 87%]: linking.release gcu_test_tkvcache_update
/opt/tops/bin/clang++ -o /mae_pat/zhipeng.li/develop/project/git_projects/inspire-op/gcu3.0/lib/gcu_test_tkvcache_update build/.objs/gcu_test_tkvcache_update/linux/x86_64/release/gcu3.0/tkvCache/test/test_embeddingcacheUpdate.cc.o -m64 -Tops --include tops.h -fno-jump-tables -Wno-unused-command-line-argument -Wno-cuda-compat -Qunused-arguments -DMYCLANG -Wall -fPIC --cuda-gpu-arch=gcu300 -L/mae_pat/zhipeng.li/develop/project/git_projects/inspire-op/gcu3.0/lib -s -L/opt/tops/lib -L/usr/local/lib -L/usr/lib -lgcu_tkvcache_lib -ltopsrt -ldl -lpthread
build cache stats:
cache directory: /mae_pat/zhipeng.li/develop/project/git_projects/inspire-op/build/.build_cache
cache hit rate: 0%
cache hit: 0
cache hit total time: 0.000s
cache miss: 2
cache miss total time: 0.024s
new cached files: 2
remote cache hit: 0
remote new cached files: 0
preprocess failed: 0
compile fallback count: 2
compile total time: 18.423s

create ok!
compile_commands.json updated!
[100%]: build ok, spent 10.768s @waruqi

@davidxiaozhi
Copy link
Author

target("gcu_test_tkvcache_update")
set_kind("binary")
-- if is_mode("debug") then
-- add_defines("DEBUG")
-- add_cxxflags("-g")
-- end
add_includedirs("./include")
-- add_includedirs("/opt/tops/factor_backend/lib/clang/11.0.0/include/")
add_includedirs("/opt/tops/include/tops_wrappers")
set_toolchains("venus_clang")
add_deps("gcu_tkvcache_lib")
add_linkdirs("$(projectdir)/gcu3.0/lib")
add_rpathdirs("$(projectdir)/gcu3.0/lib/")
-- add_rpathdirs("$(buildir)/lib")
add_files("./test/test_embeddingcacheUpdate.cc")
set_targetdir("$(projectdir)/gcu3.0/lib")
add_runenvs("LD_LIBRARY_PATH", "$(projectdir)/gcu3.0/lib")
set_runargs("-x", "--arg1=val")

构建命令如下: xmake build -vD gcu_test_tkvcache_update

@waruqi
Copy link
Member

waruqi commented Nov 28, 2024

logs 不完整,没看到 check flags 的 logs

xmake f -cvD
xmake -rvD

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The logs are incomplete and the logs of check flags are not seen.

xmake f -cvD
xmake -rvD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants