[LLVMdev] llvm build not respecting DESTDIR?

Erick Tryzelaar erickt at dslextreme.com
Thu Dec 7 23:31:41 PST 2006


Hello,

I'm updating the macports build of llvm, and I'm running into an issue 
trying to stage llvm into a temporary directory. It builds fine, but 
when I try to install it into a temporary location, it insists on 
installing into the final location. The only reference I saw to the 
standard gnu DESTDIR was in the llvm.spec file, but none of the 
generated Makefiles have that value. Is there another way to do this? 
Here's the commands I'm running:

 > ./configure --prefix=/opt/local
 > make ENABLED_OPTIMIZED=1 OPTIMIZE_OPTION='-O2' tools-only
 > make install 
DESTDIR=/opt/local/var/db/dports/build/_unencrypted_erickt_Projects_macports-trunk_dports_lang_llvm/work/destroot


This is the output from make install. You can see that it's trying to 
install into the final location, /opt/local:

install: /opt/local/include/./llvm/Transforms/Utils/Local.h: No such 
file or directory
llvm[0]: Making install directory /opt/local/include/./llvm/Transforms/Utils
mkdir: /opt/local/include/./llvm: Permission denied
mkdir: /opt/local/include/./llvm: No such file or directory
mkdir: /opt/local/include/./llvm/Transforms: No such file or directory
...


I also tried "make install PREFIX=...", but that didn't work either. Are 
there any suggestions on how to get this to work?


Also, some questions about llvm-gcc. If we're just installing the binary 
version, does anything need to be done in order to let llvm find the 
libraries, such as modifying the DLYD_LIBRARY_PATH, or are all the paths 
relative? What about for the stuff compiled by llvm-gcc, does that need 
paths to be set as well?

Finally, does llvm require llvm-gcc for it's runtime, as mentioned by 
GettingStarted.html, or can it be used by itself? If not, does it make 
sense to package the two in the two packages? Macports is a source-based 
packaging system, so it would seem odd to have to temporarily install 
llvm-gcc to build llvm, but then install llvm-gcc in a separate package.

Thanks for all your help!

-e



More information about the llvm-dev mailing list