-
-
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
Nokogiri Build Failure: Bad Design #1345
Comments
Hi, @wjk. Thanks for bringing up this issue. I believe what you're referring to was introduced in commit 8ed4486 to address #1111. This change made it into Nokogiri 1.6.4 and later. The message you receive should be letting you know that you need to run It sounds like you have a better idea to fix #1111 than what we came up with -- can you be more specific about how you think we should be trying to detect iconv? I'd like to make the installation experience better on OSX, but unfortunately at this point the ecosystem has become quite fractured and it's hard to handle every edge case. We're actively looking for help from the community to make Nokogiri better, so any information or thoughts you have on how to do this would be valuable to us. We're also trying to make this page the canonical reference for how-to-install: so once we figure out what's going on here, we'll make sure to update that page as well. Now that I've hopefully demonstrated that nokogiri-core wants to help, I'd like to very kindly ask you to check the value judgements you're making ("bad design", "shortsighted") and the language of helpless entitlement you're using ("even if ... you decide to fix it, it won't help me much"). Nokogiri is an open-source project that's worked on by people in their free time, and who want to make the world better. If you describe the problem you're having and provide information that will help the core contributors diagnose and fix the issue, I promise we'll respond as quickly and helpfully as we can. Thanks for listening. |
@wjk Also, if you could please provide the output from a failed gem install, as well as the mkmf.log file, that would help us further narrow down the problem and solution. Frequently, people will pile onto "failed to install" issues that are unrelated because there's not enough information in the issue to disambiguate. Thanks again. |
First, I would like to apologize for my heated tone above. I was very frustrated when I wrote that because my build just broke for the umpteenth time. I did not mean to take my anger out on you, or on your project. I’m sorry. I do not want to run I am currently running Xcode 7 beta 5. On my system, |
@wjk Thanks for following up. I think this is the first time we've heard pushback on installing the command-line tools, and I'm only a Linux user, but what you're saying seems to make sense. @knu and I had a brief chat at the commit in question and it sounds like perhaps this hack was in place only for older XCode versions. @zenspider - can you think of any harm being done by either removing the hardcoded path, or by replacing it with an appropriate call to an mkmf helper? |
Just want to point out #1218 is related, merging that would actually fix this issue. |
@flavorjones if @knu is OK with changing it, I'm OK with changing it. |
Any updates, nokogiri currently fails to compile on Mac OS X 10.11? /cc @knu |
I seem to have |
I think I'd like to get this into 1.6.7, since it seems to be turning into an "installation improvement" release. ;) |
I have the same issue and the same feeling as the author. I already installed Xcode.app which includes its own set of command line tools, and I don't want to install a duplicate set, which may go out of sync at any time. |
@RSY96 Thanks for your additional post. I mentioned above that a fix is going into 1.6.7, no need to further convince anyone of anything. |
@flavorjones Sorry that I didn't read all the posts carefully. I just glanced at this long post and thought this was just another case where the issue was never going to be resolved. |
I'm using OS X 10.7 (and I'm a newbie with rails). Just for completeness: I have full Xcode installed as well as MacPorts under /opt/local, but no HomeBrew and nothing under /usr/local[/lib]. I would like to avoid linking against MacPorts libraries as they get removed or renamed when they get updated. After problems with libxml2 and reading some posts about recent changes I tried to install the latest version, but it didn't really help:
I'm still experiencing problems with libxml2:
One of the most weird part is this one though:
I can link to more logs if needed, but I'm not sure about the most suitable ticket. The libxml2 tests finally fail because of the wrong number of arguments in conftest:
|
I'm running El Capitan on a Mac, and have my iconv.h header located in Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/iconv.h. I also have it located at The above instructions do not work for me; I get the message: "The file "/usr/include/iconv.h" is missing in your build environment, I've been through this on earlier OS versions, despite having installed XCode straight from the app store. (So I can't do xcode-select --installed) Any suggestions? Thanks- Bob |
@bobashforth Please note that |
Thanks, xymbol; that is the repo I tapped to install libiconv from brew. My issue is that I do have libiconv, and I do have iconv.h, and I do have Xcode installed (single copy), and installing Nokogiri fails, with any of the above suggestions duly followed. It took me days, if not weeks, to get nokogiri installed on my work laptop originally; it's been swapped out for a new one, unfortunately not preserving my toolset, and I'm in the same boat now as I was two years ago. :-( Again, any suggestions? Thanks- Bob |
@bobashforth I hear you. Have Xcode 7.0.1 installed on 10.11 and the new solution didn't work either. Had to install Command Line Tools on top of Xcode, which I didn't want to. It's working for me now. |
I got nokogiri install on El Capitian by following this: http://stackoverflow.com/questions/5528839/why-does-installing-nokogiri-on-mac-os-fail-with-libiconv-is-missing |
Please note that #1218 has been merged, which we believe will address this issue. Would love for someone to try building from source ("bundle exec rake compile") and let us know. |
Sorry, but I also have to tell that I quite often run into troubles when I need nokogiri. This time I try to setup a rails app on a fresh MacBook with El Captain on it. I installed the latest Xcode
This time I run into this problem:
|
Here my tricks how it finally worked:
|
xcode doesn't ship with gcc, but you're using gcc to build. I suspect something is out-of-date with one of your rvm builds. |
Oh, I'm not using gcc. I just tried to do a Probably one of the tries to follow nokogiri's tips how to fix things (probably installing the command line tools with
|
@rjsathome If you're having a problem, please open a new issue, and please don't post to a closed ticket. The problem you're describing is not the same as the OP's problem. Locking this ticket down. |
Whenever I try to compile Nokogiri for OS X, I get a failure message because
/usr/include/iconv.h
is not found on my computer. This is because Nokogiri is hardcoding that exact path into itsextconf.rb
script. Even thoughiconv.h
is very much present (inside my Xcode SDK), and even though Nokogiri compiles just fine when I manually patchextconf.rb
to remove the check, the fact is that Nokogiri won’t play nice.While I can manually patch Nokogiri to remove this shortsighted check, the fact is that Nokogiri is required in so many places that manually patching it every time is infeasible or impossible. Sadly, this check has been in place for so long that, even if you agree with me and decide to fix it, it won’t help me much because I have gems that depend on versions that have already been pushed that include the check, and that cannot be changed for stability reasons. Does anyone have any ideas as to how this could be resolved?
(This issue has bigger repercussions than simply the project I am working on. OS X El Capitan includes a feature that makes
/usr/include
permanently immutable, even by the root user. If this gem is not patched to accommodate this, it will become impossible to install on Macs that run OS X El Capitan.)The text was updated successfully, but these errors were encountered: