Version: (using Devel) Compiler: Sun Studio 12 U1 OS: Solaris Installed from: Compiled sources building akonadi from kdesupport-1010225 on OpenSolaris build 125 with Sun Studio 12 U1 fails with: [ 24%] Building CXX object server/CMakeFiles/akonadiprivate.dir/src/akonadi.cpp.o pkgbuild: cd /export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server && /opt/sunstudio12.1/bin/CC -DMAKE_AKONADIPRIVATE_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_SQL_LIB -DQT_CORE_LIB -DBOOST_DYN_LINK -D_REENTRANT -D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS -DSOLARIS10 -DNDEBUG -DNO_DEBUG -D_UNICODE -DUNICODE -D_RWSTD_REENTRANT -D_XOPEN_SOURCE=500 -D_XPG5 -I/usr/include/stdcxx4/ansi -I/usr/include/stdcxx4 -I/opt/foss/include -I/usr/include/stdcxx4/ansi -I/usr/include/stdcxx4 -library=no%Cstd -library=Crun -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -s -xlang=c99 -xalias_level=compatible -xustr=ascii_utf16_ushort -Qoption ccfe -features=gcc -Qoption ccfe -features=zla -Qoption ccfe ++boolflag:sunwcch=false -mt -xF=%none -xbuiltin=%all -xinline=%auto -xprefetch=auto -xprefetch_auto_type=indirect_array_access -xprefetch_level=3 -xalias_level=compatible -KPIC -xipo=0 -xO3 -xregs=no%frameptr -xjobs=2 -xrestrict=%all -xthreadvar=%all -z combreloc -z redlocsym -z nodefaultlib -z ignore -z now -z rescan -z absexec -xldscope=symbolic -xlibmil -s -xtarget=pentium4 -m32 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8 -lc -lm -ldl -lpthread -lposix4 -lrt -mt -L/opt/foss/lib -R/opt/foss/lib -L/opt/foss/qt4/lib -R/opt/foss/qt4/lib -L/usr/lib -R/usr/lib -Y P,/opt/foss/lib -i -L/opt/foss/lib -R/opt/foss/lib -L/opt/foss/qt4/lib -R/opt/foss/qt4/lib -L/usr/lib -R/usr/lib -Bdynamic -lstdcxx4 -lCrun -lc -lm -xannotate=no -m32 -s -Y P,/opt/foss/lib -i -L/opt/foss/lib -R/opt/foss/lib -L/opt/foss/qt4/lib -R/opt/foss/qt4/lib -L/usr/lib -R/usr/lib -Bdynamic -lstdcxx4 -lCrun -lc -lm -xtarget=pentium4 -m32 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8 -xipo=0 -xO3 -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DMYSQLD_EXECUTABLE="\"/usr/mysql/bin/mysqld\"" -KPIC -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server -I/opt/foss/qt4/include -I/opt/foss/qt4/include/QtGui -I/opt/foss/qt4/include/QtDBus -I/opt/foss/qt4/include/QtSql -I/opt/foss/qt4/include/QtCore -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi -I/opt/foss/qt4/include/QtXmlPatterns -I/opt/foss/qt4/include/QtHelp -I/opt/foss/qt4/include/QtWebKit -I/opt/foss/qt4/include/QtTest -I/opt/foss/qt4/include/QtUiTools -I/opt/foss/qt4/include/QtScript -I/opt/foss/qt4/include/QtSvg -I/opt/foss/qt4/include/QtXml -I/opt/foss/qt4/include/QtOpenGL -I/opt/foss/qt4/include/QtNetwork -I/opt/foss/qt4/include/QtDesigner -I/opt/foss/qt4/include/QtAssistant -I/opt/foss/qt4/include/Qt3Support -I/opt/foss/qt4/include/Qt -I/opt/foss/qt4/share/mkspecs/default -I/opt/foss/include/boost-1_36 -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/libs -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server/src -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server/src/handler -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server/src/search -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server/tests -I/export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server/shared -I/opt/foss/include -o CMakeFiles/akonadiprivate.dir/src/akonadi.cpp.o -c /export/home/hajma/packages/BUILD/akonadi-1.2.0/i386/kdesupport-1010225/akonadi/server/src/akonadi.cpp "/usr/include/stdcxx4/exception.h", line 17: Error: Multiple declaration for std::exception. This is likely because "On Solaris, standard header <math.h> has a declaration for a struct "exception", as required by standard Unix. If you bring the C++ standard exception class into global scope with a using-declaration or using-directive, it creates a conflict." (http://docs.sun.com/source/820-4155/c++_faq.html#Coding11) I assume the akonadi's internal exception.h was meant to be used, so the attached patch does the change and makes akonadi build just fine
Created attachment 37781 [details] patch
The patch makes sense, committed in rev. 1052502. Alex