[Xapian-tickets] [Xapian] #834: *BSD conditional to modify xapian-bindings/config.ac to suppress -lstdc++ library
Xapian
nobody at xapian.org
Sat Sep 21 17:08:17 BST 2024
#834: *BSD conditional to modify xapian-bindings/config.ac to suppress -lstdc++
library
---------------------------------+-------------------------------
Reporter: David Gessel | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Keywords: -lstdc++, FreeBSD
Blocked By: | Blocking:
Operating System: FreeBSD |
---------------------------------+-------------------------------
This is similar to #430, opened and marked invalid many years ago, and
likewise the issue is, for me, arising from attempting to build a ruby gem
xapian-ruby-1.4.22 on FreeBSD. The problematic code seems to be in
xapian-bindings-1.4.22/configure.ac which generates a /configure file that
includes at 21047
{{{
SWIG_CXXFLAGS=
if test yes = "$GXX" ; then
SWIG_CXXFLAGS="-fno-strict-aliasing"
XAPIAN_LIBS="$XAPIAN_LIBS -lstdc++"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}}}
The [https://github.com/freebsd/freebsd-ports/blob/main/databases/ruby-
xapian/files/patch-configure FreeBSD port] for this gem, patches the same
configure file as
{{{
--- configure.orig 2023-02-02 01:01:44 UTC
+++ configure
@@ -21048,7 +21048,7 @@ SWIG_CXXFLAGS=
if test yes = "$GXX" ; then
SWIG_CXXFLAGS="-fno-strict-aliasing"
- XAPIAN_LIBS="$XAPIAN_LIBS -lstdc++"
+ XAPIAN_LIBS="$XAPIAN_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
}}}
While this is easily patched manually after a build failure to get a
successful build on FreeBSD, might it be possible to detect the build
environment and modify the construction of the configure file from
config.ac in a manner similar to
[https://github.com/byfron/aitd/blob/0ca689532e46ed6b2d66e5da1cdd38ce174e718e/configure.ac#L71
the aitd project has]?
{{{
AC_MSG_CHECKING(system)
case "$host_os" in
...
mingw32* )
LIBS="$XAPIAN_LIBS -lstdc++"
;;
...
openbsd* )
...
LIBS="$XAPIAN_LIBS"
;;
}}}
Adjusted as appropriate to include a FreeBSD detection.
--
Ticket URL: <https://trac.xapian.org/ticket/834>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list