GNOME Bugzilla – Bug 721479
Compilation on Solaris fails with "Could not find a match for TemplateVariant::Delegate::fromMethod"
Last modified: 2014-01-05 20:09:39 UTC
There are numerous warnings and finally an error thrown when compiling oxygen 1.8.6 on Solaris 10 Sparc with Sun Studio 12 CC: CC -c -DQT_LITE_UNICODE -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I. -o ../objects/qthread_unix.o qthread_unix.cpp "qthread_unix.cpp", line 142: Warning (Anachronism): Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*, const _pthread_attr*, extern "C" void*(*)(void*), void*) is being passed void*(*)(void*). 1 Warning(s) detected. CC -c -DQT_LITE_UNICODE -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I. -o ../objects/qmutex_unix.o qmutex_unix.cpp CC -c -DQT_LITE_UNICODE -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I. -o ../objects/qwaitcondition_unix.o qwaitcondition_unix.cpp rm -f ../lib/libqtools.a CC -xar -o ../lib/libqtools.a ../objects/qbuffer.o ../objects/qcollection.o ../objects/scstring.o ../objects/qdatastream.o ../objects/qdatetime.o ../objects/qdir.o ../objects/qfile.o ../objects/qfileinfo.o ../objects/qgarray.o ../objects/qgcache.o ../objects/qgdict.o ../objects/qglist.o ../objects/qglobal.o ../objects/qgstring.o ../objects/qgvector.o ../objects/qiodevice.o ../objects/qregexp.o ../objects/qstring.o ../objects/qtextstream.o ../objects/qtextcodec.o ../objects/qstringlist.o ../objects/qxml.o ../objects/qmap.o ../objects/qthread.o ../objects/qmutex.o ../objects/qutfcodec.o ../objects/qfile_unix.o ../objects/qdir_unix.o ../objects/qfileinfo_unix.o ../objects/qthread_unix.o ../objects/qmutex_unix.o ../objects/qwaitcondition_unix.o gmake[2]: Leaving directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/qtools' gmake[1]: Leaving directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/qtools' /opt/csw/bin/gmake -C libmd5 gmake[1]: Entering directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/libmd5' env TMAKEPATH="/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/tmake/lib/solaris-cc" "/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/tmake/bin/tmake" libmd5.pro >Makefile.libmd5 /opt/csw/bin/gmake -f Makefile.libmd5 gmake[2]: Entering directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/libmd5' cc -c -xO3 -m32 -xarch=sparc -o ../objects/md5.o md5.c rm -f ../lib/libmd5.a CC -xar -o ../lib/libmd5.a ../objects/md5.o gmake[2]: Leaving directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/libmd5' gmake[1]: Leaving directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/libmd5' /opt/csw/bin/gmake -C src gmake[1]: Entering directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/src' env TMAKEPATH="/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/tmake/lib/solaris-cc" "/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/tmake/bin/tmake" l ibdoxycfg.pro >Makefile.libdoxycfg env TMAKEPATH="/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/tmake/lib/solaris-cc" "/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/tmake/bin/tmake" doxygen.pro >Makefile.doxygen/opt/csw/bin/gmake -f Makefile.libdoxycfg all gmake[2]: Entering directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/src' /opt/csw/bin/flex -PconfigYY -t config.l >config.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -o ../objects/config.o config.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "config.l", line 38: Warning: Last line in file "lang_cfg.h" is not terminated with a newline. 3 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -o ../objects/configoptions.o configoptions.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -o ../objects/portable.o portable.cpp cc -c -xO3 -m32 -xarch=sparc -I../qtools -o ../objects/portable_c.o portable_c.c "portable_c.c", line 17: warning: argument #2 is incompatible with prototype: prototype: pointer to pointer to const char : "/usr/include/iconv.h", line 27 argument : pointer to pointer to char rm -f ../lib/libdoxycfg.a CC -xar -o ../lib/libdoxycfg.a ../objects/config.o ../objects/configoptions.o ../objects/portable.o ../objects/portable_c.o gmake[2]: Leaving directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/src' /opt/csw/bin/gmake -f Makefile.libdoxygen all gmake[2]: Entering directory '/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.6/src' CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/arguments.o arguments.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/constexp.o constexp.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/ce_parse.o ce_parse.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/cite.o cite.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "classdef.h", line 69: Warning: Identifier expected instead of "}". 3 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/clangparser.o clangparser.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/classdef.o classdef.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "classdef.h", line 69: Warning: Identifier expected instead of "}". "classdef.cpp", line 3954: Warning: visited hides ClassDef::visited. "classdef.cpp", line 4042: Warning: visited hides ClassDef::visited. "classdef.cpp", line 4065: Warning: visited hides ClassDef::visited. "classdef.cpp", line 4183: Warning: visited hides ClassDef::visited. 7 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/classlist.o classlist.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "classdef.h", line 69: Warning: Identifier expected instead of "}". 3 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/cmdmapper.o cmdmapper.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/code.o code.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "classdef.h", line 69: Warning: Identifier expected instead of "}". "<stdout>", line 15997: Warning: Too few arguments in macro codeYYwrap. "<stdout>", line 16299: Warning: Too few arguments in macro codeYYwrap. 5 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/commentcnv.o commentcnv.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "<stdout>", line 2655: Warning: Too few arguments in macro commentcnvYYwrap. 3 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/commentscan.o commentscan.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "classdef.h", line 69: Warning: Identifier expected instead of "}". "<stdout>", line 6604: Warning: Too few arguments in macro commentscanYYwrap. 4 Warning(s) detected. CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/condparser.o condparser.cpp CC -c -xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=__func__ -I../qtools -I../libmd5 -o ../objects/context.o context.cpp "types.h", line 193: Warning: Identifier expected instead of "}". "types.h", line 211: Warning: Identifier expected instead of "}". "classdef.h", line 69: Warning: Identifier expected instead of "}". "htmlgen.h", line 103: Warning: file hides OutputGenerator::file. "htmlgen.h", line 105: Warning: file hides OutputGenerator::file. "context.cpp", line 465: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::generatedAt() const. "context.cpp", line 469: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::inheritanceDiagramFor() const. "context.cpp", line 473: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::collaborationDiagramFor() const. "context.cpp", line 586: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::inheritsList() const. "context.cpp", line 590: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::inheritedByList() const. "context.cpp", line 602: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::exampleList() const. "context.cpp", line 642: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::implementedBy() const. "context.cpp", line 646: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::reimplementedBy() const. "context.cpp", line 650: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::sourceRefs() const. "context.cpp", line 654: Error: Could not find a match for TemplateVariant::Delegate::fromMethod<TemplateVariant::Delegate::T, TemplateVariant::Delegate::TMethod>(const TranslateContext::Private*) needed in TranslateContext::Private::sourceRefBys() const. 10 Error(s) and 5 Warning(s) detected. Makefile.libdoxygen:670: recipe for target '../objects/context.o' failed
With the latest Oracle Studio 12.3 the compilation does not fail, but the linking stage fails: CC -m32 -xarch=sparc -L/opt/csw/lib -norunpath -o ../bin/doxygen ../objects/main.o -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread Undefined first referenced symbol in file void initDoxygen() ../objects/main.o void parseInput() ../objects/main.o void readConfiguration(int,char**) ../objects/main.o void adjustConfiguration() ../objects/main.o void generateOutput() ../objects/main.o void checkConfiguration() ../objects/main.o ld: fatal: symbol referencing errors. No output written to ../bin/doxygen
(In reply to comment #1) > With the latest Oracle Studio 12.3 the compilation does not fail, but the > linking stage fails: > The missing symbols are all from doxygen.cpp, so maybe doxygen.o is invalid (check the symbols with nm) and you need to remove objects/doxygen.o and do a make. Let me know if that helps.
I can't reproduce the issue, maybe I fiddled with the built files during making the packaging recipe. Everything works now as expected when I do a clean build. Sorry for the noise. Nonetheless an up-to-date compiler is needed, maybe the needed features could/should be detected during configure-time?
I use a custom configure script and wouldn't know what 'features' to test for until I find a compiler that doesn't work. I do already test with various compilers (clang, gcc, visual studio) on various platforms (mac, windows, linux) myself, so I think this should be enough for all but the most exotic users.
Fair enough, feel free to close this (non-) bug. Best regards -- Dago