<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - llvm fails to build on Lion and earlier due to use of environ in a dylib"
href="http://llvm.org/bugs/show_bug.cgi?id=22631">22631</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm fails to build on Lion and earlier due to use of environ in a dylib
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Support Libraries
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jeremyhu@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>OS X versions earlier than 10.8 are unable to use environ directly. That
symbol is provided in crt1.o to executables on earlier versions of OS X rather
than libdyld (which provides it on Mountain Lion and newer). As such, llvm
trunk r229298 is failing to compile:
/opt/local/bin/clang++-mp-3.4 -pipe -Os -arch x86_64 -stdlib=libc++ -pipe -Os
-arch x86_64 -stdlib=libc++ -O3 -Wl,-install_name
-Wl,"/opt/local/libexec/llvm-3.7/lib/libLLVM-3.7svn.dylib" -Wl,-dead_strip
-rdynamic -Wl,-rpath -Wl,@executable_path/../lib
-L/opt/local/var/macports/build/_opt_mports_dports_lang_llvm-3.7/llvm-3.7/work/trunk/Release+Debug+Asserts/lib
-L/opt/local/var/macports/build/_opt_mports_dports_lang_llvm-3.7/llvm-3.7/work/trunk/Release+Debug+Asserts/lib
-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -L/opt/local/lib
-Wl,-headerpad_max_install_names -arch x86_64 -m64 -dynamiclib
-mmacosx-version-min=10.6 -o
/opt/local/var/macports/build/_opt_mports_dports_lang_llvm-3.7/llvm-3.7/work/trunk/Release+Debug+Asserts/lib/libLLVM-3.7svn.dylib
/opt/local/var/macports/build/_opt_mports_dports_lang_llvm-3.7/llvm-3.7/work/trunk/tools/llvm-shlib/Release+Debug+Asserts/libllvm.o
\
-lLLVMAArch64AsmParser -lLLVMAArch64AsmPrinter -lLLVMAArch64CodeGen
-lLLVMAArch64Desc -lLLVMAArch64Disassembler -lLLVMAArch64Info
-lLLVMAArch64Utils -lLLVMARMAsmParser -lLLVMARMAsmPrinter -lLLVMARMCodeGen
-lLLVMARMDesc -lLLVMARMDisassembler -lLLVMARMInfo -lLLVMAnalysis
-lLLVMAsmParser -lLLVMAsmPrinter -lLLVMBitReader -lLLVMBitWriter -lLLVMCodeGen
-lLLVMCore -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMDebugInfoDWARF
-lLLVMDebugInfoPDB -lLLVMExecutionEngine -lLLVMHexagonCodeGen -lLLVMHexagonDesc
-lLLVMHexagonDisassembler -lLLVMHexagonInfo -lLLVMIRReader -lLLVMInstCombine
-lLLVMInstrumentation -lLLVMInterpreter -lLLVMLTO -lLLVMLineEditor -lLLVMLinker
-lLLVMMC -lLLVMMCDisassembler -lLLVMMCJIT -lLLVMMCParser -lLLVMMSP430AsmPrinter
-lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsAsmParser
-lLLVMMipsAsmPrinter -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsDisassembler
-lLLVMMipsInfo -lLLVMNVPTXAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc
-lLLVMNVPTXInfo -lLLVMObjCARCOpts -lLLVMObject -lLLVMOption -lLLVMOrcJIT
-lLLVMPowerPCAsmParser -lLLVMPowerPCAsmPrinter -lLLVMPowerPCCodeGen
-lLLVMPowerPCDesc -lLLVMPowerPCDisassembler -lLLVMPowerPCInfo -lLLVMProfileData
-lLLVMR600AsmParser -lLLVMR600AsmPrinter -lLLVMR600CodeGen -lLLVMR600Desc
-lLLVMR600Info -lLLVMRuntimeDyld -lLLVMScalarOpts -lLLVMSelectionDAG
-lLLVMSparcAsmParser -lLLVMSparcAsmPrinter -lLLVMSparcCodeGen -lLLVMSparcDesc
-lLLVMSparcDisassembler -lLLVMSparcInfo -lLLVMSupport -lLLVMSystemZAsmParser
-lLLVMSystemZAsmPrinter -lLLVMSystemZCodeGen -lLLVMSystemZDesc
-lLLVMSystemZDisassembler -lLLVMSystemZInfo -lLLVMTarget -lLLVMTransformUtils
-lLLVMVectorize -lLLVMX86AsmParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen
-lLLVMX86Desc -lLLVMX86Disassembler -lLLVMX86Info -lLLVMX86Utils
-lLLVMXCoreAsmPrinter -lLLVMXCoreCodeGen -lLLVMXCoreDesc
-lLLVMXCoreDisassembler -lLLVMXCoreInfo -lLLVMipa -lLLVMipo -all_load -lz
-lpthread -lffi -ledit -lcurses -lm
Undefined symbols for architecture x86_64:
"_environ", referenced from:
Execute(llvm::sys::ProcessInfo&, llvm::StringRef, char const**, char
const**, llvm::StringRef const**, unsigned int, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*) in
libLLVMSupport.a(Program.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You're misusing TargetConditionals.h</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>