Closed Bug 740943 Opened 12 years ago Closed 12 years ago

nsAppFileLocationProvider.cpp:585:28: error: problem emitting static variable '...nsISimpleEnumeratorE4keys': already present as different kind of symbol

Categories

(Core :: XPCOM, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: gps, Unassigned)

References

Details

m-c fails to compile with Clang SVN head (r153766) (at least on OS X) with the following error:

make -C io libs
nsAppFileLocationProvider.cpp
/usr/local/bin/ccache /usr/local/llvm/bin/clang++ -o nsAppFileLocationProvider.o -c  -fvisibility=hidden -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Darwin11.3.0\" -DOSARCH=Darwin -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_MACOSX=1 -DOS_POSIX=1  -D_IMPL_NS_COM -I/Users/gps/src/services-central/ipc/chromium/src -I/Users/gps/src/services-central/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I.. -I/Users/gps/src/services-central/xpcom/io -I. -I../../dist/include -I../../dist/include/nsprpub  -I/Users/gps/src/services-central/obj-ff-dbg/dist/include/nspr -I/Users/gps/src/services-central/obj-ff-dbg/dist/include/nss      -fPIC -Qunused-arguments  -fno-rtti -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -fcolor-diagnostics -isysroot /Developer/SDKs/MacOSX10.7.sdk -fno-exceptions -fno-strict-aliasing -fno-common -std=gnu++0x -ffunction-sections -fdata-sections -pthread -DNO_X11 -pipe  -DDEBUG -D_DEBUG -DTRACING -g -O3 -fno-omit-frame-pointer   -Qunused-arguments  -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/nsAppFileLocationProvider.pp /Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp
In file included from /Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp:1:
/Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp:115:824: warning: delete called on 'nsAppFileLocationProvider' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
nsrefcnt nsAppFileLocationProvider::AddRef(void) { do { if (!(PRInt32(mRefCnt) >= 0)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "illegal refcnt", "PRInt32(mRefCnt) >= 0", "/Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp", 115); } } while (0); nsrefcnt count = NS_AtomicIncrementRefcnt(mRefCnt); NS_LogAddRef_P((this), (count), ("nsAppFileLocationProvider"), (PRUint32) (sizeof(*this))); return (nsrefcnt) count; } nsrefcnt nsAppFileLocationProvider::Release(void) { do { if (!(0 != mRefCnt)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "dup release", "0 != mRefCnt", "/Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp", 115); } } while (0); nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt); NS_LogRelease_P((this), (count), ("nsAppFileLocationProvider")); if (0 == count) { mRefCnt = 1; delete (this); return 0; } return count; } nsresult nsAppFileLocationProvider::QueryInterface(const nsIID& aIID, void** aInstancePtr) { do { if (!(aInstancePtr)) { NS_DebugBreak_P(NS_DEBUG_ASSERTION, "QueryInterface requires a non-NULL destination!", "aInstancePtr", "/Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp", 115); } } while (0); nsresult rv = ((nsresult) 0x80004005L); static const QITableEntry table[] = { { &nsIDirectoryServiceProvider::COMTypeInfo<int>::kIID, PROffset32(reinterpret_cast<char*>( static_cast<nsIDirectoryServiceProvider*>((nsAppFileLocationProvider*) 0x1000)) - reinterpret_cast<char*>((nsAppFileLocationProvider*) 0x1000)) }, { &nsIDirectoryServiceProvider2::COMTypeInfo<int>::kIID, PROffset32(reinterpret_cast<char*>( static_cast<nsIDirectoryServiceProvider2*>((nsAppFileLocationProvider*) 0x1000)) - reinterpret_cast<char*>((nsAppFileLocationProvider*) 0x1000)) }, { &nsISupports::COMTypeInfo<int>::kIID, PROffset32(reinterpret_cast<char*>( static_cast<nsISupports*>( static_cast<nsIDirectoryServiceProvider*>( (nsAppFileLocationProvider*) 0x1000))) - reinterpret_cast<char*>((nsAppFileLocationProvider*) 0x1000)) }, { 0L, 0 } }; rv = NS_TableDrivenQI(static_cast<void*>(this), table, aIID, aInstancePtr); return rv; }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
/Users/gps/src/services-central/xpcom/io/nsAppFileLocationProvider.cpp:585:28: error: problem emitting static variable '_ZZN25nsAppFileLocationProvider8GetFilesEPKcPP19nsISimpleEnumeratorE4keys': already present as different kind of symbol
        static const char* keys[] = { 0L, "SrchPlugns", "UsrSrchPlugns", 0L };
                           ^
1 warning and 1 error generated.
make[4]: *** [nsAppFileLocationProvider.o] Error 1
make[3]: *** [libs] Error 2
make[2]: *** [libs_tier_platform] Error 2
make[1]: *** [tier_platform] Error 2
make: *** [default] Error
This was a clang bug. The patch that broke it got reverted in 153768.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.