Bug 216181 - build fails - <Nepomuk::Query::TermPrivate>::clone()' is multiply-defined
Summary: build fails - <Nepomuk::Query::TermPrivate>::clone()' is multiply-defined
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Solaris
: NOR crash
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 00:30 UTC by tropikhajma
Modified: 2009-12-02 10:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2009-11-26 00:30:14 UTC
Version:           r.1054227 (using Devel)
Compiler:          Sun Studio 12 U1 
OS:                Solaris
Installed from:    Compiled sources

building kdelibs fails with
...
[ 22%] Building CXX object nepomuk/query/CMakeFiles/nepomukquery.dir/queryinterface.o 
"/opt/foss/qt4/include/QtCore/qnamespace.h", line 1639: Warning: Identifier expected instead of "}".
1 Warning(s) detected.                                  
Linking CXX shared library ../../lib/libnepomukquery.so           
!ld: fatal: symbol `Nepomuk::Query::TermPrivate*QSharedDataPointer<Nepomuk::Query::TermPrivate>::clone()' is multiply-defined:
        (file CMakeFiles/nepomukquery.dir/term.o type=FUNC; file CMakeFiles/nepomukquery.dir/query.o type=FUNC);
ld: warning: file /home/hajma/Dashboards/installs/2.6.2/kdesupport/lib/libsoprano.so: attempted multiple inclusion of file 
ld: warning: file ../../lib/libkdecore.so.5.4.0: attempted multiple inclusion of file
ld: warning: file /opt/foss/qt4/lib/libQtCore.so: attempted multiple inclusion of file
ld: fatal: file processing errors. No output written to ../../lib/libnepomukquery.so.4.4.0
gmake[2]: *** [lib/libnepomukquery.so.4.4.0] Error 1
gmake[1]: *** [nepomuk/query/CMakeFiles/nepomukquery.dir/all] Error 2
make: *** [all] Error 2

according to the Linker and Libraries Guide (http://docs.sun.com/app/docs/doc/817-1984/chapter2-8?a=view):
"The most common fatal error condition exists when two relocatable objects both define non-weak symbols of the same name."
"foo.c and bar.c have conflicting definitions for the symbol bar. Because the link-editor cannot determine which should dominate, the link-edit usually terminates with an error message."

indeed adding '-z muldefs' to LDFLAGS avoids this error, but I don't think it's a clean solution.

the failure can be seen in the kde-dashboard at http://my.cdash.org/buildSummary.php?buildid=39128


This is on OpenSolaris b124 with Sun Studio 12u1
This was not happening with 4.3.73
Comment 1 Sebastian Trueg 2009-11-26 09:35:36 UTC
Since I have no Sun system to test this, compilation works fine on Linux, and I can see no problem with the code - is there any chance I could get a patch to fix the issue?
Comment 2 tropikhajma 2009-11-26 16:33:44 UTC
I don't really speak C++ :-(
comparing with the phonon/globalconfig.h header file I tried this patch:
-----------
--- phonon/experimental/globalconfig.h.orig     2009-11-26 14:16:29.936936414 +0100
+++ phonon/experimental/globalconfig.h  2009-11-26 16:19:26.706567789 +0100
@@ -36,6 +36,7 @@
 {
 namespace Experimental
 {
+class GlobalConfigPrivate;

 class GlobalConfig : public Phonon::GlobalConfig
 {
-----------
which got rid of the reported error, but failed anyway with

"/home/hajma/packages/BUILD/phonon-4.3.0/i386/PHONON/4.3.0/phonon/experimental/globalconfig.cpp", line 74: Error: The type "const Phonon::Experimental::GlobalConfigPrivate" is incomplete.
"/home/hajma/packages/BUILD/phonon-4.3.0/i386/PHONON/4.3.0/phonon/experimental/globalconfig.cpp", line 75: Error: The type "const Phonon::Experimental::GlobalConfigPrivate" is incomplete.
Comment 3 tropikhajma 2009-11-26 17:40:12 UTC
oops wrong bug :-(
please ignore comment #2
Comment 4 tropikhajma 2009-12-02 10:23:09 UTC
fixed by adriaan in http://websvn.kde.org/?view=revision&revision=1057313