[Xapian-tickets] [Xapian] #834: *BSD conditional to modify xapian-bindings/config.ac to suppress -lstdc++ library
Xapian
nobody at xapian.org
Sun Sep 22 21:03:14 BST 2024
#834: *BSD conditional to modify xapian-bindings/config.ac to suppress -lstdc++
library
--------------------------+-------------------------------
Reporter: David Gessel | Owner: Olly Betts
Type: defect | Status: assigned
Priority: normal | Milestone: 1.4.27
Component: Build system | Version: 1.4.22
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: FreeBSD
--------------------------+-------------------------------
Changes (by Olly Betts):
* keywords: -lstdc++, FreeBSD =>
* status: new => assigned
* version: => 1.4.22
* component: Other => Build system
* milestone: => 1.4.27
Comment:
It's hard to know exactly what was going on in #430 as the interesting
part of the log was not provided, but it was on "10.6.2 OS X" not FreeBSD
anyway. From the information provided it looks to me more like a
discrepancy in what different things are expecting for the module
extension (`.bundle` vs `.so`) which we never saw in an upstream build so
it seems likely it was a discrepancy between upstream xapian-bindings and
the ruby gem. I think this annoying extension difference is an Apple
invention, so not relevant for FreeBSD.
This explicit linking to `-lstdc++` was actually added for OpenBSD (see
the comment above it). It could probably be limited to just OpenBSD (I
think we didn't originally in case other platforms might need it too, but
it makes the assumption that the standard C++ library in use is
libstdc++). If we're going to drop it for the BSDs it probably would be
better to just drop it entirely.
It was added in 2005, and OpenBSD now seems to use clang as the default
compiler, but I couldn't trivially find if the default C++ standard
library is now libstdc++ or libc++ (clang supports both).
https://man.openbsd.org/intro.3 mentions both of them for example.
If that default has changed, it might be we actually ought to explicitly
link with `-lc++` on OpenBSD (or perhaps better determine which C++
standard library is in use and explicitly link that).
It's also possible that the "deliberate decision on the part of OpenBSD
developers" that required this has changed since and this isn't required
on OpenBSD any more.
Unfortunately we don't have an OpenBSD CI job to easily test changes on.
We're using https://github.com/vmactions for the non-Linux platform CI
jobs and that has OpenBSD support so hopefully it's easy to add. I'll
have a go.
--
Ticket URL: <https://trac.xapian.org/ticket/834#comment:1>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list