Closed andreab1997 closed 3 months ago
The problem as mentioned above is that C++ files are compiled without the -std=c++11
flag, but I can't see where this flag would be missing on my box I get
[cxx 1.0.85] running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-std=c++11" "-o" "/scratch/cschwan/cargo-target/pineappl/release/build/cxx-dbfb4779dc2c8786/out/src/cxx.o" "-c" "src/cxx.cc"
which does have the missing flag.
This is possibly a problem in cxx
: https://github.com/dtolnay/cxx/issues/1217.
This is possibly fixed in commit b1036ae911742b7a88c5588c02386aafa4e43170. @andreab1997 would please verify this? Follow this list:
echo $CXX
is emptycargo install --locked --git https://github.com/NNPDF/pineappl.git pineappl_cli
.Hopefully there are no problems anymore.
Note to myself: before closing this issue, write a CHANGELOG.md
entry.
Just to mention: for me, it was working even before b1036ae, but with nix-darwin (not Xcode CLI tools, nor Homebrew). For me, cc
is clang-11
, and I have no $CXX
set.
It's funny, because the original author of the issue in cc-rs
is a NixOS release manager...
I'm running:
cargo install --locked --path ./pineappl_cli --root target/prefix
and I updated the flake in the nix
branch with the reproducible environment.
I assume this problem has been fixed. If that's not the case, please open a new Issue.
Trying to install
pineappl_cli
on a Mac M1 withcargo install --locked pineappl_cli
I get the following error logThe problem can be solved by doing
export CXX="c++ -std=c++11"
CC: @cschwan