Most Linux systems will have a family of environment variables of the form CC, CXX for each architecture for which a toolchain is installed. This causes WAF to invoke some opaque (i.e. not obvious from the waf source) set of special cases if these environment variables are present, causing the configure phase to choose the wrong compiler for non-native architectures. WAF has a similar set of heuristics for LD_FLAGS and friends. Hacking around this by saving and restoring the enclosing environment is error-prone and will require lots of special cases for different Linux distributions (and even then will break for anyone with an atypical setup). It is not clear from the WAF documentation or source how to prevent this behavior. I have been working around this by maintaining my own wscript files that have the relevant variables hard-coded; this is obviously not an OK way to work going forward.
This issue is high-priority, as flipper can't currently be built from source on Gentoo, Debian, or NixOS (or, notionally, any distro that correctly sets up cross compiler environments).
Most Linux systems will have a family of environment variables of the form
CC
,CXX
for each architecture for which a toolchain is installed. This causes WAF to invoke some opaque (i.e. not obvious from the waf source) set of special cases if these environment variables are present, causing the configure phase to choose the wrong compiler for non-native architectures. WAF has a similar set of heuristics forLD_FLAGS
and friends. Hacking around this by saving and restoring the enclosing environment is error-prone and will require lots of special cases for different Linux distributions (and even then will break for anyone with an atypical setup). It is not clear from the WAF documentation or source how to prevent this behavior. I have been working around this by maintaining my own wscript files that have the relevant variables hard-coded; this is obviously not an OK way to work going forward.This issue is high-priority, as flipper can't currently be built from source on Gentoo, Debian, or NixOS (or, notionally, any distro that correctly sets up cross compiler environments).