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

Xapian nobody at xapian.org
Wed Jan 8 22:52:29 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                   |        Resolution:
 Keywords:                          |        Blocked By:
 Blocking:                          |  Operating System:  All
------------------------------------+---------------------------
Comment (by Olly Betts):

 > 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

 The patch there is overly complicated since `RUBY_LIBS` is set to empty
 just before, so the amended conditional will always be true and it would
 be simpler and clearer to just scrap the conditionalisation entirely.

 In the comment over there it says "''Issue is with the compiler non being
 able to find the Ruby headers''" but that's not correct as this is nothing
 to do with the headers - it's a link time problem to do with the symbols
 not being found in a library.

 I don't understand why this fails though - most platforms allow undefined
 symbols when linking a shared object (which then get resolved by the
 dynamic linker when the library is loaded at runtime).  The major
 exception is Microsoft Windows, essentially because DLLs are a really
 ancient technology and rather lacking in features, so there we pass `-no-
 undefined` to `libtool` in `_xapian_la_LDFLAGS` which means we need to
 explicitly link to libruby.

 Can you show the full log mentioned in the output:

 > Running 'compile' for xapian-bindings 1.4.22... ERROR, review './xapian-
 full/tmp/aarch64-apple-darwin24.2.0/ports/xapian-
 bindings/1.4.22/compile.log' to see what happened. Last lines are:

 We could enable linking to libruby everywhere but I'm not sure of the full
 implications - it seems like something we'd want to test carefully before
 changing which is a pain, especially for platforms we lack CI for.
-- 
Ticket URL: <https://trac.xapian.org/ticket/837#comment:1>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list