falkTX / los

Libre Octave Studio
GNU General Public License v2.0
20 stars 5 forks source link

Failure with clang-40: llegal initializer (only variables can be initialized) __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args) #43

Open yurivict opened 6 years ago

yurivict commented 6 years ago
/usr/bin/c++  -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_XML_LIB -Ilos/theme -I/usr/ports/audio/los/work/los-6ad4052/los/theme -I/usr/local/include -I/usr/local/include/alsa -I/usr/local/include/uuid -isystem /usr/local/include/qt4 -isystem /usr/local/include/qt4/QtGui -isystem /usr/local/include/qt4/QtXml -isystem /usr/local/include/qt4/QtCore -I/usr/ports/audio/los/work/los-6ad4052/. -I/usr/ports/audio/los/work/los-6ad4052 -I/usr/ports/audio/los/work/los-6ad4052/los -I/usr/ports/audio/los/work/los-6ad4052/los/widgets -I. -Ilos -Ilos/ctrl -Ilos/instruments -Ilos/widgets -I/usr/ports/audio/los/work/los-6ad4052/los/Arranger -I/usr/ports/audio/los/work/los-6ad4052/los/driver -I/usr/ports/audio/los/work/los-6ad4052/los/instruments -I/usr/ports/audio/los/work/los-6ad4052/los/liste -I/usr/ports/audio/los/work/los-6ad4052/los/midiedit -I/usr/ports/audio/los/work/los-6ad4052/los/midiplugins -Ilos/liste -Ilos/midiplugins -O2 -pipe -fno-omit-frame-pointer -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer  -std=c++14 -I/usr/ports/audio/los/files -isystem /usr/local/include -std=c++0x -Wall -Wextra -O2 -pipe -fno-omit-frame-pointer -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer  -std=c++14 -I/usr/ports/audio/los/files -isystem /usr/local/include -O2 -DNDEBUG -fomit-frame-pointer -ffast-math -fstrength-reduce -MD -MT los/theme/CMakeFiles/theme.dir/CarlaStyle.cpp.o -MF los/theme/CMakeFiles/theme.dir/CarlaStyle.cpp.o.d -o los/theme/CMakeFiles/theme.dir/CarlaStyle.cpp.o -c /usr/ports/audio/los/work/los-6ad4052/los/theme/CarlaStyle.cpp
c++: warning: optimization flag '-fstrength-reduce' is not supported [-Wignored-optimization-argument]
In file included from /usr/ports/audio/los/work/los-6ad4052/los/theme/CarlaStyle.cpp:18:
In file included from /usr/ports/audio/los/work/los-6ad4052/los/theme/CarlaStylePrivate.hpp:21:
In file included from /usr/ports/audio/los/work/los-6ad4052/los/theme/CarlaStyle.hpp:23:
In file included from /usr/local/include/qt4/QtCore/Qt:1:
In file included from /usr/local/include/qt4/QtCore/qnamespace.h:45:
In file included from /usr/local/include/qt4/QtCore/qglobal.h:68:
In file included from /usr/include/c++/v1/algorithm:640:
/usr/include/c++/v1/type_traits:4235:1: error: illegal initializer (only variables can be initialized)
__invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
^
/usr/include/c++/v1/type_traits:4236:1: error: expected ';' at end of declaration
_LIBCPP_INVOKE_RETURN((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...))
^
/usr/include/c++/v1/type_traits:4220:37: note: expanded from macro '_LIBCPP_INVOKE_RETURN'
    noexcept(noexcept(__VA_ARGS__)) -> decltype(__VA_ARGS__) \
                                    ^
/usr/include/c++/v1/type_traits:4236:1: error: cannot use arrow operator on a type
/usr/include/c++/v1/type_traits:4220:37: note: expanded from macro '_LIBCPP_INVOKE_RETURN'
    noexcept(noexcept(__VA_ARGS__)) -> decltype(__VA_ARGS__) \
                                    ^
/usr/include/c++/v1/type_traits:4242:1: error: illegal initializer (only variables can be initialized)
__invoke_constexpr(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
^
/usr/include/c++/v1/type_traits:4243:1: error: expected ';' at end of declaration
_LIBCPP_INVOKE_RETURN((_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...))
^
falkTX commented 6 years ago

Isn't this an issue with the compiler header files?

In any case, los heavily depends on ALSA. It won't work on FreeBSD.

yurivict commented 6 years ago

Isn't this an issue with the compiler header files?

I will ask experts, but clang on BSD builds hundreds/thousands of projects, so simple silly bugs preventing valid code from building are usually not found. But I will ask.


In any case, los heavily depends on ALSA.

No way to untangle and make it work with Jack?

falkTX commented 6 years ago

It already works with JACK, but ALSA is the one driving the engine. Since this is a minor project for me, there won't be major refactors to the code. Will be just Qt5 update and fixes here and there, to make it usable for me and a few others.

This is a pure-MIDI sequencer, it doens't do much. Likely you want something else. But for me, wanting something simple and quick, it fits a place in my "tool-box".

Note: the build issue is likely related to C++11 and Qt4 being mixed.

DimitryAndric commented 6 years ago

Looks like something is defining __invoke, and then including the C++ headers. That should be avoided, any identifiers starting with _ are reserved.