[LLVMbugs] [Bug 18601] New: clang's build environment does not respect LD_RUN_PATH

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 24 09:27:43 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18601

            Bug ID: 18601
           Summary: clang's build environment does not respect LD_RUN_PATH
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: tofergregg at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I asked our university's IT staff to install a current version of clang/clang++
on one of our machines. He installed 3.4, but was forced to include this snarky
wrapper for using it (he told me I could include the snark! Please don't shoot
the messenger!):

------------------

#!/bin/bash

# clang's build environment does not obey LD_RUN_PATH, so have to use
# this workaround at run time. D41S, argh!
LD_LIBRARY_PATH=/usr/sup/lib64:/usr/sup/lib:/lib64:/usr/lib64:/lib:/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

# At least clang itself obeys LD_RUN_PATH, set it to prevent screwy errors
# later.
LD_RUN_PATH=/usr/sup/lib64:/usr/sup/lib:/lib64:/usr/lib64:/lib:/usr/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH

# clang does not retain the environment it was built under, so have to use
# this workaround at run time.  D41S, argh!
CPATH=/usr/sup/include:/usr/sup/include/c++/4.8.0:CPATH export CPATH
LIBRARY_PATH=/usr/sup/lib64:/usr/sup/lib:/lib64:/usr/lib64:/lib:/usr/lib:$LIBRARY_PATH
export LIBRARY_PATH

# Now that we've worked around most of the stupid, invoke clang++ with
# the invocation that takes care of the rest of the stupid.
/usr/sup/llvm-3.4/bin/clang++ -I/usr/sup/include -I/usr/sup/include/c++/4.8.0
$*

--------------

Other possibly relevant information:
$ which clang++
/usr/sup/bin/clang++

$ clang++ --version
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

Our IT staff puts a lot of stuff in the /usr/sup/bin directory, and it seems to
me that this is what is causing the headache.

If this isn't a bug, I'd like to pass on to the IT guy what could be done to
remedy this without the wrapper.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140124/bc470dc2/attachment.html>


More information about the llvm-bugs mailing list