š gem install nokogiri -v '1.14.5' --platform=ruby -- --use-system-libraries --with-xml2-include=$(pkg-config libxml-2.0 --cflags-only-I) --with-xml2-lib=$(pkg-config libxml-2.0 --libs)
Building native extensions with: '--use-system-libraries --with-xml2-include=-I/data/data/com.termux/files/usr/include/libxml2 -I/data/data/com.termux/files/usr/include --with-xml2-lib=-L/data/data/com.termux/files/usr/lib -lxml2'
This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri
/data/data/com.termux/files/usr/bin/ruby extconf.rb --use-system-libraries --with-xml2-include\=-I/data/data/com.termux/files/usr/include/libxml2\ -I/data/data/com.termux/files/usr/include --with-xml2-lib\=-L/data/data/com.termux/files/usr/lib\ -lxml2
checking for whether -std=c99 is accepted as CFLAGS... yes
checking for whether -Wno-declaration-after-statement is accepted as CFLAGS... yes
checking for whether -O2 is accepted as CFLAGS... yes
checking for whether -g is accepted as CFLAGS... yes
checking for whether -Winline is accepted as CFLAGS... yes
checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes
checking for whether -Wconversion -Wno-sign-conversion is accepted as CFLAGS... yes
Building nokogiri using system libraries.
checking for gzdopen() in -lz... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
Using mini_portile version 2.8.5
---------- IMPORTANT NOTICE ----------
Building Nokogiri with a packaged version of libgumbo-1.0.0-nokogiri.
Configuration options: --enable-shared --disable-static
Copying gumbo-parser files into tmp/aarch64-unknown-linux-android/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/aarch64-linux-android/libgumbo/1.0.0-nokogiri)...
checking for whether -I/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri/ports/aarch64-linux-android/libgumbo/1.0.0-nokogiri/include is accepted as CPPFLAGS... yes
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... yes
creating Makefile
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20231207-25669-ii1no4 sitelibdir\=./.gem.20231207-25669-ii1no4 clean
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20231207-25669-ii1no4 sitelibdir\=./.gem.20231207-25669-ii1no4
compiling gumbo.c
compiling html4_document.c
html4_document.c:49:52: error: incompatible function pointer types passing 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
49 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml/xmlerror.h:898:29: note: passing argument to parameter 'handler' here
898 | xmlStructuredErrorFunc handler);
| ^
html4_document.c:109:52: error: incompatible function pointer types passing 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
109 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/libxml/xmlerror.h:898:29: note: passing argument to parameter 'handler' here
898 | xmlStructuredErrorFunc handler);
| ^
2 errors generated.
make: *** [Makefile:248: html4_document.o] Error 1
make failed, exit code 2
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/nokogiri-1.14.5 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/extensions/aarch64-linux-android/3.2.0/nokogiri-1.14.5/gem_make.out