Closed cybern0id closed 1 year ago
Ah, prepending the install command with a CXXFLAGS= environment variable to disable the compile flag allows the code to compile at least:
:~$CXXFLAGS="-U_FORTIFY_SOURCE" sh ./install.sh
Still, I have no idea of the implications of this or whether it will adversely affect the security of my node. The documentation https://man7.org/linux/man-pages/man7/feature_test_macros.7.html in relation to this compile flag mention buffer overflow checks etc. Perhaps the variable should be set to -D_FORTIFY_SOURCE=1 instead? And changing optimisation to -O1 instead of -O2? Clutching at straws here....
Due to limited resources, we cannot support all Linux variants. We publish a PEP 600 compliant manylinux
binary wheel for chiapos manylinux_2_17_x86_64
- where 2_17 is the GLIBCMAJOR_GLIBCMINOR version.
Linux variants that are unable to use this binary wheel are community supported.
You may have more success by cloning the chiapos repo and trying to build it from there, rather than the wheel process.
Closing issue.
Ah, that's a shame but understandable. My Alpine node has been running from release versions of compiled chia source since main net went live without any problems (though IIRC I had to compile chia_rs independently at one point). Anyway, as you kindly suggest, I'm going to take a look at compiling chiapos independently too. I'm not finding a lot of detailed documentation regarding FORTIFY_SOURCE but from initial reading, it looks like I can turn it off without much to worry about.
Technically you are compiling all the wheels already - if you look at your output:
Building wheel for chiavdf (pyproject.toml
Building wheel for blspy
Building wheel for chia-rs
Of course! But independently cloning the git repo of each problematic dependency allows easier troubleshooting and testing different compile options and code changes (for me) :)
oh yes certainly.
What happened?
Not sure whether this is a fault of the chia build time flags, a compiler bug or Alpine Linux' default compiler behaviour.
A similar error reported for pybind: https://github.com/pybind/pybind11/issues/1650 and one suggestion is disabling LTO or lowering compiler optimisation level.
Another discussion about a similar bug on the Alpine gitlab tracker: https://gitlab.alpinelinux.org/alpine/aports/-/issues/8626 suggests that because Alpine Linux uses "... -D_FORTIFY_SOURCE=2, a compile flag which Alpine uses by default for security reasons.", the failure is due to the code being compiled isn't compatible with this flag.
I'm not sure how to add that flag to my build environment or where in the chia code to do so and if I do, what the implications are in terms of security.
Version
1.8.0
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output