courier imap编译错误的解决
redhat上面安装postfix,在make courier imap的时候出现以下错误:
::insert(int const&, void* const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE6insertERKiRKS0_+0xbc): In function `BTree::insert(int const&, void* const&)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE6insertERKiRKb+0x79): In function `BTree::insert(int const&, bool const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE6insertERKiRKb+0xbc): In function `BTree::insert(int const&, bool const&)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE6removeERKi+0xff): In function `BTree::remove(int const&)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE6removeERKi+0xff): In function `BTree::remove(int const&)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE4NodeD1Ev+0x34): In function `BTree::Node::~Node [in-charge]()':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvED1Ev+0x2c): In function `BTree::~BTree [in-charge]()':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvED0Ev+0x3c): more undefined references to `operator delete(void*)' follow
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE6insertEPNS1_4NodeERKiRKS0_+0xf3): In function `BTree::insert(BTree::Node*, int const&, void* const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE6insertEPNS1_4NodeERKiRKS0_+0x1a8): In function `BTree::insert(BTree::Node*, int const&, void* const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE6insertEPNS1_4NodeERKiRKS0_+0x1ea): In function `BTree::insert(BTree::Node*, int const&, void* const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE6insertEPNS0_4NodeERKiRKb+0xf3): In function `BTree::insert(BTree::Node*, int const&, bool const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE6insertEPNS0_4NodeERKiRKb+0x1a8): In function `BTree::insert(BTree::Node*, int const&, bool const&)':
: undefined reference to `operator new(unsigned)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE6insertEPNS0_4NodeERKiRKb+0x1e4): more undefined references to `operator new(unsigned)' follow
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE9underflowEPNS0_4NodeEj+0x15f): In function `BTree::underflow(BTree::Node*, unsigned)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIibE9underflowEPNS0_4NodeEj+0x24e): In function `BTree::underflow(BTree::Node*, unsigned)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.r._ZTI5BTreeIiPvE+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.r._ZTI5BTreeIibE+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE9underflowEPNS1_4NodeEj+0x157): In function `BTree::underflow(BTree::Node*, unsigned)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.gnu.linkonce.t._ZN5BTreeIiPvE9underflowEPNS1_4NodeEj+0x243): In function `BTree::underflow(BTree::Node*, unsigned)':
: undefined reference to `operator delete(void*)'
/usr/lib/libfam.a(Client.o)(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[3]: *** [maildirkw] Error 1
make[3]: Leaving directory `/usr/local/soft/courier-imap-4.1.0/maildir'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/soft/courier-imap-4.1.0/maildir'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/soft/courier-imap-4.1.0'
make: *** [all] Error 2
解决办法:
#cd /usr/lib
#mv libfam.a libfam.a.old
#ln -s libfam.so libfam.a
all done!