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

build failure on OSX w/ universal (fat) ruby #1104

Closed
zenspider opened this issue May 13, 2014 · 4 comments
Closed

build failure on OSX w/ universal (fat) ruby #1104

zenspider opened this issue May 13, 2014 · 4 comments

Comments

@zenspider
Copy link
Contributor

Looks like libxml2 and friends are not being built w/ multiple architectures and that's causing a failure.

Repro:

% gem i -i xxx nokogiri -V

I'm getting different failures from @tenderlove for some unknown reason, but we both have this problem in common.

@zenspider
Copy link
Contributor Author

my ruby is stock ruby on latest osx. latest xcode. latest rubygems.

@tenderlove
Copy link
Member

The problem is that when we use the embedded libxml2, it doesn't get compiled as a universal binary even though system Ruby on OS X is a universal binary. This patch against the v1.6.2 tag seems to fix it:

diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb
index 50d058b..0b6730f 100644
--- a/ext/nokogiri/extconf.rb
+++ b/ext/nokogiri/extconf.rb
@@ -184,7 +184,7 @@ def process_recipe(name, version, static_p, cross_p)
       recipe.configure_options = [
         "--disable-shared",
         "--enable-static",
-        "CFLAGS='-fPIC #{ENV["CFLAGS"]}'",
+        "CFLAGS='-fPIC #{ENV["CFLAGS"]} #{RbConfig::CONFIG["ARCH_FLAG"]}'",
       ]
     else
       recipe.configure_options = [

However, I can't seem to reproduce the issue against master.

@tenderlove
Copy link
Member

/cc @flavorjones @knu

@tenderlove
Copy link
Member

It looks like 3c0137c fixes this, so I'm closing this ticket. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants