Skip to content

beta/nightly fails against Debian LLVM 3.7 #29490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
infinity0 opened this issue Oct 31, 2015 · 9 comments
Closed

beta/nightly fails against Debian LLVM 3.7 #29490

infinity0 opened this issue Oct 31, 2015 · 9 comments

Comments

@infinity0
Copy link
Contributor

Hi, I can't build either the beta or the nightly (currently 1.6), with Debian's LLVM 3.7 (maintained by @sylvestre) I get these errors:

g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security  -O2  -Wall -Werror -g -fPIC -m64 -fno-rtti -c -o  x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o  -I//usr//lib//llvm-3.7//include  -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fPIC -ffunction-sections -fdata-sections -Wcast-qual   -I /usr/lib/llvm-3.7/include -I /build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/include /build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp
/build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp: In function 'LLVMOpaqueValue* LLVMRustBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef, unsigned int, const char*, LLVMValueRef)':
/build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:972:69: error: invalid conversion from 'LLVMValueRef {aka LLVMOpaqueValue*}' to 'unsigned int' [-fpermissive]
     return LLVMBuildLandingPad(Builder, Ty, PersFn, NumClauses, Name);
                                                                     ^
/build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:972:69: error: invalid conversion from 'unsigned int' to 'const char*' [-fpermissive]
/build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:972:69: error: too many arguments to function 'LLVMOpaqueValue* LLVMBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, unsigned int, const char*)'
In file included from //usr//lib//llvm-3.7//include/llvm/IR/Value.h:17:0,
                 from //usr//lib//llvm-3.7//include/llvm/IR/User.h:24,
                 from //usr//lib//llvm-3.7//include/llvm/IR/Instruction.h:22,
                 from //usr//lib//llvm-3.7//include/llvm/IR/BasicBlock.h:19,
                 from //usr//lib//llvm-3.7//include/llvm/IR/IRBuilder.h:21,
                 from /build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/rustllvm.h:11,
                 from /build/rustc-1.5.0~beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:11:
//usr//lib//llvm-3.7//include/llvm-c/Core.h:2677:14: note: declared here
 LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
              ^
/build/rustc-1.5.0~beta.2.20151029+dfsg1/mk/rustllvm.mk:60: recipe for target 'x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o' failed
make[2]: *** [x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o] Error 1

and the same error occurs for the nightly. However, 1.4 (current stable) builds fine, and 1.5 (nightly on 2015-09-18) also built fine.

I see that rust includes a custom LLVM; I wonder if someone knows which patches we need to also back-port to Debian's LLVM to fix the build (or if it is Debian's patches that are at fault, even).

@dotdash
Copy link
Contributor

dotdash commented Oct 31, 2015

This is caused by an accidental change in LLVM 3.7.0 which will be
fixed/reverted in 3.7.1. The patch is in the upstream release_37 branch on
which rust's fork is based.
Am 31.10.2015 16:06 schrieb "Ximin Luo" notifications@github.com:

Hi, I can't build either the beta or the nightly (currently 1.6), with
Debian's LLVM 3.7 (maintained by @sylvestre https://github.com/sylvestre)
I get these errors:

g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -O2 -Wall -Werror -g -fPIC -m64 -fno-rtti -c -o x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o -I//usr//lib//llvm-3.7//include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fPIC -ffunction-sections -fdata-sections -Wcast-qual -I /usr/lib/llvm-3.7/include -I /build/rustc-1.5.0beta.2.20151029+dfsg1/src/rustllvm/include /build/rustc-1.5.0beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp
/build/rustc-1.5.0beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp: In function 'LLVMOpaqueValue* LLVMRustBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef, unsigned int, const char_, LLVMValueRef)':
/build/rustc-1.5.0
beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:972:69: error: invalid conversion from 'LLVMValueRef {aka LLVMOpaqueValue_}' to 'unsigned int' [-fpermissive]
return LLVMBuildLandingPad(Builder, Ty, PersFn, NumClauses, Name);
^
/build/rustc-1.5.0beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:972:69: error: invalid conversion from 'unsigned int' to 'const char_' [-fpermissive]
/build/rustc-1.5.0
beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:972:69: error: too many arguments to function 'LLVMOpaqueValue_ LLVMBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, unsigned int, const char_)'
In file included from //usr//lib//llvm-3.7//include/llvm/IR/Value.h:17:0,
from //usr//lib//llvm-3.7//include/llvm/IR/User.h:24,
from //usr//lib//llvm-3.7//include/llvm/IR/Instruction.h:22,
from //usr//lib//llvm-3.7//include/llvm/IR/BasicBlock.h:19,
from //usr//lib//llvm-3.7//include/llvm/IR/IRBuilder.h:21,
from /build/rustc-1.5.0beta.2.20151029+dfsg1/src/rustllvm/rustllvm.h:11,
from /build/rustc-1.5.0
beta.2.20151029+dfsg1/src/rustllvm/RustWrapper.cpp:11:
//usr//lib//llvm-3.7//include/llvm-c/Core.h:2677:14: note: declared here
LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
^
/build/rustc-1.5.0~beta.2.20151029+dfsg1/mk/rustllvm.mk:60: recipe for target 'x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o' failed
make[2]: *_* [x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o] Error 1

and the same error occurs for the nightly. However, 1.4 (current stable)
builds fine, and 1.5 (nightly on 2015-09-18) also built fine.

I see that rust includes a custom LLVM; I wonder if someone knows which
patches we need to also back-port to Debian's LLVM to fix the build (or if
it is Debian's patches
https://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/3.7/debian/patches/
that are at fault, even).


Reply to this email directly or view it on GitHub
#29490.

@wthrowe
Copy link
Contributor

wthrowe commented Oct 31, 2015

See #28830 for some discussion of this.

@sanxiyn
Copy link
Member

sanxiyn commented Nov 1, 2015

The exact revision you need to backport is LLVM r247191, but you can also wait for LLVM 3.7.1.

@sylvestre
Copy link
Contributor

OK, I took commit r242372. I will upload a new version of llvm 3.7.0 with the patch later (when I have more changes)

@steveklabnik
Copy link
Member

So, is this not an issue, I guess?

@sanxiyn
Copy link
Member

sanxiyn commented Nov 12, 2015

This is not an issue in the sense that we don't expect to make any change and expect the issue to resolve itself. But I am against closing because it still is the case that Rust fails to build against the latest LLVM release. I will close as soon as LLVM 3.7.1 is out.

@MagaTailor
Copy link

Hey, I've just bumped into this one on 32-bit Slackware current - I think configure should immediately abort on detecting local llvm 3.7.0.

@lucab
Copy link
Contributor

lucab commented Dec 13, 2015

LLVM 3.7.1 has been tagged in SVN r255206, but tarballs not yet announced. Preliminary Rust 1.5.0 debian package seems to be building fine with it.

@sanxiyn
Copy link
Member

sanxiyn commented Jan 8, 2016

LLVM 3.7.1 is released, closing.

@sanxiyn sanxiyn closed this as completed Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants