Skip to content

mkmf: COUTFLAG does not have -o #5749

Description

@glebm

jruby v9.2.7.0 produces Makefiles with invalid C compilation command.

Diffing a Makefile produced from the same extconf.rb with MRI vs jRuby

 OUTFLAG = -o $(empty)
-COUTFLAG = -o $(empty)
-CSRCFLAG = $(empty)
+COUTFLAG = $(empty)

Note that COUTFLAG in JRuby-produced Makefile is missing -o, resulting in an invalid cc command.

Work-around I'm using in the extconf.rb file:

# COUTFLAG is not set correctly on jruby
if RUBY_PLATFORM == 'jruby'
  MakeMakefile.send(:remove_const, :COUTFLAG)
  MakeMakefile::COUTFLAG = '-o $(empty)'
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions