Dne 19. 11. 20 v 16:52 Jun Aruga napsal(a):
This kind of commits does not make me happy :( While the intention is good, they don't take into consideration any distribution. It is tailored to the old fashion way of "download tarball & configure & make & make install", everything runs on single machine :/
Does anybody have a tip how to convince upstream, that this does not scale? Does anybody want to ask upstream to revert this commit on my behalf?
The solution is like this?
This commit's comment explains "AC_PROG_CXX sets $CXX to "g++" when it purposefully finds that there is _no_ g++". But for the implementation, the condition " there is no g++" is not considered. I think reporting there is a mismatch between the explanation and implementation, convinces the upstream.
So, we just need to add the condition "there is no g++". In the case of Mamoru, there is g++ possibly on the environment. So, he can avoid unset CXX. https://github.com/ruby/ruby/commit/50b18e81295ad2d45975e4d8ea1e0c7e85140b97
$ git diff diff --git a/configure.ac b/configure.ac index 4e4a52f066..ecc70846d8 100644 --- a/configure.ac +++ b/configure.ac @@ -190,7 +190,7 @@ AC_CHECK_TOOLS([STRIP], [gstrip strip], [:]) AS_IF([test ! $rb_test_CFLAGS], [AS_UNSET(CFLAGS)]); AS_UNSET(rb_test_CFLAGS) AS_IF([test ! $rb_test_CXXFLAGS], [AS_UNSET(CXXFLAGS)]); AS_UNSET(rb_save_CXXFLAGS) -AS_IF([test "${CXX}" = "g++" -a -z "${GXX}"], [ +AS_IF([test "${CXX}" = "g++" -a -z "${GXX}" && ! command -v g++ > /dev/null], [ # AC_PROG_CXX sets $CXX to "g++" when it purposefully finds that there is # _no_ g++. This brain-damaged design must be worked around. Thankfully, # similar thing doesn't happen for AC_PROG_CC.
This is not about fixing this specific case. This is more about the Ruby upstream misconception that the system configuration is static and it is the same when Ruby is build as when the extensions are installed. This is generally not true. So even if g++ was available during Ruby build, it might not be available during Eventmachine installation or vice versa.
In this case, the system used to build Ruby is completely different machine then the system where Eventmachine is build. The similar issue would be when user installed the Eventmachine via `gem install`. And it falls to the same category as [1].
Vít