-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
listen to --with-iconv-dir=<path> on OS X #1369
Conversation
Does this change anything? Nokogiri itself does not require or link with iconv, but libxml2 does, so if you are using libxml2 built outside of Nokogiri there should be no need to mess with iconv. |
@@ -563,18 +580,19 @@ def install | |||
"exslt" => ['exsltFuncRegister', 'libexslt/exslt.h'], | |||
}.each { |lib, (func, header)| | |||
have_func(func, header) || | |||
have_library(lib, func, header) || | |||
have_library(lib, func, header, iconv_libs) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knu - sure, but this line is the explicit issue, without a -L/opt/local/lib
passed here compilation of conftest.c
fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's all you need, passing --with-opt-lib=/opt/local/lib
will do, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, isn't there pkg-config
in the PATH? If you omit --with-xml2-* flags, extconf.rb should call pkg-config to read appropriate flags from the libxml-2.0 package configuration.
dir_config('xml2').any? or pkg_config('libxml-2.0')
dir_config('xslt').any? or pkg_config('libxslt')
dir_config('exslt').any? or pkg_config('libexslt')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's all you need, passing --with-opt-lib=/opt/local/lib will do, I think.
Is this when using --use-system-libraries
?
have_library
works fine then and yes I assume it is enough. When building libxml-2.0
and libxslt
it knows nothing and errors as per this.
...sigh... |
The consequence of 36f1c82 is that OS X installs will still be in the same state for older rubies - though I have no knowledge of which was distributed in each version of OS X. |
I think that #1218, which was merged into master just before this PR came in, may address this problem in a different way. Can you try building from source (master branch) and let me know if you still see this problem? |
1.6.7.rc4 just shipped, which it might be interesting to try to see if it affected any of the behavior you're describing. |
Ok, this took me a while to remember, but I think that this can be closed. I successfully built using:
Macports has the universal variants of the following: % port installed libxml2 libxslt zlib libiconv lzma
The following ports are currently installed:
libiconv @1.14_0
libiconv @1.14_0+universal (active)
libxml2 @2.9.2_2
libxml2 @2.9.2_2+universal (active)
libxslt @1.1.28_1
libxslt @1.1.28_1+universal (active)
lzma @4.65_0+universal (active)
zlib @1.2.8_0
zlib @1.2.8_0+universal (active) |
About
Among the issues touched by this are #972, #1119, #1231 and #1345 - not claiming they are fixed...
Environment
Here's where I started debugging/installing and prepared this contribution from.
OS X:
Xcode:
Macports:
Spot that I started on the non-universal variants.
Install guide
@flavorjones you asked for additions to OS X install guide.
export ARCHFLAGS="-arch x86_64"
as diagnosed by @oliver-whiteman can help with:A better solution is to install the
universal
variantsSadly, this isn't the whole story as @oliver-whiteman found.
As @rsanchezsaez mentioned this will affect all users of Macports with
zlib
andlibiconv
ports installed, where they are not the universal variants. The option of moving/opt/local
sideways did not fill me with joy andmkmf.log
shows this inability to findiconv_open
and hence this PR.merge
So if this is merged the guide should reflect the requirement of:
or
As has been pointed out, installation of
libxml2
andlibxslt
macports/brew and the use the--use-system-libraries
orNOKOGIRI_USE_SYSTEM_LIBRARIES=1
Making note that the universal variants are installed.