<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - compiler-rt fails to build when building 32-bit compat libraries on a 64-bit OS"
href="https://bugs.llvm.org/show_bug.cgi?id=42409">42409</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>compiler-rt fails to build when building 32-bit compat libraries on a 64-bit OS
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bero@lindev.ch
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Building LLVM (with all subprojects enabled) from the current git tree results
in
[6/2906] Linking CXX static library
lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
FAILED: lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
: && /usr/bin/cmake -E remove
lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a && /usr/bin/ar qc
lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerCrossOver.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerDataFlowTrace.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerDriver.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerExtFunctionsDlsym.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerExtFunctionsWeak.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerExtFunctionsWindows.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerExtraCounters.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerFork.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerIO.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerIOPosix.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerIOWindows.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerLoop.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerMerge.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerMutate.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerSHA1.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerTracePC.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerUtil.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerUtilDarwin.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerUtilFuchsia.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerUtilLinux.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerUtilPosix.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.i386.dir/FuzzerUtilWindows.cpp.o
projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer_main.i386.dir/FuzzerMain.cpp.o
&& /usr/bin/ranlib lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a && cd
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/cxx_i386_merge.dir
&& /usr/bin/ld -m elf_i386 --whole-archive
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
--no-whole-archive
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a
-r -o fuzzer.o && /usr/bin/objcopy --localize-hidden fuzzer.o && /usr/bin/cmake
-E remove
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
&& /usr/bin/ar qcs
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/lib64/clang/9.0.0/lib/linux/libclang_rt.fuzzer-i386.a
fuzzer.o
/usr/bin/ld: warning: Disabling --icf due to -r
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(algorithm.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(chrono.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(condition_variable.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(ios.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(locale.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(mutex.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(new.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(string.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(system_error.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(thread.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(vector.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(cxa_guard.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(private_typeinfo.cpp.o):
incompatible target
/usr/bin/ld: error:
/home/bero/temp/abf/llvm/BUILD/llvm-9.0.0-20190625/build/projects/compiler-rt/lib/fuzzer/libcxx_fuzzer_i386/lib/libc++.a(stdlib_new_delete.cpp.o):
incompatible target
ninja: build stopped: subcommand failed.
Looking into the listed object files shows that all the files in libc++.a in
libcxx_fuzzer_i386 are actually 64-bit files.
Looks like the CMake files for libcxx_fuzzer_i386 don't pass the correct
-target or -m32 flags.
This may be related to
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Wrong ABI used when building compiler-rt"
href="show_bug.cgi?id=38025">https://bugs.llvm.org/show_bug.cgi?id=38025</a></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>