Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkmf: COUTFLAG does not have -o #5749

Closed
glebm opened this issue May 29, 2019 · 1 comment
Closed

mkmf: COUTFLAG does not have -o #5749

glebm opened this issue May 29, 2019 · 1 comment
Milestone

Comments

@glebm
Copy link
Contributor

@glebm glebm commented May 29, 2019

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
@glebm glebm changed the title extconf.rb: -o not extconf.rb: COUTFLAG does not have -o May 29, 2019
@glebm glebm changed the title extconf.rb: COUTFLAG does not have -o mkmf: COUTFLAG does not have -o May 29, 2019
@glebm
Copy link
Contributor Author

@glebm glebm commented May 29, 2019

I'm guessing it's because COUTFLAG is not set here, only OUTFLAG is:

setConfig(context, mkmfHash, "OUTFLAG", "-o ");

Loading

glebm added a commit to glebm/jruby that referenced this issue May 29, 2019
glebm added a commit to glebm/jruby that referenced this issue May 29, 2019
@kares kares closed this in #5750 Jun 3, 2019
kares added a commit that referenced this issue Jun 3, 2019
@kares kares added this to the JRuby 9.2.8.0 milestone Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants