Stefan Hornburg writes:
Hello,
I'm the Debian maintainer of Courier and try to build Debian packages for
courier-authlib 0.57 / courier 0.51 on Debian sarge.
courier-authlib 0.56 / courier 0.50 builds worked fine.
I appreciate any help with the following problem:
/usr/lib/libfam.a(fam.o)(.text+0x39): In function `FAMOpen2':
: undefined reference to `operator new(unsigned)'
Why are you statically linking against libfam.a?
You should be linking against the equivalent shared library, libfam.so.
Contact FAM's maintainer to find out why Debian's FAM isn't built as a
shared library.
FAM is C++ code, and needs to be linked against libstdc++.
Some of the stuff in Courier is C-only code, and C-only code does not
automatically get linked against libstdc++.
If you link against a shared library everything works, because the
dependency on libstdc++ is recorded in the shared library itself. No such
metadata is stored in static libraries, so if you link against a static
library, it's your onus to explicitly list all the dependencies.
If FAM is only available as a static library, for some pecular reason,
you'll need to try one of these:
./configure [ options ] CCLD=g++
or
./configure [ options ] LIBS=-lstdc++
But this should only be used as a last resort. The correct solution is to
get Debian's FAM package fixed.