Vít Ondruch wrote on 07/26/2018 06:28 PM:
Hi,
Ruby currently fails to build due to removal of GCC from buildroot. The
build failure is due to one test case [1] which fails now and which
should be probably fixed to pass even without GCC.
However, digging into this, I wonder if Ruby should have "BR: gcc" or
"BR: gcc-c++". The thing is, that Ruby is checking presence of C++
compiler during its configuration phase.
ruby-libs contains:
/usr/lib64/ruby/rbconfig.rb:180: CONFIG["CXXFLAGS"] = "-O2 -g -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection"
/usr/lib64/ruby/rbconfig.rb:181: CONFIG["CXX"] = "g++"
/usr/share/ruby/mkmf.rb:74: CXX_EXT = %w[cc mm cxx cpp]
/usr/share/ruby/mkmf.rb:76: CXX_EXT.concat(%w[C])
/usr/share/ruby/mkmf.rb:82: SRC_EXT = C_EXT + CXX_EXT
/usr/share/ruby/mkmf.rb:1830: $CXXFLAGS += " " << cflags
/usr/share/ruby/mkmf.rb:1963:CXX = #{CONFIG['CXX']}
/usr/share/ruby/mkmf.rb:1984:CXXFLAGS = $(CCDLFLAGS) #$CXXFLAGS $(ARCH_FLAG)
/usr/share/ruby/mkmf.rb:2429: command = compile_command % COMPILE_CXX
/usr/share/ruby/mkmf.rb:2430: asm_command = compile_command.sub(/compiling/,
'translating') % ASSEMBLE_CXX
/usr/share/ruby/mkmf.rb:2431: CXX_EXT.each do |e|
/usr/share/ruby/mkmf.rb:2458: if
srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===))
/usr/share/ruby/mkmf.rb:2510: $CXXFLAGS = (with_config("cxxflags",
arg_config("CXXFLAGS", config["CXXFLAGS"]))||'').dup
/usr/share/ruby/mkmf.rb:2666: COMPILE_CXX = config_string('COMPILE_CXX') ||
'$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<'
/usr/share/ruby/mkmf.rb:2676: ASSEMBLE_CXX = config_string('ASSEMBLE_CXX') ||
COMPILE_CXX.sub(/(?<=\s)-c(?=\s)/, '-S')
So it is quite reasonable that ruby compilation checks
CXX compiler.
Regards,
Mamoru