Skip to content
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

Installing on CentOS 7 with llvm-7.0 and rust 1.42 fails with LLVM ERROR: inconsistency in registered CommandLine option #139

Closed
godsic opened this issue Apr 16, 2020 · 3 comments

Comments

@godsic
Copy link

godsic commented Apr 16, 2020

Running cargo install -v bat on CentOS 7.7.1908 with llvm-config --version == 7.0.1 and rustc 1.42 fails with:

   Compiling onig_sys v69.2.0
     Running `rustc --crate-name build_script_build /home/mykola/.cargo/registry/src/github.com-1ecc6299db9ec823/onig_sys-69.2.0/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=fd792ec2aca13a13 -C extra-filename=-fd792ec2aca13a13 --out-dir /tmp/cargo-installKSL5YS/release/build/onig_sys-fd792ec2aca13a13 -L dependency=/tmp/cargo-installKSL5YS/release/deps --extern bindgen=/tmp/cargo-installKSL5YS/release/deps/libbindgen-107e6aa1d5ca33bc.rlib --extern cc=/tmp/cargo-installKSL5YS/release/deps/libcc-c683e85653a3cdb2.rlib --extern pkg_config=/tmp/cargo-installKSL5YS/release/deps/libpkg_config-dae0d33423e1d95f.rlib --cap-lints allow -L native=/tmp/cargo-installKSL5YS/release/build/libloading-553ef24289fe8fd2/out -L native=/tmp/cargo-installKSL5YS/release/build/backtrace-sys-e9c37ac036cbe4fd/out`
     Running `/tmp/cargo-installKSL5YS/release/build/onig_sys-fd792ec2aca13a13/build-script-build`
error: failed to run custom build command for `onig_sys v69.2.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installKSL5YS/release/build/onig_sys-fd792ec2aca13a13/build-script-build` (exit code: 1)
--- stderr
: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

llvm-config --cxxflags --cppflags --cflags --ldflags --libs all shows

-I/opt/rh/llvm-toolset-7.0/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -fPIC -fvisibility-inlines-hidden -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -g -DNDEBUG  -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/opt/rh/llvm-toolset-7.0/root/usr/include   -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/opt/rh/llvm-toolset-7.0/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -fPIC -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-comment -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-L/opt/rh/llvm-toolset-7.0/root/usr/lib64 
-lLLVM-7
@WowVeryLogin
Copy link

Encountered the same problem

@iwillspeak iwillspeak self-assigned this Dec 25, 2020
@iwillspeak
Copy link
Collaborator

Interesting. I’ll see if I can reproduce. I’m guessing it is some incompatible pairing of LLVM and the llvm-config bindings. I wonder if the command line options for llvm-config have changed in the time since LLVM 7?

@iwillspeak
Copy link
Collaborator

Closing this as won't fix. I wasn't able to reproduce it at the time. I suspect it is an issue with either the older version of LLVM being used or bindgen. If this is still an issue then shout out and I can look at potentially reopening the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants