-
Notifications
You must be signed in to change notification settings - Fork 20
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
Build fails on CentOS7 : asks for -fPIC option #42
Comments
Hi Anthony, Thanks for reporting this, could you please copy and paste the output for
I am not sure why it requires -fPIC. Thanks! |
Sure. It's here :
|
Hi, I looked into the issue, the issue seems like OS specific. I just realized on different distributions, the rust toolchain will choose different relocation models. d4tools is originally designed to be statically addressed, but on your machine rustc try to produce a PIC executable which is conflict to the assumption. The quick solution is instead of using cd d4tools
cargo rustc --bin d4tools -- -C relocation-model=static # For debug build
cargo rustc --bin d4tools --release -- -C relocation-model=static # For release build Ideally, we could make cargo automatically append the relocation model overriding to the rustc flags - Using RUSTFLAGS passing a global rustc flags may cause procedual macros fail to compile. Unfortunately, this is not support by cargo today. (Issue is here rust-lang/cargo#10014) It would be helpful if you can check if my solution works, if it does I am going to add some additional notes to the readme. Thanks, |
I can confirm d4tools successfully compiles with this solution under CentOS 7, but attempting to run it results in this error (at least in my environment):
|
I can confirm that it compiles with your solution :
And on my system it runs now :
I do not have the problem of
I have the problem of Anthony |
Thanks for reporting this. I am thinking about getting rid of openssl dependency completely for default build - that solves this issue as well. The Rust community is actively working on the pure Rust implementation of SSL/TLS called rustls and I think we can depend on that. So the only thing I decide to remove from the default feature set is the After the change we can get rid of a lot of dynamic library dependencies:
And hopefully this will address your issue as well. |
Closing the issue since we have pushed the change to address the issue to master:
Feel free to reopen the issue if you guys feel anything is missing. Cheers! |
Hi,
when trying to run on CentOS Linux release 7.8.2003 (Core), I obtain the following error for
cargo build [--release]
:Is there something I can do about this ?
Thanks,
Anthony
The text was updated successfully, but these errors were encountered: