sparklemotion / nokogiri.org

Documentation site for Nokogiri (a ruby library)
https://nokogiri.org/
MIT License
46 stars 24 forks source link

[OpenBSD] Fails to build after `gem update --system` #57

Closed basicfeatures closed 1 year ago

basicfeatures commented 1 year ago

Works fine if I don't run gem update --system though. Just thought I'd let you know 👍

# pkg_add ruby
# gem update --system
# exit
$ gem install --user-install nokogiri -- --use-system-libraries
Fetching nokogiri-1.14.1.gem
Building native extensions with: '--use-system-libraries'
This could take a while...
ERROR:  Error installing nokogiri:
        ERROR: Failed to build gem native extension.

    current directory: /home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1/ext/nokogiri
/usr/local/bin/ruby31 -I /usr/local/lib/ruby/site_ruby/3.1 extconf.rb --use-system-libraries
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... no
checking for xmlParseDoc() in -llibxml2... no
checking for libxml-2.0 using `pkg_config`... yes: ["-I/usr/local/include/libxml2 -I/usr/local/include ", "-L/usr/local/lib", "-lxml2"]
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
Using mini_portile version 2.8.1
---------- 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/x86_64-unknown-openbsd7.2/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-openbsd/libgumbo/1.0.0-nokogiri)...
checking for whether -I/home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1/ext/nokogiri/ports/x86_64-openbsd/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: /home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20230213-34532-h1i09e sitelibdir\=./.gem.20230213-34532-h1i09e clean

current directory: /home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20230213-34532-h1i09e sitelibdir\=./.gem.20230213-34532-h1i09e
compiling gumbo.c
compiling html4_document.c
compiling html4_element_description.c
compiling html4_entity_lookup.c
compiling html4_sax_parser_context.c
compiling html4_sax_push_parser.c
compiling libxml2_backwards_compat.c
compiling nokogiri.c
compiling test_global_handlers.c
compiling xml_attr.c
compiling xml_attribute_decl.c
compiling xml_cdata.c
compiling xml_comment.c
compiling xml_document.c
compiling xml_document_fragment.c
compiling xml_dtd.c
compiling xml_element_content.c
compiling xml_element_decl.c
compiling xml_encoding_handler.c
compiling xml_entity_decl.c
compiling xml_entity_reference.c
compiling xml_namespace.c
compiling xml_node.c
compiling xml_node_set.c
compiling xml_processing_instruction.c
compiling xml_reader.c
compiling xml_relax_ng.c
compiling xml_sax_parser.c
compiling xml_sax_parser_context.c
compiling xml_sax_push_parser.c
compiling xml_schema.c
compiling xml_syntax_error.c
compiling xml_text.c
compiling xml_xpath_context.c
compiling xslt_stylesheet.c
linking shared-object nokogiri/nokogiri.so
Cleaning files only used during build.

current directory: /home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1/ext/nokogiri
make DESTDIR\= sitearchdir\=./.gem.20230213-34532-h1i09e sitelibdir\=./.gem.20230213-34532-h1i09e install
/usr/bin/install -c -o root -g bin -m 0755 nokogiri.so ./.gem.20230213-34532-h1i09e/nokogiri
install: ./.gem.20230213-34532-h1i09e/nokogiri/INS@8qGrw9ewhg: chown/chgrp: Operation not permitted
*** Error 1 in /home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1/ext/nokogiri (Makefile:192 'install-so')

make install failed, exit code 2

Gem files will remain installed in /home/dev/.local/share/gem/ruby/3.1/gems/nokogiri-1.14.1 for inspection.
Results logged to /home/dev/.local/share/gem/ruby/3.1/extensions/x86_64-openbsd/3.1/nokogiri-1.14.1/gem_make.out

$ bundle -v
Bundler version 2.4.6

$ ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-openbsd]

$ uname -sr
OpenBSD 7.2
flavorjones commented 1 year ago

@basicfeatures How can I help you?

If you're having trouble installing nokogiri, please open an issue at https://github.com/sparklemotion/nokogiri/issues/new/choose and fill out the template so we can better help you.

If you're suggesting updating the documentation (which is what this repository is!) can you help me understand what you think needs to change?

flavorjones commented 1 year ago

Also I'll point out that your logs above contain this error message:

install: ./.gem.20230213-34532-h1i09e/nokogiri/INS@8qGrw9ewhg: chown/chgrp: Operation not permitted

which seems unlikely to be a nokogiri issue.