Skip to content

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

@davidxiaozhi

Description

@davidxiaozhi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions