Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Qt requires C++11 support" make error #1309

Closed
supersuraccoon opened this issue Jun 18, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@supersuraccoon
Copy link

commented Jun 18, 2016

tiled source code: tiled-0.16.1
Mac OS: 10.11.1
Xcode : 7.1
QMake: 3.0
Qt: 5.7.0
Apple LLVM: 7.0.0

I tried Compile the latest tiled from source code following the instructions in README.md.

But the make failed with the following error:

In file included from pythonplugin.cpp:21:
In file included from ./pythonplugin.h:30:
In file included from ../../libtiled/logginginterface.h:33:
In file included from ../../libtiled/tiled_global.h:32:
In file included from /Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qglobal.h:1145:
In file included from /Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:46:
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:61:4: error: "Qt requires C++11 support"
#  error "Qt requires C++11 support"
   ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:90:13: error: unknown type name 'QAtomicOps'
    typedef QAtomicOps<T> Ops;
            ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:90:23: error: expected member name or ';' after declaration
      specifiers
    typedef QAtomicOps<T> Ops;
    ~~~~~~~~~~~~~~~~~~^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:93:23: error: use of undeclared identifier 'QAtomicOpsSupport'
    Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, "template parameter is an integral of a size not supported on this platform");
                      ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qglobal.h:746:66: note: expanded from macro 'Q_STATIC_ASSERT_X'
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                 ^
In file included from pythonplugin.cpp:21:
In file included from ./pythonplugin.h:30:
In file included from ../../libtiled/logginginterface.h:33:
In file included from ../../libtiled/tiled_global.h:32:
In file included from /Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qglobal.h:1145:
In file included from /Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:46:
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:93:53: error: no member named 'IsSupported' in the global
      namespace
    Q_STATIC_ASSERT_X(QAtomicOpsSupport<sizeof(T)>::IsSupported, "template parameter is an integral of a size not supported on this platform");
                                                  ~~^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qglobal.h:746:66: note: expanded from macro 'Q_STATIC_ASSERT_X'
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                                                 ^
In file included from pythonplugin.cpp:21:
In file included from ./pythonplugin.h:30:
In file included from ../../libtiled/logginginterface.h:33:
In file included from ../../libtiled/tiled_global.h:32:
In file included from /Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qglobal.h:1145:
In file included from /Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:46:
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:95:14: error: use of undeclared identifier 'Ops'
    typename Ops::Type _q_value;
             ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:95:19: error: expected a qualified name after 'typename'
    typename Ops::Type _q_value;
                  ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:95:23: error: expected ';' at end of declaration list
    typename Ops::Type _q_value;
                      ^
                      ;
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:99:44: error: use of undeclared identifier 'Ops'
    T load() const Q_DECL_NOTHROW { return Ops::load(_q_value); }
                                           ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:99:54: error: use of undeclared identifier '_q_value'
    T load() const Q_DECL_NOTHROW { return Ops::load(_q_value); }
                                                     ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:100:45: error: use of undeclared identifier 'Ops'
    void store(T newValue) Q_DECL_NOTHROW { Ops::store(_q_value, newValue); }
                                            ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:100:56: error: use of undeclared identifier '_q_value'
    void store(T newValue) Q_DECL_NOTHROW { Ops::store(_q_value, newValue); }
                                                       ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:102:51: error: use of undeclared identifier 'Ops'
    T loadAcquire() const Q_DECL_NOTHROW { return Ops::loadAcquire(_q_value); }
                                                  ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:102:68: error: use of undeclared identifier '_q_value'
    T loadAcquire() const Q_DECL_NOTHROW { return Ops::loadAcquire(_q_value); }
                                                                   ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:103:52: error: use of undeclared identifier 'Ops'
    void storeRelease(T newValue) Q_DECL_NOTHROW { Ops::storeRelease(_q_value, newValue); }
                                                   ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:103:70: error: use of undeclared identifier '_q_value'
    void storeRelease(T newValue) Q_DECL_NOTHROW { Ops::storeRelease(_q_value, newValue); }
                                                                     ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:107:86: error: use of undeclared identifier 'Ops'
    static Q_DECL_CONSTEXPR bool isReferenceCountingNative() Q_DECL_NOTHROW { return Ops::isReferenceCountingNative(); }
                                                                                     ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:107:34: error: no return statement in constexpr function
    static Q_DECL_CONSTEXPR bool isReferenceCountingNative() Q_DECL_NOTHROW { return Ops::isReferenceCountingNative(); }
                                 ^
/Users/Qt5.7.0/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:108:88: error: use of undeclared identifier 'Ops'
    static Q_DECL_CONSTEXPR bool isReferenceCountingWaitFree() Q_DECL_NOTHROW { return Ops::isReferenceCountingWaitFree(); }
                                                                                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [pythonplugin.o] Error 1
make[2]: *** [sub-python-make_first] Error 2
make[1]: *** [sub-plugins-make_first-ordered] Error 2
make: *** [sub-src-make_first-ordered] Error 2

Not sure what goes wrong here.

Any advice will be appreciated, thanks :)

UPDATE:

I tried to add the CONFIG+= c++11 to the tiled.pro file and then make clean , qmake, make but
still I am having the same error ......

@bjorn

This comment has been minimized.

Copy link
Owner

commented Jun 18, 2016

For some reason this problem did not come up with Qt 5.5, which is what the Tiled 0.16.1 release was made against. It came up from Qt 5.6 onwards and was already fixed on the 1.6 and master development branches (1a59914).

So, please compile from git for now. I plan to release a Tiled 0.16.2 soon, which will be built against Qt 5.6 (but should also compile against Qt 5.7).

@bjorn bjorn closed this Jun 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.