Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

update extconf.rb to use Nokogiri's CPPFLAGS #163

Merged
merged 2 commits into from Mar 12, 2021
Merged

update extconf.rb to use Nokogiri's CPPFLAGS #163

merged 2 commits into from Mar 12, 2021

Commits on Feb 26, 2021

  1. update extconf.rb to use Nokogiri's CPPFLAGS

    which are present starting in Nokogiri v1.11.0.rc4.
    
    See sparklemotion/nokogiri#2145 for more information.
    
    With this change, here's what compilation looks like when Nokogiri is
    built with libxml2:
    
    > /home/flavorjones/.rvm/rubies/ruby-2.7.2/bin/ruby -I. ../../../../ext/nokogumbo/extconf.rb
    > checking for whether -I/home/flavorjones/.rvm/gems/ruby-2.7.2/gems/nokogiri-1.11.0.rc3/ext/nokogiri is accepted as CFLAGS... yes
    > checking for whether -I/home/flavorjones/.rvm/gems/ruby-2.7.2/gems/nokogiri-1.11.0.rc3/ext/nokogiri/include is accepted as CFLAGS... yes
    > checking for whether -I/home/flavorjones/.rvm/gems/ruby-2.7.2/gems/nokogiri-1.11.0.rc3/ext/nokogiri/include/libxml2 is accepted as CFLAGS... yes
    > checking for libxml/tree.h... yes
    > checking for nokogiri.h... yes
    > creating Makefile
    
    and here's what compilation looks like when Nokogiri is _not_ built with
    libxml2:
    
    > checking for whether -I/home/flavorjones/.rvm/gems/ruby-2.7.2/gems/nokogiri-1.11.0.rc3/ext/nokogiri is accepted as CFLAGS... yes
    > checking for libxml/tree.h... no
    > checking for nokogiri.h... no
    > checking for xmlNewDoc() in -lxml2... yes
    > checking for nokogiri.h in /home/flavorjones/.rvm/gems/ruby-2.7.2/gems/nokogiri-1.11.0.rc3/ext/nokogiri... yes
    > creating Makefile
    
    In a future update, once we've pinned the Nokogiri dependency to "~>
    1.11", we should be able to remove the stanza that looks at
    `libxml2_path`.
    flavorjones committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    5654530 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2021

  1. fix: use Nokogiri's LDFLAGS to link against precompiled libs

    This is necessary on Windows where unresolved symbols aren't
    allowed. We also limit compatibility with Nokogiri's precompiled libraries
    to Nokogiri >= 1.11.2 on Windows for this reason.
    
    Related to:
    - sparklemotion/nokogiri#2145
    - sparklemotion/nokogiri#2167
    - sparklemotion/nokogiri#2202
    flavorjones committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    a41ab09 View commit details
    Browse the repository at this point in the history