Comments (16)
I would recommend you stick with Xcode's clang instead. We don't test with MacPort or HomeBrew installed compilers and we don't really intend to (we don't have the bandwidth unfortunately). It definitely looks like a mismatch between the compiler and the standard libraries (we've seen similar issues on Linux between gcc and clang).
What do you get when running c++ --version
? Mine gives the following on High Sierra:
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
from filament.
I get this:
~/filament>/usr/bin/clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
And the same for saying c++ --version
. However I forced links in /usr/local/bin to the homebrew installed clang version 6 because my own code does not support specified compilers.
I'm using the brew version because it supports more recent C++ (C++17 in particular) which I want to use in my own project. My project builds fine with both compilers at the moment but I will be adding C++14 and C++17 code which won't build on the Sierra compiler.
Is there a way to tell the filament build script to use /usr/bin/clang and /usr/bin/clang++ instead of the one on the PATH?
from filament.
You can try to export CC=/usr/bin/clang
and export CXX=/usr/bin/clang++
before running the script. It should instruct CMake to use these compilers instead.
from filament.
Same problem.
from filament.
Did you nuke the cmake directory first? (Just checking, I can't think of what else the problem could be)
from filament.
You could just remove the tests from libs/utils/CMakeLists.txt in the meantime
from filament.
Nope. I will try that... same problem. I will try upgrading to High Sierra, should provide newer clang?
from filament.
[BTW thanks for prompt support!]
from filament.
Upgrading to High Sierra should definitely fix it. I've compiled Filament myself on 4 different MacPros/MacBook Pros and they all work properly with High Sierra installed. I wish I could help you more but it's hard without a machine that reproduces the issue.
from filament.
Its hard even with a machine. I run Linux and Windows 10 Summer as well. C++ has become a real pain. With clang 6, I get linker warnings building my code. Its not my code, its clang's library. Sigh.
Also the brew Caveats are a bit confusing.
==> Caveats
To use the bundled libc++ please add the following LDFLAGS:
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/llvm/lib
CPPFLAGS: -I/usr/local/opt/llvm/include
I cannot add flags to compilation lines at the moment. The compilation lines are hard coded into binaries. Environment variables are fine. I don't know what it means "add the following LDFLAGS". Add what to what? Even the export hint above is wrong. That only finds clang-6
and clang++-6
, not clang
and clang++
which is what my code looks for. Hence the symlinks to hide the system compiler. Which works fine with my software (except for a visibility bug in the C++ library).
from filament.
So I have High Sierra now. Installed Xcode tools. Same error.
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
~/felix>cd ..
~>cd filament/
~/filament>rm -rf out
~/filament>./build.sh -j release
Building release in out/cmake-release...
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is AppleClang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Found PythonInterp: /usr/local/bin/python (found version "2.7.14")
-- SPIR-V optimizer enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/skaller/filament/out/cmake-release
[31/845] Building CXX object libs/util...utils.dir/test/test_Zip2Iterator.cpp.o
FAILED: libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DFILAMENT_DRIVER_SUPPORTS_VULKAN -I../../libs/utils/include -I../../third_party/libgtest/tnt/../include -I../../third_party/robin-map/tnt/.. -I../../libs/math/include -std=c++14 -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -fcolor-diagnostics -O3 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -MD -MT libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o -MF libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o.d -o libs/utils/CMakeFiles/test_utils.dir/test/test_Zip2Iterator.cpp.o -c ../../libs/utils/test/test_Zip2Iterator.cpp
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:280:38: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
,typename enable_if<is_convertible<const _U1&, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3746:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3870:20: note: in instantiation of function template specialization 'std::__1::__insertion_sort_3<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
_VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:324:37: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
typename enable_if<is_convertible<_U1, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3746:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3870:20: note: in instantiation of function template specialization 'std::__1::__insertion_sort_3<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
_VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:280:38: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
,typename enable_if<is_convertible<const _U1&, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3746:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3870:20: note: in instantiation of function template specialization 'std::__1::__insertion_sort_3<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
_VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:324:37: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
typename enable_if<is_convertible<_U1, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3746:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3870:20: note: in instantiation of function template specialization 'std::__1::__insertion_sort_3<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
_VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:280:38: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
,typename enable_if<is_convertible<const _U1&, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3792:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3996:32: note: in instantiation of function template specialization 'std::__1::__insertion_sort_incomplete<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:324:37: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
typename enable_if<is_convertible<_U1, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3792:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3996:32: note: in instantiation of function template specialization 'std::__1::__insertion_sort_incomplete<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:280:38: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
,typename enable_if<is_convertible<const _U1&, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3792:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3996:32: note: in instantiation of function template specialization 'std::__1::__insertion_sort_incomplete<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
In file included from ../../libs/utils/test/test_Zip2Iterator.cpp:17:
In file included from ../../third_party/libgtest/tnt/../include/gtest/gtest.h:55:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:138:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:324:37: error: no type named 'type' in 'std::__1::enable_if<false, void>'; 'enable_if' cannot be used to disable this declaration
typename enable_if<is_convertible<_U1, _T1>::value &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../libs/utils/include/utils/Zip2Iterator.h:42:38: note: in instantiation of member function 'std::__1::pair<int &, int &>::pair' requested here
using std::pair<Ref1, Ref2>::pair;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3792:20: note: while substituting deduced template arguments into function template 'Ref' [with _U1 = int, _U2 = int]
*__j = _VSTD::move(__t);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3996:32: note: in instantiation of function template specialization 'std::__1::__insertion_sort_incomplete<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4041:5: note: in instantiation of function template specialization 'std::__1::__sort<(lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21) &, utils::Zip2Iterator<int *, int *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
../../libs/utils/test/test_Zip2Iterator.cpp:43:10: note: in instantiation of function template specialization 'std::__1::sort<utils::Zip2Iterator<int *, int *>, (lambda at ../../libs/utils/test/test_Zip2Iterator.cpp:43:21)>' requested here
std::sort(b, e, [](auto const& lhs, auto const& rhs) { return lhs.second < rhs.second; });
^
8 errors generated.
[40/845] Building CXX object libs/math...les/test_math.dir/tests/test_mat.cpp.o
ninja: build stopped: subcommand failed.
~/filament>
from filament.
Something's not right, with the latest Xcode and tools you should be on clang-902 (Apple LLVM version 9.1.0). (BTW you can use -c with build.sh to trigger a clean build). Here's the top of my CMake output:
Building release in out/cmake-release...
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-
This is with Xcode 9.4.1.
from filament.
i did run xcode-select --install .. hmm .. you're right. Its the same compiler. Checking AppStore it tells me I installed version 9.4 of the tools. But, you're right those tools aren't the current ones. Sorry AppStore won't let me copy/paste. Stupid crap. AppStore ALSO tells me there is an update for El Capitan Xcode 8.2. Grrr.
from filament.
Ok .. I will try to manually download xcode from the AppStore. Its installing it. Despite telling me I already did install it .. GRRR .. give me Debian any day.
from filament.
Ok, after AppStore download of 5+G failed because I ran out of credit and then restarted from scratch (come on, Apple are you morons? FTP could restart downloads 40 years ago), $100 later Xcode installed and filament built!
from filament.
I encountered the same build error with clang-3.8 on Ubuntu 16.04. That's the default version you get from apt install clang
. I worked around the problem by using a newer version of clang.
You can install a newer version of clang with the command apt install clang-6.0
. The version number is appended to the file name to avoid conflicting with the old clang, so you use CC=/usr/bin/clang-6.0 CXX=/usr/bin/clang++-6.0
when calling CMake to select it.
from filament.
Related Issues (20)
- core dumped gltf_viewer HOT 5
- VulkanDriver always reports FEATURE_LEVEL_1 HOT 2
- crash on ios with _resourceLoader->loadResources(_asset);
- No point or spot light shadows on the first rendered frame HOT 5
- Rendering exceptions with GLB file HOT 4
- Detect clicked node of GLTF model HOT 1
- To get assets transform matrix to set new transform for rotations
- Filament rendering is inconsistent with OpenGL HOT 1
- When I create more than 1000 Entities the frame latency increases, but the CPU/GPU are not fully loaded HOT 5
- How to implement ModelViewer Scene click listener to get clicked Entity? HOT 1
- Custom Bloom Threshold Value
- Repeated calls to sched_setaffinity slow down rendering HOT 1
- Some features are super buggy on Intel iGPUs on macOS Sonoma
- 1.51.4 fails to compile: error: loop variable '[target, setId]' creates a copy from type 'const value_type' (aka 'const pair<const unsigned int, unsigned int>')
- Android crash due to potential tagged pointer misusage HOT 1
- need help with materials (C++)
- fail to build Material.cpp on windows msvc
- Error with wasm version on latest Chrome update HOT 3
- gltfio: Provide new loader suitable for remeshing
- Support KHR_materials_volume HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament.