ld: error: unable to find library -lstdc++

From: Odhiambo Washington <odhiambo_at_gmail.com>
Date: Fri, 03 Mar 2023 09:55:43 UTC
Hi,
FreeBSD-13.1-RELEASE here.

I am installing Xapian within a virtual environment and I am getting stuck

It might help to mention that I am using the script at:
https://github.com/notanumber/xapian-haystack/blob/master/install_xapian.sh

--8<---------------cut here---------------start------------->8---
depbase=`echo xapian_wrap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; /bin/sh
../libtool  --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H  -I. -I..
 -I/usr/local/include/python3.9   -fno-strict-aliasing -Wall -Wno-unused
-Wno-uninitialized -fvisibility=hidden -fvisibility-inlines-hidden
-I/opt/mailman/mm/venv/include -g -O2 -MT xapian_wrap.lo -MD -MP -MF
$depbase.Tpo -c -o xapian_wrap.lo xapian_wrap.cc && mv -f $depbase.Tpo
$depbase.Plo
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I..
-I/usr/local/include/python3.9 -fno-strict-aliasing -Wall -Wno-unused
-Wno-uninitialized -fvisibility=hidden -fvisibility-inlines-hidden
-I/opt/mailman/mm/venv/include -g -O2 -MT xapian_wrap.lo -MD -MP -MF
.deps/xapian_wrap.Tpo -c xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
/bin/sh ../libtool  --tag=CXX    --mode=link c++ -fno-strict-aliasing -Wall
-Wno-unused -Wno-uninitialized -fvisibility=hidden
-fvisibility-inlines-hidden -I/opt/mailman/mm/venv/include  -g -O2
-avoid-version -module -shrext ".cpython-39.so"   -o _xapian.la -rpath
/opt/mailman/mm/venv/lib/python3.9/site-packages/xapian xapian_wrap.lo
-L/opt/mailman/mm/venv/lib -lxapian -lstdc++
libtool: link: c++  -fPIC -DPIC -shared -nostdlib /usr/lib/crti.o
/usr/lib/crtbeginS.o  .libs/xapian_wrap.o   -Wl,-rpath
-Wl,/opt/mailman/mm/venv/lib -Wl,-rpath -Wl,/opt/mailman/mm/venv/lib
-L/opt/mailman/mm/venv/lib /opt/mailman/mm/venv/lib/libxapian.so -lz -lrt
-lstdc++ -L/usr/lib -lc++ -lm -lc -lgcc -lgcc_s /usr/lib/crtendS.o
/usr/lib/crtn.o  -g -O2   -Wl,-soname -Wl,_xapian.cpython-39.so -o .libs/_
xapian.cpython-39.so
ld: error: unable to find library -lstdc++
c++: error: linker command failed with exit code 1 (use -v to see
invocation)
*** Error code 1

Stop.
make[3]: stopped in
/opt/mailman/mm/venv/packages/xapian-bindings-1.4.21/python3
*** Error code 1

Stop.
make[2]: stopped in
/opt/mailman/mm/venv/packages/xapian-bindings-1.4.21/python3
*** Error code 1

Stop.
make[1]: stopped in /opt/mailman/mm/venv/packages/xapian-bindings-1.4.21
*** Error code 1

Stop.
make: stopped in /opt/mailman/mm/venv/packages/xapian-bindings-1.4.21

--8<---------------cuthere----------------end--------------->8---




-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)