Build fails on macOS due to unknown warning options inherited-variadic-ctor and receiver-is-weak

Issue #713 resolved
Martijn Thé created an issue

I'm new to the project and tried to config/build in on macOS. I gleaned the build steps from the travis.yml file.

$ make
cd src/ && ( test -e Makefile || /usr/local/opt/qt5/bin/qmake -o Makefile /Users/mthe/valentina/src/src.pro CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
cd libs/ && ( test -e Makefile || /usr/local/opt/qt5/bin/qmake -o Makefile /Users/mthe/valentina/src/libs/libs.pro CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
cd qmuparser/ && ( test -e Makefile || /usr/local/opt/qt5/bin/qmake -o Makefile /Users/mthe/valentina/src/libs/qmuparser/qmuparser.pro CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
compiling ../../../../src/libs/qmuparser/stable.h
error: unknown warning option '-Winherited-variadic-ctor'; did you mean '-Wundefined-var-template'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wreceiver-is-weak'; did you mean '-Wreceiver-expr'? [-Werror,-Wunknown-warning-option]
make[3]: *** [obj/qmuparser/c++_x86_64.pch] Error 1
make[2]: *** [sub-qmuparser-make_first] Error 2
make[1]: *** [sub-libs-make_first] Error 2
make: *** [sub-src-make_first] Error 2

I tried using these 2 recently updated compilers:

$ clang++ -v
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ g++-6 -v
Using built-in specs.
COLLECT_GCC=g++-6
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/6.3.0_1/libexec/gcc/x86_64-apple-darwin16.3.0/6.3.0/lto-wrapper
Target: x86_64-apple-darwin16.3.0
Configured with: ../configure --build=x86_64-apple-darwin16.3.0 --prefix=/usr/local/Cellar/gcc/6.3.0_1 --libdir=/usr/local/Cellar/gcc/6.3.0_1/lib/gcc/6 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-6 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew GCC 6.3.0_1' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 6.3.0 (Homebrew GCC 6.3.0_1)

If I comment out these flags from common.pri, the build gets past the first compiler invocation (but fails later on due to something else, probably something related to my Qt version).

Comments (4)

  1. Roman Telezhynskyi repo owner

    I gleaned the build steps from the travis.yml file.

    I don't know why your setup don't have these keys, but you can freely ignore such warnings. Your problem for now is CONFIG+=checkWarnings. Just remove it and not critical errors (aka warnings) will not stop building.

    Plus, i just checked branch develop and it doesn't contain key Wundefined-var-template, but still contains Wreceiver-expr. So, probably, you are working with default branch.

  2. Martijn Thé reporter

    Ah, yes, I was on default (I'm also new to Mercurial, only used to git.) After checking out develop, I got it to build and run without any changes. Thanks for the quick response :)

  3. Log in to comment