doe300 / VC4C

Compiler for the VC4CL OpenCL implementation
MIT License
118 stars 37 forks source link

Compilation error #161

Closed solsticedhiver closed 1 year ago

solsticedhiver commented 2 years ago

when trying to compile vc4c-git-r709.e3eed1e-3 package from AUR on archlinux, this ends with

==> Making package: vc4c-git r899.da943dc-1 (Sat Sep 17 19:24:04 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating VC4C git repo...
==> Validating source files with md5sums...
    VC4C ... Skipped
==> Extracting sources...
  -> Creating working copy of VC4C git repo...
Cloning into 'VC4C'...
done.
==> Starting pkgver()...
==> Starting build()...
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CMake 3.14+ FetchContent to include dependencies...
-- SPIRV-link found: /usr/bin/spirv-link
-- CLang compiler found: /usr/bin/clang
-- LLVM-dis found: /usr/bin/llvm-dis
-- LLVM-as found: /usr/bin/llvm-as
-- LLVM-link found: /usr/bin/llvm-link
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib/libffi.so  
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib/libtinfo.so  
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.12") 
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.10.2") 
-- Compiling LLVM library front-end with LLVM in version 14.0.6 located in '/usr/lib'
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- found clang-format: /usr/bin/clang-format
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    MULTI_THREADED

-- Build files have been written to: /home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build
[  0%] Generating test_files/unaligned_memory_access.cl.o
[  1%] Creating directories for 'cpplog-project'
[  2%] Creating directories for 'cpptest-lite-project'
[  2%] Built target GetGitCommit
[  3%] Generating test_files/OpenCV/transpose.cl.o
[  3%] Generating test_files/fibonacci.cl.o
[  3%] Generating test_files/hello_world.cl.o
[  3%] Performing download step (git clone) for 'cpplog-project'
[  3%] Performing download step (git clone) for 'cpptest-lite-project'
[  4%] Generating test_files/hello_world_constant.cl.o
[  4%] Generating test_files/hello_world_vector.cl.o
Cloning into 'cpptest-lite-project'...
Cloning into 'cpplog-project'...
[  5%] Generating test_files/histogram.cl.o
[  5%] Generating test_files/md5.cl.o
[  5%] Generating test_files/SHA-256.cl.o
[  6%] Generating test_files/test.cl.o
[  6%] Generating test_files/test_instructions.cl.o
[  7%] Generating test_files/test_prime.cl.o
[  7%] Generating test_files/test_async_copy.cl.o
[  8%] Generating test_files/test_atomic.cl.o
[  8%] Generating test_files/test_barrier.cl.o
[  8%] Generating test_files/test_branches.cl.o
[  9%] Generating test_files/test_conditional_address.cl.o
[  9%] Generating test_files/test_constant_load.cl.o
[ 10%] Generating test_files/test_cross_group_access.cl.o
[ 10%] Generating test_files/test_cts_regressions.cl.o
[ 11%] Generating test_files/test_expect_assume.cl.o
[ 11%] Generating test_files/test_hashes.cl.o
[ 11%] Generating test_files/local_private_storage.cl.o
[ 12%] Generating test_files/test_other.cl.o
[ 12%] Generating test_files/test_sfu.cl.o
[ 13%] Generating test_files/test_shuffle.cl.o
[ 13%] Generating test_files/test_storage.cl.o
[ 14%] Generating test_files/test_struct.cl.o
[ 14%] Generating test_files/test_vector.cl.o
[ 15%] Generating test_files/test_vectorization.cl.o
[ 15%] Generating test_files/test_vpm_read.cl.o
[ 17%] Generating test_files/test_vpm_write.cl.o
[ 17%] Generating test_files/test_work_item.cl.o
[ 17%] Generating test_files/bugs/30_local_memory.cl.o
[ 18%] Generating test_files/bugs/33_floating_point_folding.cl.o
[ 18%] Generating test_files/bugs/vc4cl_27_wrong_result.cl.o
[ 19%] Generating test_files/bugs/54_invalid_results.cl.o
[ 19%] Generating test_files/boost-compute/initial_reduce.cl.o
[ 20%] Generating test_files/boost-compute/adjacent_find.cl.o
[ 20%] Generating test_files/boost-compute/test_count.cl.o
[ 20%] Generating test_files/boost-compute/test_extrema.cl.o
[ 21%] Generating test_files/boost-compute/test_functional_popcount.cl.o
[ 21%] Generating test_files/boost-compute/test_reduce.cl.o
[ 22%] Generating test_files/boost-compute/test_insertion_sort.cl.o
[ 22%] Generating test_files/boost-compute/test_merge.cl.o
[ 23%] Generating test_files/boost-compute/test_transform2.cl.o
[ 23%] Generating test_files/boost-compute/user_defined_types.cl.o
[ 23%] Generating test_files/OpenCL-CTS/pointer_cast.cl.o
[ 24%] Generating test_files/OpenCL-CTS/integer_add_sat.cl.o
[ 24%] Generating test_files/OpenCL-CTS/sub_sat.cl.o
[ 25%] Generating test_files/OpenCL-CTS/uchar_compare.cl.o
[ 25%] Generating test_files/OpenCL-CTS/async_copy_global_to_local.cl.o
[ 26%] Generating test_files/OpenCL-CTS/min_max_constant_args.cl.o
[ 26%] Generating test_files/OpenCL-CTS/sub_buffers_read_write.cl.o
[ 26%] Generating test_files/OpenCL-CTS/local_kernel_scope.cl.o
[ 27%] Generating test_files/OpenCL-CTS/barrier.cl.o
[ 27%] Generating test_files/OpenCL-CTS/clamp.cl.o
[ 28%] Generating test_files/OpenCL-CTS/cross_product.cl.o
[ 28%] Generating test_files/OpenCL-CTS/constant.cl.o
[ 29%] Generating test_files/OpenCL-CTS/test_select.cl.o
[ 29%] Generating test_files/BabelStream/OCLStream.cl.o
[ 29%] Generating test_files/clNN/SpatialUpSamplingNearest.cl.o
[ 30%] Generating test_files/deepCL/copy.cl.o
[ 30%] Generating test_files/deepCL/inv.cl.o
[ 31%] Generating test_files/deepCL/memset.cl.o
[ 31%] Generating test_files/HandsOnOpenCL/matmul.cl.o
[ 31%] Generating test_files/HandsOnOpenCL/pi_ocl.cl.o
[ 32%] Generating test_files/NVIDIA/VectorAdd.cl.o
[ 32%] Generating test_files/OpenCLIPP/Histogram.cl.o
[ 34%] Generating test_files/pocl/test_structs_as_args.cl.o
[ 34%] Generating test_files/rodinia/nearestNeighbor_kernel.cl.o
[ 35%] Generating test_files/OpenCV/flip.cl.o
[ 35%] Generating test_files/OpenCV/meanstddev.cl.o
[ 35%] Generating test_files/OpenCV/normalize.cl.o
[ 36%] Generating test_files.h
[ 36%] Generating test_files/test_files.cpp
[ 37%] Building CXX object test/CMakeFiles/TestData.dir/ConversionTests.cpp.o
[ 37%] Building CXX object test/CMakeFiles/TestData.dir/ArithmeticTests.cpp.o
In file included from /home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/ArithmeticTests.cpp:6:
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/TestEntries.h: In instantiation of 'std::vector<_RealType> test_data::transform(const std::vector<T>&, const Func&) [with R = float; T = float; Func = registerTypeTests<float, int>(const std::string&)::<lambda(float)>]':
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/ArithmeticTests.cpp:430:25:   required from 'void registerTypeTests(const std::string&) [with T = float; IntType = int; std::string = std::__cxx11::basic_string<char>]'
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/ArithmeticTests.cpp:609:38:   required from here
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/TestEntries.h:107:29: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits<std::allocator<float>, float>::value_type' {aka 'float'} may change value [-Wconversion]
  107 |             result[i] = func(arg[i]);
      |                         ~~~~^~~~~~~~
[ 37%] Building CXX object test/CMakeFiles/TestData.dir/FloatTests.cpp.o
[ 37%] Building CXX object test/CMakeFiles/TestData.dir/IntegerTests.cpp.o
[ 38%] Building CXX object test/CMakeFiles/TestData.dir/MathTests.cpp.o
[ 38%] Building CXX object test/CMakeFiles/TestData.dir/MemoryTests.cpp.o
In file included from /home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/MathTests.cpp:6:
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/TestEntries.h: In instantiation of 'std::vector<_RealType> test_data::transform(const std::vector<T>&, const std::vector<U>&, const Func&) [with R = float; T = float; U = int; Func = std::function<float(float, float)>]':
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/MathTests.cpp:376:67:   required from here
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/test/TestEntries.h:119:29: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'float' may change value [-Wconversion]
  119 |             result[i] = func(arg0[i], arg1[i]);
      |                         ~~~~^~~~~~~~~~~~~~~~~~
[ 39%] Building CXX object test/CMakeFiles/TestData.dir/RelationalTests.cpp.o
[ 39%] Building CXX object test/CMakeFiles/TestData.dir/VectorTests.cpp.o
[ 40%] Building CXX object test/CMakeFiles/TestData.dir/TestData.cpp.o
[ 40%] Building CXX object test/CMakeFiles/TestData.dir/test_files/test_files.cpp.o
[ 40%] Linking CXX static library libvc4c_testdata.a
[ 40%] Built target TestData
HEAD is now at faeee96 remove Windows GitHub actions test
[ 41%] Performing update step for 'cpplog-project'
Already on 'master'
Your branch is up to date with 'origin/master'.
[ 42%] Performing update step for 'cpptest-lite-project'
From https://github.com/doe300/cpplog
 * branch            HEAD       -> FETCH_HEAD
Already up to date.
[ 42%] No patch step for 'cpplog-project'
[ 42%] Performing configure step for 'cpplog-project'
From https://github.com/doe300/cpptest-lite
 * branch            HEAD       -> FETCH_HEAD
Already up to date.
[ 42%] No patch step for 'cpptest-lite-project'
[ 42%] Performing configure step for 'cpptest-lite-project'
-- The C compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build/cpplog/src/cpplog-project-build
[ 43%] Performing build step for 'cpplog-project'
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
[ 37%] Building CXX object CMakeFiles/cpplog.dir/src/log.cpp.o
[ 37%] Building CXX object CMakeFiles/cpplog-static.dir/src/log.cpp.o
[ 37%] Building CXX object CMakeFiles/cpplog-static.dir/src/logger.cpp.o
[ 50%] Building CXX object CMakeFiles/cpplog.dir/src/logger.cpp.o
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build/cpptest-lite/src/cpptest-lite-project-build
[ 44%] Performing build step for 'cpptest-lite-project'
[  8%] Building CXX object CMakeFiles/cpptest-lite.dir/src/BDDSuite.cpp.o
[ 16%] Building CXX object CMakeFiles/cpptest-lite.dir/src/CollectorOutput.cpp.o
[ 25%] Building CXX object CMakeFiles/cpptest-lite.dir/src/CompilerOutput.cpp.o
[ 33%] Building CXX object CMakeFiles/cpptest-lite.dir/src/ConsoleOutput.cpp.o
[ 41%] Building CXX object CMakeFiles/cpptest-lite.dir/src/HTMLOutput.cpp.o
[ 50%] Building CXX object CMakeFiles/cpptest-lite.dir/src/ParallelSuite.cpp.o
[ 58%] Building CXX object CMakeFiles/cpptest-lite.dir/src/SynchronizedOutput.cpp.o
[ 66%] Building CXX object CMakeFiles/cpptest-lite.dir/src/TestSuite.cpp.o
[ 75%] Building CXX object CMakeFiles/cpptest-lite.dir/src/TestMain.cpp.o
[ 83%] Building CXX object CMakeFiles/cpptest-lite.dir/src/TextOutput.cpp.o
[ 91%] Building CXX object CMakeFiles/cpptest-lite.dir/src/XMLOutput.cpp.o
[100%] Linking CXX shared library libcpptest-lite.so
[100%] Built target cpptest-lite
[ 44%] Built target cpptest-lite-project-build
[ 62%] Building CXX object CMakeFiles/cpplog-static.dir/src/log_impl.cpp.o
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build/cpplog/src/cpplog-project/src/logger.cpp: In member function 'std::string logging::Logger::toString(std::chrono::_V2::system_clock::time_point) const':
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build/cpplog/src/cpplog-project/src/logger.cpp:42:28: error: variable 'std::array<char, 1024> buff' has initializer but incomplete type
   42 |     std::array<char, 1024> buff = {0};
      |                            ^~~~
make[5]: *** [CMakeFiles/cpplog-static.dir/build.make:90: CMakeFiles/cpplog-static.dir/src/logger.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
[ 75%] Building CXX object CMakeFiles/cpplog.dir/src/log_impl.cpp.o
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build/cpplog/src/cpplog-project/src/logger.cpp: In member function 'std::string logging::Logger::toString(std::chrono::_V2::system_clock::time_point) const':
/home/solstice/.cache/paru/clone/vc4c-git/src/VC4C/build/cpplog/src/cpplog-project/src/logger.cpp:42:28: error: variable 'std::array<char, 1024> buff' has initializer but incomplete type
   42 |     std::array<char, 1024> buff = {0};
      |                            ^~~~
make[5]: *** [CMakeFiles/cpplog.dir/build.make:90: CMakeFiles/cpplog.dir/src/logger.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [CMakeFiles/Makefile2:112: CMakeFiles/cpplog-static.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [CMakeFiles/Makefile2:86: CMakeFiles/cpplog.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/cpplog-project-build.dir/build.make:73: cpplog/src/cpplog-project-stamp/cpplog-project-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:288: CMakeFiles/cpplog-project-build.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

using gcc 12.2

doe300 commented 2 years ago

I can't see an actual error in this log. Can you post the full build log (does not have to be a clean build, just so that we have the actual error message).

solsticedhiver commented 2 years ago

I don't know what happened. I have updated the post above with a complete output, I hope

doe300 commented 2 years ago

I fixed it in the cpplog project. To get the fix into VC4C, you can https://github.com/doe300/VC4C/blob/master/cmake/cpplog.cmake#L19 and replace the v0.6 with master.

solsticedhiver commented 2 years ago

there is a problem. If I restart the compilation I get another error than 2 days ago. I don't know what is going on:

[100%] Built target cpptest-lite
[ 43%] Built target cpptest-lite-project-build
[ 43%] Building CXX object test/CMakeFiles/TestData.dir/IntegerTests.cpp.o
In file included from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/ArithmeticTests.cpp:6:
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/TestEntries.h: In instantiation of 'std::vector<_RealType> test_data::transform(const std::vector<T>&, const Func&) [with R = float; T = float; Func = registerTypeTests<float, int>(const std::string&)::<lambda(float)>]':
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/ArithmeticTests.cpp:430:25:   required from 'void registerTypeTests(const std::string&) [with T = float; IntType = int; std::string = std::__cxx11::basic_string<char>]'
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/ArithmeticTests.cpp:609:38:   required from here
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/TestEntries.h:107:29: warning: conversion from 'int' to '__gnu_cxx::__alloc_traits<std::allocator<float>, float>::value_type' {aka 'float'} may change value [-Wconversion]
  107 |             result[i] = func(arg[i]);
      |                         ~~~~^~~~~~~~
[ 44%] Building CXX object test/CMakeFiles/TestData.dir/MathTests.cpp.o
[ 44%] Building CXX object test/CMakeFiles/TestData.dir/MemoryTests.cpp.o
In file included from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/MathTests.cpp:6:
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/TestEntries.h: In instantiation of 'std::vector<_RealType> test_data::transform(const std::vector<T>&, const std::vector<U>&, const Func&) [with R = float; T = float; U = int; Func = std::function<float(float, float)>]':
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/MathTests.cpp:376:67:   required from here
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/test/TestEntries.h:119:29: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'float' may change value [-Wconversion]
  119 |             result[i] = func(arg0[i], arg1[i]);
      |                         ~~~~^~~~~~~~~~~~~~~~~~
[ 45%] Building CXX object test/CMakeFiles/TestData.dir/RelationalTests.cpp.o
[ 45%] Building CXX object test/CMakeFiles/TestData.dir/VectorTests.cpp.o
[ 46%] Building CXX object test/CMakeFiles/TestData.dir/TestData.cpp.o
[ 46%] Building CXX object test/CMakeFiles/TestData.dir/test_files/test_files.cpp.o
[ 46%] Linking CXX static library libvc4c_testdata.a
[ 46%] Built target TestData
make: *** [Makefile:166: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

It even gives nother error with another run!

If I changes cpplog to master like you said, I got another error:

[ 45%] Building CXX object src/CMakeFiles/VC4CC.dir/GlobalValues.cpp.o
[ 46%] Building CXX object src/CMakeFiles/VC4CC.dir/Compiler.cpp.o
[ 46%] Building CXX object src/CMakeFiles/VC4CC.dir/Method.cpp.o
[ 46%] Building CXX object src/CMakeFiles/VC4CC.dir/Module.cpp.o
<command-line>: warning: "_GNU_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/GlobalValues.cpp:9:
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h: In constructor 'constexpr vc4c::SIMDVector::SIMDVector(std::initializer_list<vc4c::Literal>)':
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h:53:24: error: call to non-'constexpr' function '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]'
   53 |             std::copy_n(list.begin(), std::min(NATIVE_VECTOR_SIZE, list.size()), elements.begin());
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.0/algorithm:61,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/tools/SmallMap.h:11,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Locals.h:14,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/GlobalValues.h:10,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/GlobalValues.cpp:7:
/usr/include/c++/12.2.0/bits/stl_algo.h:746:5: note: '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]' declared here
  746 |     copy_n(_InputIterator __first, _Size __n, _OutputIterator __result)
      |     ^~~~~~
make[2]: *** [src/CMakeFiles/VC4CC.dir/build.make:146: src/CMakeFiles/VC4CC.dir/GlobalValues.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
<command-line>: warning: "_GNU_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Module.h:12,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Module.cpp:7:
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h: In constructor 'constexpr vc4c::SIMDVector::SIMDVector(std::initializer_list<vc4c::Literal>)':
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h:53:24: error: call to non-'constexpr' function '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]'
   53 |             std::copy_n(list.begin(), std::min(NATIVE_VECTOR_SIZE, list.size()), elements.begin());
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.0/algorithm:61,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/tools/SmallMap.h:11,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Locals.h:14,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/GlobalValues.h:10,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Module.h:10:
/usr/include/c++/12.2.0/bits/stl_algo.h:746:5: note: '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]' declared here
  746 |     copy_n(_InputIterator __first, _Size __n, _OutputIterator __result)
      |     ^~~~~~
make[2]: *** [src/CMakeFiles/VC4CC.dir/build.make:216: src/CMakeFiles/VC4CC.dir/Module.cpp.o] Error 1
<command-line>: warning: "_GNU_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Module.h:12,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Method.cpp:9:
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h: In constructor 'constexpr vc4c::SIMDVector::SIMDVector(std::initializer_list<vc4c::Literal>)':
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h:53:24: error: call to non-'constexpr' function '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]'
   53 |             std::copy_n(list.begin(), std::min(NATIVE_VECTOR_SIZE, list.size()), elements.begin());
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.0/algorithm:61,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/intermediate/../tools/SmallMap.h:11,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/intermediate/../Locals.h:14,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/intermediate/IntermediateInstruction.h:10,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/InstructionWalker.h:10,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/BasicBlock.h:13,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Method.h:10,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Method.cpp:7:
/usr/include/c++/12.2.0/bits/stl_algo.h:746:5: note: '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]' declared here
  746 |     copy_n(_InputIterator __first, _Size __n, _OutputIterator __result)
      |     ^~~~~~
make[2]: *** [src/CMakeFiles/VC4CC.dir/build.make:202: src/CMakeFiles/VC4CC.dir/Method.cpp.o] Error 1
<command-line>: warning: "_GNU_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
In file included from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Module.h:12,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/CompilerInstance.h:11,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Compiler.cpp:10:
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h: In constructor 'constexpr vc4c::SIMDVector::SIMDVector(std::initializer_list<vc4c::Literal>)':
/home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/SIMDVector.h:53:24: error: call to non-'constexpr' function '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]'
   53 |             std::copy_n(list.begin(), std::min(NATIVE_VECTOR_SIZE, list.size()), elements.begin());
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.0/algorithm:61,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/tools/SmallMap.h:11,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Locals.h:14,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/GlobalValues.h:10,
                 from /home/solstice/prog/dvcs/vc4c-git/src/VC4C/src/Module.h:10:
/usr/include/c++/12.2.0/bits/stl_algo.h:746:5: note: '_OIter std::copy_n(_IIter, _Size, _OIter) [with _IIter = const vc4c::Literal*; _Size = long unsigned int; _OIter = vc4c::Literal*]' declared here
  746 |     copy_n(_InputIterator __first, _Size __n, _OutputIterator __result)
      |     ^~~~~~
make[2]: *** [src/CMakeFiles/VC4CC.dir/build.make:104: src/CMakeFiles/VC4CC.dir/Compiler.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:366: src/CMakeFiles/VC4CC.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

In fact, I tried to compile this project by error, and I was later told to use another one.

So I am gonna leave you there. Sorry.

If you want to test it yourself, you can try to install an archlinux VM/container. For easier install, you can try to install a manjaro VM, which is more easy and straightofrward, but will give you almost the same packages and build system that archlinux.

sorry not to help you on that.

BelegroM commented 1 year ago

Hello all, as it is my first comment.

Looks like directories during compilation get messed up (have similar problem on manjaro, which is arch based anyway). I get the same error as @solsticedhiver, and from what i checked so far with this problem:

make[2]: *** [src/CMakeFiles/VC4CC.dir/build.make:104: src/CMakeFiles/VC4CC.dir/Compiler.cpp.o] Error 1

That particular line in build.make looks like this: cd MY_HOME_DIR_HERE/vc4c-git/src/VC4C/build/src && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT src/CMakeFiles/VC4CC.dir/Compiler.cpp.o -MF CMakeFiles/VC4CC.dir/Compiler.cpp.o.d -o CMakeFiles/VC4CC.dir/Compiler.cpp.o -c /home/bob/AUR/vc4c-git/src/VC4C/src/Compiler.cpp

The problem is src/CMakeFiles/VC4CC.dir/Compiler.cpp.o which makes this line cause error - should be like the next ones CMakeFiles/VC4CC.dir/Compiler.cpp.o

Same issue for other VC4CC.dir .cpp files compilations.