I'm running into a problem with this latest version. I've seen similar problem reports for earlier versions, but can't figure out how to get around it. System info, versions and the build error are shown below.
This snippet seems to be where it goes wrong:
checking for whether
-I/opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ext/nokogiri/ports/x86_64-darwin22/libgumbo/1.0.0-nokogiri/include
is accepted as
CPPFLAGS... no
That include dir is where the header file is. So why "no"?
Any help getting this built would be great!
--
Louis
$ uname -orm
Darwin 22.5.0 x86_64
$ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]
$ which ruby
/opt/pkg/bin/ruby
Ruby is installed using the "pkgsrc" framework from NetBSD.
$ bundler --version
Bundler version 2.4.10
Bundler is installed with the ruby32-base package.
$ bundle config list
Settings are listed in order of priority. The top value will be used.
bin
Set for your local app (/opt/sandbox/ngtest/.bundle/config): "./bin"
build.nokogiri
Set for your local app (/opt/sandbox/ngtest/.bundle/config): "--with-ldflags='-L. -L/opt/pkg/lib -L/usr/lib' --with-xml2-include=/opt/pkg/include/libxml2"
build.racc
Set for your local app (/opt/sandbox/ngtest/.bundle/config): "--with-ldflags=-L. -L/usr/lib -L/opt/pkg/lib"
force_ruby_platform
Set for your local app (/opt/sandbox/ngtest/.bundle/config): true
path
Set for your local app (/opt/sandbox/ngtest/.bundle/config): "./bundle"
The build fails when trying to find "nokogiri_gumbo.h", like this:
Running git apply with /opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/patches/libxslt/0001-update-config.guess-and-config.sub-for-libxslt.patch... OK
Running 'configure' for libxslt 1.1.38... OK
Running 'compile' for libxslt 1.1.38... OK
Running 'install' for libxslt 1.1.38... OK
Activating libxslt 1.1.38 (from /opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ports/x86_64-darwin22/libxslt/1.1.38)...
checking for whether -DNOKOGIRI_PACKAGED_LIBRARIES is accepted as CPPFLAGS... no
xml2-config cflags: -I/opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ports/x86_64-darwin22/libxml2/2.11.4/include/libxml2
checking for whether -DNOKOGIRI_LIBXML2_PATCHES="\"0001-Remove-script-macro-support.patch 0002-Update-entities-to-remove-handling-of-ssi.patch
0003-libxml2.la-is-in-top_builddir.patch 0009-allow-wildcard-namespaces.patch 0010-update-config.guess-and-config.sub-for-libxml2.patch
0011-rip-out-libxml2-s-libc_single_threaded-support.patch\"" is accepted as CPPFLAGS... no
checking for -llzma... yes
xslt-config cflags: -I/opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ports/x86_64-darwin22/libxml2/2.11.4/include/libxml2
-I/opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ports/x86_64-darwin22/libxslt/1.1.38/include
checking for whether -DNOKOGIRI_LIBXSLT_PATCHES="\"0001-update-config.guess-and-config.sub-for-libxslt.patch\"" is accepted as CPPFLAGS... no
checking for xmlParseDoc() in libxml/parser.h... yes
checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes
checking for exsltFuncRegister() in libexslt/exslt.h... yes
Using mini_portile version 2.8.2
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri.
Configuration options: --disable-shared --enable-static CFLAGS\=-fPIC
Copying gumbo-parser files into tmp/x86_64-apple-darwin22/ports/libgumbo/1.0.0-nokogiri/gumbo-parser...
Running 'compile' for libgumbo 1.0.0-nokogiri... OK
Activating libgumbo 1.0.0-nokogiri (from ports/x86_64-darwin22/libgumbo/1.0.0-nokogiri)...
checking for whether -I/opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ext/nokogiri/ports/x86_64-darwin22/libgumbo/1.0.0-nokogiri/include is accepted as
CPPFLAGS... no
checking for gumbo_parse_with_options() in nokogiri_gumbo.h... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
checking for rb_gc_location()... yes
checking for rb_category_warning()... yes
checking for whether -DNOKOGIRI_OTHER_LIBRARY_VERSIONS="\"libgumbo:1.0.0-nokogiri\"" is accepted as CPPFLAGS... no
creating Makefile
current directory: /opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20230716-60773-qxj8ni sitelibdir\=./.gem.20230716-60773-qxj8ni clean
current directory: /opt/sandbox/ngtest/bundle/ruby/3.2.0/gems/nokogiri-1.15.3/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20230716-60773-qxj8ni sitelibdir\=./.gem.20230716-60773-qxj8ni
compiling gumbo.c
clang: warning: argument unused during compilation: '-diag-disable=175,188,1684,2259,2312' [-Wunused-command-line-argument]
gumbo.c:32:10: fatal error: 'nokogiri_gumbo.h' file not found
#include "nokogiri_gumbo.h"
^~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [gumbo.o] Error 1