HVML / PurC

The prime HVML interpreter for C Language.
GNU Lesser General Public License v3.0
1.06k stars 54 forks source link

build failed in archlinux #1

Closed SuperGod closed 2 years ago

SuperGod commented 2 years ago

build failed in archlinux. cmake version: 3.23.3 gcc version: 12.1.0 glibc version: 2.35-6

build error log file: log.txt

VincentWei commented 2 years ago

Thanks for your first issue reported!

It seams the failure is caused by C++ compatibilities. We are using GCC 9.4.0...

atzlinux commented 2 years ago

It's also build failed on Debian 12+ sid.

gcc version 12.1.0 (Debian 12.1.0-7) cmake version 3.18.4 Debian GLIBC 2.33-8

The last error lines is:

[ 34%] Building CXX object Source/WTF/wtf/CMakeFiles/WTF.dir/Language.cpp.o In file included from /home/atzlinux/devel/HVML/Source/WTF/wtf/Language.h:29, from /home/atzlinux/devel/HVML/Source/WTF/wtf/Language.cpp:27: /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h: In instantiation of ‘struct PurCWTF::CollectionInspector<PurCWTF::HashMap<void*, void (*)(void*)> >’: /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1731:11: required from ‘struct PurCWTF::CopyToVectorResult<PurCWTF::HashMap<void*, void (*)(void*)> >’ /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1735:13: required by substitution of ‘template<class Collection> PurCWTF::Vector<typename PurCWTF::CopyToVectorResult<Collection>::Type> PurCWTF::copyToVector(const Collection&) [with Collection = PurCWTF::HashMap<void*, void (*)(void*)>]’ /home/atzlinux/devel/HVML/Source/WTF/wtf/Language.cpp:61:39: required from here /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1670:45: error: no matching function for call to ‘begin(PurCWTF::HashMap<void*, void (*)(void*)>)’ 1670 | using IteratorType = decltype(std::begin(std::declval<RealSourceType>())); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:25: /usr/include/c++/12/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’ 90 | begin(initializer_list<_Tp> __ils) noexcept | ^~~~~ /usr/include/c++/12/initializer_list:90:5: note: template argument deduction/substitution failed: /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1670:45: note: ‘PurCWTF::HashMap<void*, void (*)(void*)>’ is not derived from ‘std::initializer_list<_Tp>’ 1670 | using IteratorType = decltype(std::begin(std::declval<RealSourceType>())); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1670:45: error: no matching function for call to ‘begin(PurCWTF::HashMap<void*, void (*)(void*)>)’ /usr/include/c++/12/initializer_list:90:5: note: candidate: ‘template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)’ 90 | begin(initializer_list<_Tp> __ils) noexcept | ^~~~~ /usr/include/c++/12/initializer_list:90:5: note: template argument deduction/substitution failed: /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1670:45: note: ‘PurCWTF::HashMap<void*, void (*)(void*)>’ is not derived from ‘std::initializer_list<_Tp>’ 1670 | using IteratorType = decltype(std::begin(std::declval<RealSourceType>())); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/atzlinux/devel/HVML/Source/WTF/wtf/Language.cpp: In function ‘void PurCWTF::languageDidChange()’: /home/atzlinux/devel/HVML/Source/WTF/wtf/Language.cpp:61:39: error: no matching function for call to ‘copyToVector(PurCWTF::ObserverMap&)’ 61 | for (auto& observer : copyToVector(observerMap())) { | ~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1735:13: note: candidate: ‘template<class Collection> PurCWTF::Vector<typename PurCWTF::CopyToVectorResult<Collection>::Type> PurCWTF::copyToVector(const Collection&)’ 1735 | inline auto copyToVector(const Collection& collection) -> Vector<typename CopyToVectorResult<Collection>::Type> | ^~~~~~~~~~~~ /home/atzlinux/devel/HVML/Source/WTF/wtf/Vector.h:1735:13: note: substitution of deduced template arguments resulted in errors seen above gmake[2]: *** [Source/WTF/wtf/CMakeFiles/WTF.dir/build.make:485:Source/WTF/wtf/CMakeFiles/WTF.dir/Language.cpp.o] 错误 1 gmake[1]: *** [CMakeFiles/Makefile2:1038:Source/WTF/wtf/CMakeFiles/WTF.dir/all] 错误 2 gmake: *** [Makefile:171:all] 错误 2

VincentWei commented 2 years ago

Thanks for your reports!

I am going to resolve this compilation error.

VincentWei commented 2 years ago

This compilation error (a warning actually) has been fixed by using GCC 12.