-
Notifications
You must be signed in to change notification settings - Fork 14
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
Installation of re2 ignore $CC and $CXX variables #33
Comments
Hi @frenkel, thanks for reporting this. It looks like Nokogiri have specific support for OpenBSD in their |
Could you please try adding the following to RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX'] See the |
GitHub: #33 Follow the lead from Nokogiri and the sqlite3 gem by using the CC (and CXX) environments to configure the Makefile during installation if present. See: * https://github.com/sparklemotion/sqlite3-ruby/blob/master/ext/sqlite3/extconf.rb#L7 * https://github.com/sparklemotion/nokogiri/blob/master/ext/nokogiri/extconf.rb#L395-L402
GitHub: #33 Follow the lead from Nokogiri and the sqlite3 gem by using the CC (and CXX) environments to configure the Makefile during installation if present. See: * https://github.com/sparklemotion/sqlite3-ruby/blob/master/ext/sqlite3/extconf.rb#L7 * https://github.com/sparklemotion/nokogiri/blob/master/ext/nokogiri/extconf.rb#L395-L402
GitHub: #33 Follow the lead from Nokogiri and the sqlite3 gem by using the CC (and CXX) environments to configure the Makefile during installation if present. See: * https://github.com/sparklemotion/sqlite3-ruby/blob/master/ext/sqlite3/extconf.rb#L7 * https://github.com/sparklemotion/nokogiri/blob/master/ext/nokogiri/extconf.rb#L395-L402
GitHub: #33 Follow the lead from Nokogiri and the sqlite3 gem by using the CC (and CXX) environments to configure the Makefile during installation if present. See: * https://github.com/sparklemotion/sqlite3-ruby/blob/master/ext/sqlite3/extconf.rb#L7 * https://github.com/sparklemotion/nokogiri/blob/master/ext/nokogiri/extconf.rb#L395-L402
GitHub: #33 Follow the lead from Nokogiri and the sqlite3 gem by using the CC (and CXX) environments to configure the Makefile during installation if present. See: * https://github.com/sparklemotion/sqlite3-ruby/blob/master/ext/sqlite3/extconf.rb#L7 * https://github.com/sparklemotion/nokogiri/blob/master/ext/nokogiri/extconf.rb#L395-L402
I've released v1.1.0 which should hopefully fix this problem: please give it a whirl and let me know if it solves your issue. |
Thank you and sorry for the late reply! Unfortunately it doesn't work. The mkmf.log contains the same commands, no mention of what I set in the CC and CXX environment variables.
|
So I can reproduce this locally (e.g. in a virtual machine), could you please provide the exact version of OpenBSD, the appropriate commands, etc. and I'll see what I can do? |
Thank you! Just install OpenBSD 6.1 and run the following command as root:
and then as any normal user:
|
GitHub: #33 When compiling the gem with a compiler specified through the CC and CXX environment variables, we need to update both the Makefile configuration and standard Ruby configuration so that the various pre-compilation checks and final Makefile use the right compiler toolchain. This should hopefully allow compilation on OpenBSD using egcc and eg++ (tested in VirtualBox).
Great, thank you so much! |
On OpenBSD we need to use egcc and eg++ from ports to compile re2 and therefore also the re2 gem. When I specify them using environment variables (
CC=egcc CXX=eg++ bundle
), this is completely ignored (snippet from mkmf.log):For other gems such as Nokogiri this works without problems.
The text was updated successfully, but these errors were encountered: