5 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Compilation error...
FromSent OnAttachments
Stefan HornburgAug 25, 2005 6:16 am 
Sam VarshavchikAug 25, 2005 3:33 pm 
Martin OrrAug 29, 2005 9:43 am 
Sam VarshavchikAug 29, 2005 3:34 pm 
Alessandro VeselyJul 31, 2006 3:56 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Compilation error on Debian sargeActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Aug 25, 2005 3:33:15 pm
List:net.sourceforge.lists.courier-users

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.