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
Use C++ 11 for MySQL 5.7 to fix build in mac #56384
Conversation
I'd like to run https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/mysql.nix, but I'm not sure how. Same with the sandbox |
Please use The tests can be run with |
Can you elaborate a bit on how this solves the issue? I can see that c++ 11 is used (as opposed to which version?) Protobuf 3.6 is incompatible, I assume, because it uses a different C++ compiler? |
#49174 shows us the error that we were experiencing. The last successful build was https://hydra.nixos.org/build/81938220, with the first failing here: https://hydra.nixos.org/build/82083071 The difference between these 2 builds seems to be Protobuf 3.4 being updated to Protobuf 3.6. Protobuf fails because the newer version uses newer C++ features. This commit makes MySQL 5.7 use C++ 11 to fix these issues.
@orivej updated! Thanks for the pointer 🙏 |
This is probably just another case of #54606 |
Clang 6 has updated the default c++ from 98 to 14, but on Darwin we still use Clang 5. (Is there a github issue about updating the default LLVM on Darwin? Related: #49402, #39986.)
Protobuf 3.6 has dropped support for c++ older than 11: now all packages that use protobuf need -std=c++11 or newer. @veprbl Maybe mysql does not declare that it needs C++ 11 because by itself it does not… |
I'll look into that today, but I don't have easy access to linux. Any reason why this won't work on mac? |
Can I add that to this pr? Should I? Apologise for the many questions, quite new to nix and trying to wrap my head around it to migrate our company's developers to nix from homebrew et al. |
NixOS tests build thin NixOS (Linux) images and run them in qemu, sharing host /nix/store with the guest. AFAIK there is no fundamental reason why this or equivalent can't be supported on macOS, but it is not easy. For one thing, if I'm not mistaken,
I think this PR was ready as it was. I left it for a while for someone more active to merge it. |
Motivation for this change
#49174 shows us the error that we were experiencing.
The last successful build was https://hydra.nixos.org/build/81938220, with the first failing here: https://hydra.nixos.org/build/82083071
Description
#49174 shows us the error that we were experiencing.
The last successful build was https://hydra.nixos.org/build/81938220, with the first failing here: https://hydra.nixos.org/build/82083071
The difference between these 2 builds seems to be Protobuf 3.4 being updated to Protobuf 3.6.
This commit makes MySQL 5.7 use c++ 11 to fix these issues as Protobuf 3.6 uses newer C++ features
Fixes #49174
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)-> Can't do this one as it didn't work before. It's just a revert anyways, so it is the same as it once was.