r8027 - Compile error on OSX, QMetaObject redeclared - FIXED

Started by nibbles, June 28, 2012, 08:15:50 AM

Previous topic - Next topic

nibbles

Building avidemux-2.6 at r8027 with Clang on OSX Lion, I get a compile error where QMetaObject is getting declared as a different type than what exists in Qt-4.8.2:

[ 51%] Building CXX object ADM_coreScriptQt/src/CMakeFiles/ADM_coreScriptQt.dir/QtScriptEngine.cpp.o
cd /tmp/homebrew-avidemux3-2.6-8wrr/buildCor/ADM_coreScriptQt/src && /usr/bin/clang++   -DADM_coreScriptQt_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DQT_SCRIPTTOOLS -Os -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -mmacosx-version-min=10.7 -fPIC -I/tmp/homebrew-avidemux3-2.6-8wrr/buildCor/config -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_core/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreAudioFilter/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreAudioParser/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreAudio/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreAudioDevice/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreAudioEncoder/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreDemuxer/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreDemuxerMpeg/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreImage/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreMuxer/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreScript/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreUI/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreUtils/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreVideoEncoder/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreVideoFilter/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreVideoCodec/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreImageLoader/include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux_core/ADM_coreJobs/include -I/tmp/homebrew-avidemux3-2.6-8wrr/buildCor/ffmpeg/source -I/tmp/homebrew-avidemux3-2.6-8wrr/buildCor/ADM_coreScriptQt/src -I/usr/local/Cellar/qt/4.8.2/include -F/usr/local/Cellar/qt/4.8.2/lib -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/ADM_coreScriptQt/src/../include -I/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/../avidemux/common    -Werror -Wall -o CMakeFiles/ADM_coreScriptQt.dir/QtScriptEngine.cpp.o -c /tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/ADM_coreScriptQt/src/QtScriptEngine.cpp
In file included from /tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/ADM_coreScriptQt/src/QtScriptEngine.cpp:13:
In file included from /tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/ADM_coreScriptQt/src/MyQScriptEngine.h:5:
/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/ADM_coreScriptQt/src/../include/QtScriptEngine.h:20:1: error: class 'QMetaObject' was previously declared as a struct
      [-Werror,-Wmismatched-tags]
class QMetaObject;
^
/usr/local/Cellar/qt/4.8.2/include/QtCore/qobjectdefs.h:304:22: note: previous use is here
struct Q_CORE_EXPORT QMetaObject
                     ^
/tmp/homebrew-avidemux3-2.6-8wrr/avidemux_core/ADM_coreScriptQt/src/../include/QtScriptEngine.h:20:1: note: did you mean struct here?
class QMetaObject;
^~~~~
struct
1 error generated.
make[2]: *** [ADM_coreScriptQt/src/CMakeFiles/ADM_coreScriptQt.dir/QtScriptEngine.cpp.o] Error 1
make[1]: *** [ADM_coreScriptQt/src/CMakeFiles/ADM_coreScriptQt.dir/all] Error 2
make: *** [all] Error 2


Thanks for taking a look at this.

Jan Gruuthuse

Have you libqt4-script installed? Could be related?
libsqlite3-dev has become another dependency lately, just in cased you missed that one?

nibbles

Thanks, they fixed it.  The problem was something declared as a struct at one point and again declared as a class in another location.