Skip to content

Add -rpath config to handle case where LLVM libraries are not install…#274

Open
yuxuanchen1997 wants to merge 1 commit intocsmith-project:masterfrom
yuxuanchen1997:clang_delta_rpath
Open

Add -rpath config to handle case where LLVM libraries are not install…#274
yuxuanchen1997 wants to merge 1 commit intocsmith-project:masterfrom
yuxuanchen1997:clang_delta_rpath

Conversation

@yuxuanchen1997
Copy link

…ed on a system path

If I supply a path to an LLVM installation with ./configure --with-llvm="$HOME/llvm-18/" --disable-trans-assert --cache=.cache --prefix="$HOME/creduce-install/", the built clang_delta binary's dynamic linkage to libclang-cpp.so is broken.

This patch adds -rpath to the linker flags for clang_delta. After the change, I ran

./bootstrap
./configure --with-llvm="$HOME/llvm-18/" --disable-trans-assert --cache=.cache --prefix="$HOME/creduce-install/"
make -j $(nproc)
make install

And ran ldd clang_delta

clang_delta:
        linux-vdso.so.1 (0x00007ffda37da000)
        libclang-cpp.so.18rc => /home/ych/llvm-18/lib/libclang-cpp.so.18rc (0x00007fec2ec00000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fec2eb25000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fec38be6000)
        libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007fec2eaf5000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fec2e800000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fec2eada000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fec2e400000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fec3a36b000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant