<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:alex_y_xu@yahoo.ca" title="Alex Xu (Hello71) <alex_y_xu@yahoo.ca>"> <span class="fn">Alex Xu (Hello71)</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - "Wrong types for attribute" linking cbindgen with LTO"
href="https://bugs.llvm.org/show_bug.cgi?id=49963">bug 49963</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - "Wrong types for attribute" linking cbindgen with LTO"
href="https://bugs.llvm.org/show_bug.cgi?id=49963#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - "Wrong types for attribute" linking cbindgen with LTO"
href="https://bugs.llvm.org/show_bug.cgi?id=49963">bug 49963</a>
from <span class="vcard"><a class="email" href="mailto:alex_y_xu@yahoo.ca" title="Alex Xu (Hello71) <alex_y_xu@yahoo.ca>"> <span class="fn">Alex Xu (Hello71)</span></a>
</span></b>
<pre>(output omitted)
$ curl -L <a href="https://github.com/eqrion/cbindgen/archive/refs/tags/v0.19.0.tar.gz">https://github.com/eqrion/cbindgen/archive/refs/tags/v0.19.0.tar.gz</a> |
tar -xz
$ curl -L
<a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0-rc5/clang+llvm-12.0.0-rc5-x86_64-linux-gnu-ubuntu-20.10.tar.xz">https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0-rc5/clang+llvm-12.0.0-rc5-x86_64-linux-gnu-ubuntu-20.10.tar.xz</a>
| tar -xJ
$ curl -L
<a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-20.10.tar.xz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-20.10.tar.xz</a>
| tar -xJ
$ cd cbindgen-0.19.0
$ export RUSTFLAGS='-C linker=clang -C linker-plugin-lto -C
link-arg=-fuse-ld=lld'
$ PATH=$(cd ../clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-20.10/bin; pwd):$PATH
cargo build --release
$ cargo clean
$ PATH=$(cd ../clang+llvm-12.0.0-rc5-x86_64-linux-gnu-ubuntu-20.10/bin;
pwd):$PATH cargo build --release
expected results:
cbindgen builds twice.
actual results:
success first time, failure second time:
Compiling proc-macro2 v1.0.21
Compiling libc v0.2.77
Compiling syn v1.0.41
Compiling unicode-xid v0.2.1
Compiling getrandom v0.1.15
Compiling cfg-if v0.1.10
Compiling serde_derive v1.0.116
Compiling serde v1.0.116
Compiling ppv-lite86 v0.2.9
Compiling autocfg v1.0.1
Compiling ryu v1.0.5
Compiling bitflags v1.2.1
Compiling serde_json v1.0.57
Compiling unicode-width v0.1.8
Compiling log v0.4.11
Compiling ansi_term v0.11.0
Compiling remove_dir_all v0.5.3
Compiling vec_map v0.8.2
Compiling hashbrown v0.9.1
Compiling cbindgen v0.19.0 (/tmp/cbindgen-0.19.0)
Compiling strsim v0.8.0
Compiling unicode-segmentation v1.6.0
Compiling itoa v0.4.6
Compiling textwrap v0.11.0
Compiling indexmap v1.6.0
Compiling heck v0.3.1
Compiling quote v1.0.7
Compiling atty v0.2.14
Compiling clap v2.33.3
Compiling rand_core v0.5.1
Compiling rand_chacha v0.2.2
Compiling rand v0.7.3
Compiling tempfile v3.1.0
Compiling toml v0.5.6
error: linking with `clang` failed: exit code: 254
|
= note: "clang" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64"
"-Wl,--eh-frame-hdr" "-Wl,-plugin-opt=O3" "-Wl,-plugin-opt=mcpu=x86-64" "-L"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.0.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.1.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.10.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.11.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.12.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.13.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.14.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.15.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.2.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.3.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.4.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.5.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.6.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.7.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.8.rcgu.o"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.cbindgen.ahgvjbo9-cgu.9.rcgu.o"
"-o" "/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416"
"/tmp/cbindgen-0.19.0/target/release/deps/cbindgen-35e4919a9256d416.4coknftgf3oy6r17.rcgu.o"
"-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs"
"-L" "/tmp/cbindgen-0.19.0/target/release/deps" "-L"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic"
"/tmp/cbindgen-0.19.0/target/release/deps/libheck-4f57217507a918bc.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libunicode_segmentation-ea8ad9ff15b2ae30.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libindexmap-fcbcaa05b8a4d765.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libhashbrown-7b11e4794fc6ae6c.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libtempfile-13985d1102929dc5.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/librand-4675664bf38351da.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/librand_chacha-21fb1f6e85475ad5.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libppv_lite86-6e73070a89e0ad6b.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/librand_core-f3636834f0106ca5.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libgetrandom-4cefc464851fa5d3.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libremove_dir_all-a2db9479af3068ac.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libtoml-ee2fb82883d6db98.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libsyn-fb91b76267238eb3.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libquote-3cbcb1c582fd2456.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libserde_json-cb387a43202607db.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libryu-8d3adba72655c18e.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libitoa-e94c04024fd8af84.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libserde-6ebd890f7eb15b1c.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libproc_macro2-76b438e4e4f8c1b5.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libunicode_xid-0f51899c3a1d537d.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-54c67f2a732d07c8.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/liblog-c47ffe18c1f6328d.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libcfg_if-6f3ad86205136786.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libclap-020a525fa78e11d6.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libvec_map-7710e0aa1820f58b.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libtextwrap-af767440c987ca23.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libunicode_width-b8b37d5da2aa8f4a.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libstrsim-be518b8b7cca0422.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libbitflags-5624065210ca120e.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libatty-ced8563b3b87b825.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/liblibc-65a49c890c43028b.rlib"
"/tmp/cbindgen-0.19.0/target/release/deps/libansi_term-8403b5b7bcdb97e5.rlib"
"-Wl,--start-group"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b1047a2788193be4.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e8e399e2092f3b2a.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c6b02b522c91c060.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-eaad965909c4200f.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-dca728ac8ed54d87.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-4b4efaa8c4601753.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-d36e07ed2cc56ee4.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-3855d04b1bb40ceb.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-58a065cdff5508a2.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-82aeeedcc8d1450a.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-5c4d6c9d7595f844.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-2642d2bccc00517a.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-760e48b3f782e7f5.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-d4ef8bf89076ed01.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-36070e2029bb21ea.rlib"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-3aaf8f932781f33e.rlib"
"-Wl,--end-group"
"/opt/rust-bin-1.51.0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-e2523c360f03ba10.rlib"
"-Wl,-Bdynamic" "-lutil" "-ldl" "-lutil" "-lgcc_s" "-lutil" "-lrt" "-lpthread"
"-lm" "-ldl" "-lc" "-fuse-ld=lld"
= note: clang: /lib64/libtinfo.so.6: no version information available
(required by clang)
/tmp/clang+llvm-12.0.0-rc5-x86_64-linux-gnu-ubuntu-20.10/bin/ld.lld:
/lib64/libtinfo.so.6: no version information available (required by
/tmp/clang+llvm-12.0.0-rc5-x86_64-linux-gnu-ubuntu-20.10/bin/ld.lld)
Wrong types for attribute: inalloca nest noalias nocapture noundef
nonnull readnone readonly signext zeroext byref(void) byval(void)
preallocated(void) sret(void) align 1 dereferenceable(1)
dereferenceable_or_null(1)
tail call fastcc align 8 void
@"_ZN5alloc5boxed16Box$LT$T$C$A$GT$13new_uninit_in28_$u7b$$u7b$closure$u7d$$u7d$17h97e896b5d148fca1E.llvm.4617170776783049552"(i64
%16, i64 %15) #20, !noalias !3040
in function
_ZN5alloc5boxed16Box$LT$T$C$A$GT$13new_uninit_in17h0e5ee2ebb51ee43eE
LLVM ERROR: Broken function found, compilation aborted!
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the
crash backtrace.
Stack dump:
0. Running pass 'Function Pass Manager' on module
'/tmp/cbindgen-0.19.0/target/release/deps/libsyn-fb91b76267238eb3.rlib(syn-fb91b76267238eb3.syn.3c1p1yi8-cgu.0.rcgu.o
at 400510)'.
1. Running pass 'Module Verifier' on function
'@"_ZN5alloc5boxed16Box$LT$T$C$A$GT$13new_uninit_in17h0e5ee2ebb51ee43eE"'
Wrong types for attribute: inalloca nest noalias nocapture noundef
nonnull readnone readonly signext zeroext byref(void) byval(void)
preallocated(void) sret(void) align 1 dereferenceable(1)
dereferenceable_or_null(1)
tail call fastcc align 8 void
@"_ZN5alloc5boxed16Box$LT$T$C$A$GT$13new_uninit_in28_$u7b$$u7b$closure$u7d$$u7d$17hfeed84edc319e6e2E.llvm.9366955955938406860"(i64
%15, i64 %14) #29, !noalias !2499
in function
_ZN5alloc5boxed16Box$LT$T$C$A$GT$13new_uninit_in17ha03dcae2663f7a8eE
LLVM ERROR: Broken function found, compilation aborted!
clang-12: error: unable to execute command: Aborted (core dumped)
clang-12: error: linker command failed due to signal (use -v to see
invocation)</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>