Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To use the same C compiler with the Ruby. If they are different, it may cause an issue. For example a FreeBSD environment which has gcc and libiconv from pkg/ports, which are installed in /usr/local. The normal Ruby installation uses cc (clang). But when nokogiri runs extconf.rb, libxml uses gcc by its configure, and it uses libiconv (-liconv), instead of FreeBSD libc's iconv because port's gcc sees /usr/local by default. Then extconf.rb runs have_library('xml2', 'xmlParseDoc', 'libxml/parser.h') but it fails to find -liconv because extconf.rb's try_compile uses Ruby's CC (cc) and which doesn't see /usr/local.
- Loading branch information