Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7957 Discussions

[link error] undefined reference to `vtable ...

huanggn
Beginner
1,239 Views
Hello,

I got some linking problem with icc. A lot of "undefined reference to vtable for ..." are complained. But if I make it with CXX=g++, it links correctly. Any idea? Thank you very much!

Cameron

==== some output info =====
icpc -I/usr/X11R6/include -frtti -fno-handle-exceptions -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-long-long -pedantic -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O3 -fomit-frame-pointer -fp-model fast=2 -ipo1 -msse4.2 -fPIC -shared -Wl,-z,defs -Wl,-h,libpref.so -o libpref.so nsPref.o nsPrefBranch.o nsPrefService.o nsPrefsFactory.o prefapi.o prefread.o -lpthread -Wl,-rpath-link,../../../dist/bin -L../../../dist/bin -L../../../dist/lib -L../../../dist/bin -lxpcom -lxpcom_core -L../../../dist/bin -L../../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,--version-script -Wl,/home/huanggn/middleware/ff3/mozilla/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm
icpc: command line warning #10006: ignoring unknown option '-fno-handle-exceptions'
icpc: command line warning #10006: ignoring unknown option '-Wsynth'
icpc: command line warning #10006: ignoring unknown option '-Wno-ctor-dtor-privacy'
icpc: command line warning #10006: ignoring unknown option '-Wcast-align'
icpc: command line warning #10006: ignoring unknown option '-Wno-long-long'
icpc: command line remark #10148: option '-pedantic' not supported
icpc: command line warning #10159: invalid argument for option '-m'
ipo: remark #11000: performing multi-file optimizations
ipo: remark #11005: generating object file /tmp/ipo_icpcJW95ha.o
/tmp/ipo_icpcJW95ha.o: In function `nsPref::SetUnicharPref(char const*, unsigned short const*)':
ipo_out.c:(.text+0x333): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsPref::~nsPref()':
ipo_out.c:(.text+0xa84): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0xa8f): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsPref::~nsPref()':
ipo_out.c:(.text+0xb7d): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0xb88): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsPref::~nsPref()':
ipo_out.c:(.text+0x2ebd): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0x2ec8): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::GetComplexValue(char const*, nsID const&, void**)':
ipo_out.c:(.text+0x4148): undefined reference to `vtable for nsCreateInstanceByContractID'
ipo_out.c:(.text+0x4540): undefined reference to `vtable for nsCreateInstanceByContractID'
ipo_out.c:(.text+0x4727): undefined reference to `vtable for nsCreateInstanceByContractID'
ipo_out.c:(.text+0x4d39): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::GetChildList(char const*, unsigned int*, char***)':
ipo_out.c:(.text+0x6645): undefined reference to `nsAutoVoidArray::nsAutoVoidArray()'
ipo_out.c:(.text+0x66e5): undefined reference to `nsVoidArray::~nsVoidArray()'
ipo_out.c:(.text+0x67e4): undefined reference to `nsVoidArray::~nsVoidArray()'
ipo_out.c:(.text+0x680a): undefined reference to `nsVoidArray::~nsVoidArray()'
ipo_out.c:(.text+0x684b): undefined reference to `nsVoidArray::~nsVoidArray()'
ipo_out.c:(.text+0x6869): undefined reference to `nsVoidArray::~nsVoidArray()'
/tmp/ipo_icpcJW95ha.o:ipo_out.c:(.text+0x6883): more undefined references to `nsVoidArray::~nsVoidArray()' follow
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::AddObserver(char const*, nsIObserver*, int)':
ipo_out.c:(.text+0x69f4): undefined reference to `nsVoidArray::InsertElementAt(void*, int)'
ipo_out.c:(.text+0x6a50): undefined reference to `nsCStringArray::InsertCStringAt(nsACString_internal const&, int)'
ipo_out.c:(.text+0x6b94): undefined reference to `nsAutoVoidArray::nsAutoVoidArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::RemoveObserver(char const*, nsIObserver*)':
ipo_out.c:(.text+0x6d1b): undefined reference to `nsCStringArray::CStringAt(int, nsACString_internal&) const'
ipo_out.c:(.text+0x6e09): undefined reference to `nsVoidArray::RemoveElementsAt(int, int)'
ipo_out.c:(.text+0x6e1f): undefined reference to `nsCStringArray::RemoveCStringAt(int)'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::freeObserverList()':
ipo_out.c:(.text+0x731a): undefined reference to `nsCStringArray::CStringAt(int, nsACString_internal&) const'
ipo_out.c:(.text+0x73b7): undefined reference to `nsVoidArray::ReplaceElementAt(void*, int)'
ipo_out.c:(.text+0x7458): undefined reference to `nsVoidArray::~nsVoidArray()'
ipo_out.c:(.text+0x7696): undefined reference to `nsCStringArray::Clear()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::~nsPrefBranch()':
ipo_out.c:(.text+0x7721): undefined reference to `nsCStringArray::~nsCStringArray()'
ipo_out.c:(.text+0x773a): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0x7745): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
ipo_out.c:(.text+0x7768): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::~nsPrefBranch()':
ipo_out.c:(.text+0x7812): undefined reference to `nsCStringArray::~nsCStringArray()'
ipo_out.c:(.text+0x7823): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0x782e): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
ipo_out.c:(.text+0x7857): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::~nsPrefBranch()':
ipo_out.c:(.text+0x86a2): undefined reference to `nsCStringArray::~nsCStringArray()'
ipo_out.c:(.text+0x86b3): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0x86be): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
ipo_out.c:(.text+0x86e1): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::nsPrefBranch(char const*, int)':
ipo_out.c:(.text+0x87a3): undefined reference to `nsCStringArray::nsCStringArray()'
ipo_out.c:(.text+0x886d): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefBranch::nsPrefBranch(char const*, int)':
ipo_out.c:(.text+0x8911): undefined reference to `nsCStringArray::nsCStringArray()'
ipo_out.c:(.text+0x89ef): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `NotifyObserver(char const*, void*)':
ipo_out.c:(.text+0x8d70): undefined reference to `vtable for nsQueryReferent'
/tmp/ipo_icpcJW95ha.o: In function `pref_enumChild(PLDHashTable*, PLDHashEntryHdr*, unsigned int, void*)':
ipo_out.c:(.text+0x91e9): undefined reference to `nsVoidArray::InsertElementAt(void*, int)'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::WritePrefFile(nsIFile*)':
ipo_out.c:(.text+0x9c7a): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::GetBranch(char const*, nsIPrefBranch**)':
ipo_out.c:(.text+0xa344): undefined reference to `nsCStringArray::nsCStringArray()'
ipo_out.c:(.text+0xa48c): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::~nsPrefService()':
ipo_out.c:(.text+0xa596): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0xa5a1): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::~nsPrefService()':
ipo_out.c:(.text+0xa6de): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0xa6e9): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::Observe(nsISupports*, char const*, unsigned short const*)':
ipo_out.c:(.text+0xaa36): undefined reference to `nsCRT::strcmp(unsigned short const*, unsigned short const*)'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::~nsPrefService()':
ipo_out.c:(.text+0xac9e): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.text+0xaca9): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `pref_CompareFileNames(nsIFile*, nsIFile*, void*)':
ipo_out.c:(.text+0xb595): undefined reference to `vtable for nsDefaultCStringComparator'
/tmp/ipo_icpcJW95ha.o: In function `pref_LoadPrefsInDir(nsIFile*, char const* const*, unsigned int)':
ipo_out.c:(.text+0xc134): undefined reference to `nsVoidArray::nsVoidArray(int)'
ipo_out.c:(.text+0xc154): undefined reference to `nsVoidArray::nsVoidArray(int)'
ipo_out.c:(.text+0xc180): undefined reference to `vtable for nsCaseInsensitiveCStringComparator'
ipo_out.c:(.text+0xc349): undefined reference to `nsCOMArray_base::ReplaceObjectAt(nsISupports*, int)'
ipo_out.c:(.text+0xc3e7): undefined reference to `nsCOMArray_base::~nsCOMArray_base()'
ipo_out.c:(.text+0xc3f7): undefined reference to `nsCOMArray_base::~nsCOMArray_base()'
ipo_out.c:(.text+0xc483): undefined reference to `nsVoidArray::Sort(int (*)(void const*, void const*, void*), void*)'
ipo_out.c:(.text+0xc515): undefined reference to `nsCOMArray_base::~nsCOMArray_base()'
ipo_out.c:(.text+0xc525): undefined reference to `nsCOMArray_base::~nsCOMArray_base()'
ipo_out.c:(.text+0xc5e7): undefined reference to `nsCOMArray_base::InsertObjectAt(nsISupports*, int)'
/tmp/ipo_icpcJW95ha.o: In function `openPrefFile(nsIFile*)':
ipo_out.c:(.text+0xc687): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::Init()':
ipo_out.c:(.text+0xdbee): undefined reference to `nsCStringArray::nsCStringArray()'
ipo_out.c:(.text+0xde64): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsPrefService::GetDefaultBranch(char const*, nsIPrefBranch**)':
ipo_out.c:(.text+0xe10a): undefined reference to `nsCStringArray::nsCStringArray()'
ipo_out.c:(.text+0xe219): undefined reference to `nsCStringArray::~nsCStringArray()'
/tmp/ipo_icpcJW95ha.o: In function `_ZN21nsPrefLocalizedString4InitEv.':
ipo_out.c:(.text+0xe279): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsPref::SetDefaultUnicharPref(char const*, unsigned short const*)':
ipo_out.c:(.text+0xe747): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsSupportsWeakReference::~nsSupportsWeakReference()':
ipo_out.c:(.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD2Ev[.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD2Ev]+0x13): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD2Ev[.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD2Ev]+0x1b): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsCreateInstanceByContractID::nsCreateInstanceByContractID(char const*, nsISupports*, unsigned int*)':
ipo_out.c:(.gnu.linkonce.t._ZN28nsCreateInstanceByContractIDC1EPKcP11nsISupportsPj[.gnu.linkonce.t._ZN28nsCreateInstanceByContractIDC1EPKcP11nsISupportsPj]+0x27): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsQueryReferent::nsQueryReferent(nsIWeakReference*, unsigned int*)':
ipo_out.c:(.gnu.linkonce.t._ZN15nsQueryReferentC1EP16nsIWeakReferencePj[.gnu.linkonce.t._ZN15nsQueryReferentC1EP16nsIWeakReferencePj]+0x20): undefined reference to `vtable for nsQueryReferent'
/tmp/ipo_icpcJW95ha.o: In function `nsSupportsWeakReference::~nsSupportsWeakReference()':
ipo_out.c:(.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD1Ev[.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD1Ev]+0x13): undefined reference to `vtable for nsSupportsWeakReference'
ipo_out.c:(.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD1Ev[.gnu.linkonce.t._ZN23nsSupportsWeakReferenceD1Ev]+0x1b): undefined reference to `nsSupportsWeakReference::ClearWeakReferences()'
/tmp/ipo_icpcJW95ha.o: In function `nsSupportsWeakReference::nsSupportsWeakReference()':
ipo_out.c:(.gnu.linkonce.t._ZN23nsSupportsWeakReferenceC2Ev[.gnu.linkonce.t._ZN23nsSupportsWeakReferenceC2Ev]+0x19): undefined reference to `vtable for nsSupportsWeakReference'
/tmp/ipo_icpcJW95ha.o: In function `nsSupportsWeakReference::nsSupportsWeakReference()':
ipo_out.c:(.gnu.linkonce.t._ZN23nsSupportsWeakReferenceC1Ev[.gnu.linkonce.t._ZN23nsSupportsWeakReferenceC1Ev]+0x19): undefined reference to `vtable for nsSupportsWeakReference'
/tmp/ipo_icpcJW95ha.o: In function `do_CreateInstance(char const*, unsigned int*)':
ipo_out.c:(.gnu.linkonce.t._Z17do_CreateInstancePKcPj[.gnu.linkonce.t._Z17do_CreateInstancePKcPj]+0x27): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsAutoVoidArray::~nsAutoVoidArray()':
ipo_out.c:(.gnu.linkonce.t._ZN15nsAutoVoidArrayD1Ev[.gnu.linkonce.t._ZN15nsAutoVoidArrayD1Ev]+0x23): undefined reference to `nsVoidArray::~nsVoidArray()'
/tmp/ipo_icpcJW95ha.o: In function `nsVoidArray::RemoveElementAt(int)':
ipo_out.c:(.gnu.linkonce.t._ZN11nsVoidArray15RemoveElementAtEi[.gnu.linkonce.t._ZN11nsVoidArray15RemoveElementAtEi]+0x18): undefined reference to `nsVoidArray::RemoveElementsAt(int, int)'
/tmp/ipo_icpcJW95ha.o: In function `nsVoidArray::AppendElement(void*)':
ipo_out.c:(.gnu.linkonce.t._ZN11nsVoidArray13AppendElementEPv[.gnu.linkonce.t._ZN11nsVoidArray13AppendElementEPv]+0x25): undefined reference to `nsVoidArray::InsertElementAt(void*, int)'
/tmp/ipo_icpcJW95ha.o: In function `nsCStringArray::AppendCString(nsACString_internal const&)':
ipo_out.c:(.gnu.linkonce.t._ZN14nsCStringArray13AppendCStringERK19nsACString_internal[.gnu.linkonce.t._ZN14nsCStringArray13AppendCStringERK19nsACString_internal]+0x25): undefined reference to `nsCStringArray::InsertCStringAt(nsACString_internal const&, int)'
/tmp/ipo_icpcJW95ha.o: In function `NS_NewRelativeFilePref(nsILocalFile*, nsACString_internal const&, nsIRelativeFilePref**)':
ipo_out.c:(.gnu.linkonce.t._Z22NS_NewRelativeFilePrefP12nsILocalFileRK19nsACString_internalPP19nsIRelativeFilePref[.gnu.linkonce.t._Z22NS_NewRelativeFilePrefP12nsILocalFileRK19nsACString_internalPP19nsIRelativeFilePref]+0x37): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `do_QueryReferent(nsIWeakReference*, unsigned int*)':
ipo_out.c:(.gnu.linkonce.t._Z16do_QueryReferentP16nsIWeakReferencePj[.gnu.linkonce.t._Z16do_QueryReferentP16nsIWeakReferencePj]+0x20): undefined reference to `vtable for nsQueryReferent'
/tmp/ipo_icpcJW95ha.o: In function `nsCaseInsensitiveCStringComparator::nsCaseInsensitiveCStringComparator()':
ipo_out.c:(.gnu.linkonce.t._ZN34nsCaseInsensitiveCStringComparatorC1Ev[.gnu.linkonce.t._ZN34nsCaseInsensitiveCStringComparatorC1Ev]+0x12): undefined reference to `vtable for nsCaseInsensitiveCStringComparator'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray_base::AppendObject(nsISupports*)':
ipo_out.c:(.gnu.linkonce.t._ZN15nsCOMArray_base12AppendObjectEP11nsISupports[.gnu.linkonce.t._ZN15nsCOMArray_base12AppendObjectEP11nsISupports]+0x25): undefined reference to `nsCOMArray_base::InsertObjectAt(nsISupports*, int)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray_base::Sort(int (*)(void const*, void const*, void*), void*)':
ipo_out.c:(.gnu.linkonce.t._ZN15nsCOMArray_base4SortEPFiPKvS1_PvES2_[.gnu.linkonce.t._ZN15nsCOMArray_base4SortEPFiPKvS1_PvES2_]+0x1a): undefined reference to `nsVoidArray::Sort(int (*)(void const*, void const*, void*), void*)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray_base::nsCOMArray_base(int)':
ipo_out.c:(.gnu.linkonce.t._ZN15nsCOMArray_baseC2Ei[.gnu.linkonce.t._ZN15nsCOMArray_baseC2Ei]+0x27): undefined reference to `nsVoidArray::nsVoidArray(int)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray_base::nsCOMArray_base(int)':
ipo_out.c:(.gnu.linkonce.t._ZN15nsCOMArray_baseC1Ei[.gnu.linkonce.t._ZN15nsCOMArray_baseC1Ei]+0x27): undefined reference to `nsVoidArray::nsVoidArray(int)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray::AppendObject(nsIFile*)':
ipo_out.c:(.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileE12AppendObjectEPS0_[.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileE12AppendObjectEPS0_]+0x25): undefined reference to `nsCOMArray_base::InsertObjectAt(nsISupports*, int)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray::Sort(int (*)(nsIFile*, nsIFile*, void*), void*)':
ipo_out.c:(.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileE4SortEPFiPS0_S2_PvES3_[.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileE4SortEPFiPS0_S2_PvES3_]+0x1a): undefined reference to `nsVoidArray::Sort(int (*)(void const*, void const*, void*), void*)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray::ReplaceObjectAt(nsIFile*, int)':
ipo_out.c:(.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileE15ReplaceObjectAtEPS0_i[.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileE15ReplaceObjectAtEPS0_i]+0x1a): undefined reference to `nsCOMArray_base::ReplaceObjectAt(nsISupports*, int)'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray::nsCOMArray(int)':
ipo_out.c:(.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileEC1Ei[.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileEC1Ei]+0x27): undefined reference to `nsVoidArray::nsVoidArray(int)'
/tmp/ipo_icpcJW95ha.o: In function `NS_NewBufferedOutputStream(nsIOutputStream**, nsIOutputStream*, unsigned int)':
ipo_out.c:(.gnu.linkonce.t._Z26NS_NewBufferedOutputStreamPP15nsIOutputStreamS0_j[.gnu.linkonce.t._Z26NS_NewBufferedOutputStreamPP15nsIOutputStreamS0_j]+0x37): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `NS_NewSafeLocalFileOutputStream(nsIOutputStream**, nsIFile*, int, int, int)':
ipo_out.c:(.gnu.linkonce.t._Z31NS_NewSafeLocalFileOutputStreamPP15nsIOutputStreamP7nsIFileiii[.gnu.linkonce.t._Z31NS_NewSafeLocalFileOutputStreamPP15nsIOutputStreamP7nsIFileiii]+0x37): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `NS_NewLocalFileInputStream(nsIInputStream**, nsIFile*, int, int, int)':
ipo_out.c:(.gnu.linkonce.t._Z26NS_NewLocalFileInputStreamPP14nsIInputStreamP7nsIFileiii[.gnu.linkonce.t._Z26NS_NewLocalFileInputStreamPP14nsIInputStreamP7nsIFileiii]+0x37): undefined reference to `vtable for nsCreateInstanceByContractID'
/tmp/ipo_icpcJW95ha.o: In function `nsCOMArray::~nsCOMArray()':
ipo_out.c:(.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileED1Ev[.gnu.linkonce.t._ZN10nsCOMArrayI7nsIFileED1Ev]+0x23): undefined reference to `nsCOMArray_base::~nsCOMArray_base()'
/tmp/ipo_icpcJW95ha.o: In function `nsDefaultCStringComparator::nsDefaultCStringComparator()':
ipo_out.c:(.gnu.linkonce.t._ZN26nsDefaultCStringComparatorC1Ev[.gnu.linkonce.t._ZN26nsDefaultCStringComparatorC1Ev]+0x12): undefined reference to `vtable for nsDefaultCStringComparator'
/tmp/ipo_icpcJW95ha.o:(.gnu.linkonce.d._ZTI6nsPref[.gnu.linkonce.d._ZTI6nsPref]+0x38): undefined reference to `typeinfo for nsSupportsWeakReference'
/tmp/ipo_icpcJW95ha.o:(.gnu.linkonce.d._ZTI12nsPrefBranch[.gnu.linkonce.d._ZTI12nsPrefBranch]+0x28): undefined reference to `typeinfo for nsSupportsWeakReference'
/tmp/ipo_icpcJW95ha.o:(.gnu.linkonce.d._ZTI13nsPrefService[.gnu.linkonce.d._ZTI13nsPrefService]+0x28): undefined reference to `typeinfo for nsSupportsWeakReference'
ld: libpref.so: hidden symbol `_ZTV34nsCaseInsensitiveCStringComparator' isn't defined
ld: final link failed: Nonrepresentable section on output
gmake[1]: *** [libpref.so] Error 1
gmake[1]: Leaving directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'
make: *** [default] Error 2

