[Xapian-tickets] [Xapian] #837: Error compiling Ruby bindings with Ruby from Nixpkg

Xapian nobody at xapian.org
Wed Jan 8 09:51:36 GMT 2025


#837: Error compiling Ruby bindings with Ruby from Nixpkg
-------------------------------------------+--------------------
        Reporter:  Graeme Porteous         |      Owner:  (none)
            Type:  defect                  |     Status:  new
        Priority:  normal                  |  Milestone:
       Component:  Xapian-bindings (Ruby)  |    Version:
        Severity:  minor                   |   Keywords:
      Blocked By:                          |   Blocking:
Operating System:  All                     |
-------------------------------------------+--------------------
 The Ruby symbols aren't available when compiling and results in an error:

 {{{
 ========================================================================
       _wrap_LatLongCoords_size(int, unsigned long*, unsigned long) in
 xapian_wrap.o
       _wrap_Database_size(int, unsigned long*, unsigned long) in
 xapian_wrap.o
       _wrap_Database_get_total_length(int, unsigned long*, unsigned long)
 in xapian_wrap.o
       _wrap_Database_get_revision(int, unsigned long*, unsigned long) in
 xapian_wrap.o
       _wrap_Database_check(int, unsigned long*, unsigned long) in
 xapian_wrap.o
   "_rb_undef_alloc_func", referenced from:
       _Init__xapian in xapian_wrap.o
   "_rb_undef_method", referenced from:
       _Init__xapian in xapian_wrap.o
   "_rb_unexpected_type", referenced from:
       _Init__xapian in xapian_wrap.o
 ld: symbol(s) not found for architecture arm64
 clang++: error: linker command failed with exit code 1 (use -v to see
 invocation)
 make[3]: *** [Makefile:741: _xapian.la] Error 1
 make[3]: Leaving directory './xapian-full/tmp/aarch64-apple-
 darwin24.2.0/ports/xapian-bindings/1.4.22/xapian-bindings-1.4.22/ruby'
 make[2]: *** [Makefile:670: all] Error 2
 make[2]: Leaving directory './xapian-full/tmp/aarch64-apple-
 darwin24.2.0/ports/xapian-bindings/1.4.22/xapian-bindings-1.4.22/ruby'
 make[1]: *** [Makefile:514: all-recursive] Error 1
 make[1]: Leaving directory './xapian-full/tmp/aarch64-apple-
 darwin24.2.0/ports/xapian-bindings/1.4.22/xapian-bindings-1.4.22'
 make: *** [Makefile:436: all] Error 2
 ========================================================================
 }}}

 This can be solved by setting the `LIBS` environment variable to
 `RbConfig::CONFIG["LIBRUBYARG"]` as has been done here for our Ruby gem:
 https://github.com/mysociety/xapian-full/pull/11

 I was wondering if a more appropriate change would be to update
 configure.ac to set `RUBY_LIBS` automatically if `null`, something along
 the lines of:
 https://github.com/mysociety/xapian-full/issues/10#issuecomment-2575244213
-- 
Ticket URL: <https://trac.xapian.org/ticket/837>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list