[huanggn@dev2 src]$ make CXX=g++ CXXFLAGS=""
/usr/bin/gmake export
gmake[1]: Entering directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'
gmake[1]: Leaving directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'
/usr/bin/gmake libs
gmake[1]: Entering directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'
rm -f libpref.so
g++ -fPIC -shared -Wl,-z,defs -Wl,-h,libpref.so -o libpref.so nsPref.o nsPrefBranch.o nsPrefService.o nsPrefsFactory.o prefapi.o prefread.o -lpthread -Wl,-rpath-link,../../../dist/bin -L../../../dist/bin -L../../../dist/lib -L../../../dist/bin -lxpcom -lxpcom_core -L../../../dist/bin -L../../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,--version-script -Wl,/home/huanggn/middleware/ff3/mozilla/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm
chmod +x libpref.so
/home/huanggn/middleware/ff3/mozobj/config/nsinstall -R -m 755 libpref.so ../../../dist/bin/components
../../../config/elf-dynstr-gc ../../../dist/bin/components/libpref.so
Couldn't GC any strings, exiting.
if test ! -d ../../../dist/bin/greprefs; then /home/huanggn/middleware/ff3/mozobj/config/nsinstall -D ../../../dist/bin/greprefs; fi
set -e; \\
for i in /home/huanggn/middleware/ff3/mozilla/modules/libpref/src/init/all.js; do \\
dest=../../../dist/bin/greprefs/`basename $i`; \\
rm -f -f $dest; \\
/home/huanggn/root/usr/bin/python /home/huanggn/middleware/ff3/mozilla/config/Preprocessor.py -DMOZILLA_INTERNAL_API -DOSTYPE=\\"Linux2.6.18-164\\" -DOSARCH=Linux -DOS_ARCH=Linux -DMOZ_WIDGET_TOOLKIT=gtk2 -DMOZILLA_VERSION=\\"1.9.0.5\\" -DMOZILLA_VERSION_U=1.9.0.5 -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_UINT=1 -DHAVE_UNAME_DOMAINNAME_FIELD=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_DIRENT_H=1 -DHAVE_GETOPT_H=1 -DHAVE_SYS_BITYPES_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GNU_LIBC_VERSION_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_MMINTRIN_H=1 -DHAVE_SYS_CDEFS_H=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_DLADDR=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -DHAVE_FT_BITMAP_SIZE_Y_PPEM=1 -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 -DHAVE_FT_LOAD_SFNT_TABLE=1 -DHAVE_FT_SELECT_SIZE=1 -D_REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_STAT64=1 -DHAVE_LSTAT64=1 -DHAVE_TRUNCATE64=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_RES_NINIT=1 -DHAVE_GNU_GET_LIBC_VERSION=1 -DHAVE_LANGINFO_CODESET=1 -DVA_COPY=va_copy -DHAVE_VA_COPY=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_EMBEDDING_LEVEL_DEFAULT=1 -DMOZ_EMBEDDING_LEVEL_BASIC=1 -DMOZ_EMBEDDING_LEVEL_MINIMAL=1 -DMOZ_PHOENIX=1 -DMOZ_BUILD_APP=browser -DMOZ_XUL_APP=1 -DMOZ_DEFAULT_TOOLKIT=\\"cairo-gtk2\\" -DMOZ_WIDGET_GTK2=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_X11=1 -DMOZ_DISTRIBUTION_ID=\\"org.mozilla\\" -DMOZ_ENABLE_DBUS=1 -DOJI=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DMOZ_NO_XPCOM_OBSOLETE=1 -DMOZ_XTF=1 -DMOZ_CRASHREPORTER_ENABLE_PERCENT=100 -DMOZ_MATHML=1 -DMOZ_SVG=1 -DMOZ_SVG_FOREIGNOBJECT=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_PLACES=1 -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSIFIER=1 -DMOZ_LOGGING=1 -DSIZEOF_INT_P=4 -DMOZ_MEMORY_SIZEOF_PTR_2POW=2 -DMOZ_MEMORY=1 -DMOZ_MEMORY_LINUX=1 -DMOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1 -DHAVE___CXA_DEMANGLE=1 -DHAVE__UNWIND_BACKTRACE=1 -DMOZ_USER_DIR=\\".mozilla\\" -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -DMOZ_TREE_CAIRO=1 -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF=1 -DMOZ_MORKREADER=1 -DMOZ_DLL_SUFFIX=\\".so\\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DMOZ_ACCESSIBILITY_ATK=1 -DATK_MAJOR_VERSION=1 -DATK_MINOR_VERSION=24 -DATK_REV_VERSION=0 -DMOZILLA_LOCALE_VERSION=\\"1.9a1\\" -DMOZILLA_REGION_VERSION=\\"1.9a1\\" -DMOZILLA_SKIN_VERSION=\\"1.8\\" -DNDEBUG -DTRIMMED $i > $dest; \\
done
gmake[1]: Leaving directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'
/usr/bin/gmake tools
gmake[1]: Entering directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'
gmake[1]: Leaving directory `/home/huanggn/middleware/ff3/mozobj/modules/libpref/src'

[huanggn@dev2 src]$ g++ -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.6/specs
Configured with: ./configure
Thread model: posix
gcc version 3.4.6

=========================================================
Reply: (why can't I reply myself in the forum??)

This issue is workaround by adding "-gcc-version=400". But can anyone tell me what's the potential side effect of this workaround? Thanks :-)

Cameron
0 Kudos
1 Reply
Milind_Kulkarni__Int
New Contributor II
1,239 Views

Searched the net, and came to know lot number of cases (missing destructors , missing virtual member definition )which throws this diagnostic message.

Often comes when, a non-inline virtual member function is not given its implementation in derived class. Or when, a constructor is calling a virtual function, and hence cannot go through the vtable.

Though do not know of the side-effects of the workaround, it would help for your sake, if you could examine the possibilities of above mismatches in the code,or get the patch. It might cause side-effect for a few cases.

regards

0 Kudos
Reply