Closed bhargavthriler closed 3 years ago
I don't know the first thing about yocto builds, but I assume you want to install it the same way that you install any other software that has to be build from sources.
I don't know the first thing about yocto builds, but I assume you want to install it the same way that you install any other software that has to be build from sources.
Ok that can be done. So can you explain me like what is the flow of installation like:
Actually I'm not clear how the installation process of the VC4CL is going on. If you could explain a bit more?
If you cross-compile, then you should probably generate the debian packages and install them on the target via the package manager.
The installation process depends on the way you want to install it.
Using packages:
vc4cl-stdlib
, vc4c
and vc4cl
packages via apt in that order on the targetManual install:
sudo make install
) both VC4C and VC4CL projectsCMAKE_INSTALL_PREFIX
.@doe300
While cross compiling following the intruction from "https://github.com/doe300/VC4CL/wiki/How-to-get#built-it-yourself" I am getting the following erros. Can you please explain what I'm doing wrong here? First I'm exported the cross compilers
bhargavthriler@instance-3:~/VC4/arm64build/VC4C (master)$ echo $PATH
/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/bin:/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/sbin:/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux:/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
bhargavthriler@instance-3:~/VC4/arm64build/VC4C (master)$
Generating makefiles While generating makefiles I'm getting LLVM package related errors
bhargavthriler@instance-3:~/VC4/arm64build/VC4C/build (master)$ cmake ..
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- VC4CL standard library headers found: /home/bhargavthriler/VC4/arm64build/VC4C/../VC4CLStdLib/include/
-- Toolchain file defaulted to '/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake'
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc
-- Check for working C compiler: /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc -- 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: /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++
-- Check for working CXX compiler: /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Enabling multi-threaded optimizations
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Using CMake 3.14+ FetchContent to include dependencies...
-- CLang compiler found: /usr/bin/clang-9
-- Using enhanced OpenCL features of Clang 3.9+!
-- Clang opt found: /usr/bin/opt-9
-- LLVM-link found: /usr/bin/llvm-link-9
CMake Warning at cmake/libllvm.cmake:37 (find_package):
By not providing "FindLLVM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "LLVM", but
CMake did not find one.
Could not find a package configuration file provided by "LLVM" with any of
the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:124 (include)
CMake Warning at cmake/libllvm.cmake:61 (message):
LLVM library front-end enabled, but LLVM library was not found!
Call Stack (most recent call first):
CMakeLists.txt:124 (include)
CMake Warning at CMakeLists.txt:128 (message):
Neither SPIR-V nor LLVM library front-end are configured!
CMake Warning at CMakeLists.txt:137 (message):
The vc4asm assembler validation does not compile with GCC 9.0+. It will
automatically be disabled
CMake Warning at cmake/clang-format.cmake:19 (message):
clang-format not found: strongly recommend to use it before commit!
Call Stack (most recent call first):
src/CMakeLists.txt:152 (include)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bhargavthriler/VC4/arm64build/VC4C/build
bhargavthriler@instance-3:~/VC4/arm64build/VC4C/build (master)$
Building
bhargavthriler@instance-3:~/VC4/arm64build/VC4C/build (master)$ make -j 8
[ 1%] Performing update step for 'cpplog-project'
[ 2%] Performing update step for 'cpptest-lite-project'
From https://github.com/doe300/cpplog
* branch HEAD -> FETCH_HEAD
From https://github.com/doe300/cpptest-lite
* branch HEAD -> FETCH_HEAD
Already up to date.
Already up to date.
[ 2%] Performing configure step for 'cpplog-project'
[ 2%] Performing configure step for 'cpptest-lite-project'
-- Configuring done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bhargavthriler/VC4/arm64build/VC4C/build/cpplog/src/cpplog-project-build
-- Generating done
-- Build files have been written to: /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project-build
[ 3%] Performing build step for 'cpplog-project'
[ 4%] Performing build step for 'cpptest-lite-project'
[ 50%] Built target cpplog
[100%] Built target cpplog-static
[100%] Built target cpptest-lite
[ 6%] Built target cpplog-project-build
[ 9%] Built target cpptest-lite-project-build
[ 78%] Built target VC4CC
[ 79%] Linking CXX executable vc4c
[ 81%] Built target qpu_emulator
[ 82%] Building CXX object test/CMakeFiles/TestVC4C.dir/TestExpressions.cpp.o
[ 82%] Building CXX object test/CMakeFiles/TestVC4C.dir/TestInstructions.cpp.o
[ 84%] Building CXX object test/CMakeFiles/TestVC4C.dir/TestOptimizationSteps.cpp.o
[ 84%] Building CXX object test/CMakeFiles/TestVC4C.dir/TestIntrinsics.cpp.o
[ 85%] Building CXX object test/CMakeFiles/TestVC4C.dir/TestPatternMatching.cpp.o
[ 86%] Building CXX object test/CMakeFiles/TestVC4C.dir/TestVectorFunctions.cpp.o
/bin/sh: 1: /home/bhargavthriler/VC4/arm64build/VC4C/build/src/vc4c: Exec format error
src/CMakeFiles/VC4C.dir/build.make:85: recipe for target 'src/vc4c' failed
make[2]: *** [src/vc4c] Error 2
make[2]: *** Deleting file 'src/vc4c'
CMakeFiles/Makefile2:289: recipe for target 'src/CMakeFiles/VC4C.dir/all' failed
make[1]: *** [src/CMakeFiles/VC4C.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:12,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestIntrinsics.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestIntrinsics.cpp:7:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h: In function 'std::string Test::Formats::to_string(float)':
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h:66:26: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
66 | sprintf(buffer, "%g", val);
| ^~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:12,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestOptimizationSteps.h:8,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestOptimizationSteps.cpp:6:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h: In function 'std::string Test::Formats::to_string(float)':
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h:66:26: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
66 | sprintf(buffer, "%g", val);
| ^~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:12,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestVectorFunctions.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestVectorFunctions.cpp:7:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h: In function 'std::string Test::Formats::to_string(float)':
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h:66:26: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
66 | sprintf(buffer, "%g", val);
| ^~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:12,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestExpressions.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestExpressions.cpp:6:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h: In function 'std::string Test::Formats::to_string(float)':
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h:66:26: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
66 | sprintf(buffer, "%g", val);
| ^~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:12,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestPatternMatching.h:4,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestPatternMatching.cpp:6:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h: In function 'std::string Test::Formats::to_string(float)':
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h:66:26: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
66 | sprintf(buffer, "%g", val);
| ^~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:12,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp:7:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h: In function 'std::string Test::Formats::to_string(float)':
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/formatting.h:66:26: warning: implicit conversion from 'float' to 'double' when passing argument to function [-Wdouble-promotion]
66 | sprintf(buffer, "%g", val);
| ^~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp:11:
/home/bhargavthriler/VC4/arm64build/VC4C/src/HalfType.h: In constructor 'constexpr vc4c::Binary16::Binary16(uint16_t)':
/home/bhargavthriler/VC4/arm64build/VC4C/src/HalfType.h:28:18: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'unsigned char:1' may change value [-Wconversion]
28 | sign(static_cast<uint16_t>(val >> 15u)), exponent(static_cast<uint16_t>((val & 0x7C00u) >> 10u)),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bhargavthriler/VC4/arm64build/VC4C/src/HalfType.h: In constructor 'constexpr vc4c::Binary16::Binary16(uint16_t, uint16_t, uint16_t)':
/home/bhargavthriler/VC4/arm64build/VC4C/src/HalfType.h:34:18: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'unsigned char:1' may change value [-Wconversion]
34 | sign(sign), exponent(exp), fraction(mantissa)
| ^~~~
/home/bhargavthriler/VC4/arm64build/VC4C/src/HalfType.h:34:34: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'unsigned char:5' may change value [-Wconversion]
34 | sign(sign), exponent(exp), fraction(mantissa)
| ^~~
/home/bhargavthriler/VC4/arm64build/VC4C/src/HalfType.h:34:49: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'short unsigned int:10' may change value [-Wconversion]
34 | sign(sign), exponent(exp), fraction(mantissa)
| ^~~~~~~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/ValueRange.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestExpressions.cpp:12:
/home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/../HalfType.h: In constructor 'constexpr vc4c::Binary16::Binary16(uint16_t)':
/home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/../HalfType.h:28:18: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'unsigned char:1' may change value [-Wconversion]
28 | sign(static_cast<uint16_t>(val >> 15u)), exponent(static_cast<uint16_t>((val & 0x7C00u) >> 10u)),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/../HalfType.h: In constructor 'constexpr vc4c::Binary16::Binary16(uint16_t, uint16_t, uint16_t)':
/home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/../HalfType.h:34:18: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'unsigned char:1' may change value [-Wconversion]
34 | sign(sign), exponent(exp), fraction(mantissa)
| ^~~~
/home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/../HalfType.h:34:34: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'unsigned char:5' may change value [-Wconversion]
34 | sign(sign), exponent(exp), fraction(mantissa)
| ^~~
/home/bhargavthriler/VC4/arm64build/VC4C/src/analysis/../HalfType.h:34:49: warning: conversion from 'uint16_t' {aka 'short unsigned int'} to 'short unsigned int:10' may change value [-Wconversion]
34 | sign(sign), exponent(exp), fraction(mantissa)
| ^~~~~~~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp:7:
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/comparisons.h: In instantiation of 'bool Test::Comparisons::isSame(const T1&, const T2&) [with T1 = int; T2 = unsigned int]':
/home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp:1382:5: required from here
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/comparisons.h:70:16: warning: comparison of integer expressions of different signedness: 'const int' and 'const unsigned int' [-Wsign-compare]
70 | return val1 == val2;
| ~~~~~^~~~~~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestIntrinsics.cpp:10:
/home/bhargavthriler/VC4/arm64build/VC4C/test/emulation_helper.h: In function 'std::array<Result, ((VectorWidth * LocalSize) * NumGroups)> runEmulation(std::stringstream&, const std::vector<std::array<Input, ((VectorWidth * LocalSize) * NumGroups)> >&, const string&) [with Input = int; Result = unsigned char; long unsigned int VectorWidth = 1; long unsigned int LocalSize = 1; long unsigned int NumGroups = 1]':
/home/bhargavthriler/VC4/arm64build/VC4C/test/emulation_helper.h:430:12: error: 'output' may be used uninitialized in this function [-Werror=maybe-uninitialized]
430 | return output;
| ^~~~~~
/home/bhargavthriler/VC4/arm64build/VC4C/test/emulation_helper.h: In function 'std::array<Result, ((VectorWidth * LocalSize) * NumGroups)> runEmulation(std::stringstream&, const std::vector<std::array<Input, ((VectorWidth * LocalSize) * NumGroups)> >&, const string&) [with Input = int; Result = char; long unsigned int VectorWidth = 1; long unsigned int LocalSize = 1; long unsigned int NumGroups = 1]':
/home/bhargavthriler/VC4/arm64build/VC4C/test/emulation_helper.h:430:12: error: 'output' may be used uninitialized in this function [-Werror=maybe-uninitialized]
430 | return output;
| ^~~~~~
In file included from /home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/cpptest.h:11,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.h:10,
from /home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp:7:
/home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp: In member function 'void TestInstructions::testALUInstructions()':
/home/bhargavthriler/VC4/arm64build/VC4C/test/TestInstructions.cpp:1587:77: warning: potential null pointer dereference [-Wnull-dereference]
1587 | TEST_ASSERT(ins.toBinaryCode() == ins.as<ALUInstruction>()->toBinaryCode())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/bhargavthriler/VC4/arm64build/VC4C/build/cpptest-lite/src/cpptest-lite-project/include/asserts.h:29:22: note: in definition of macro 'TEST_ASSERT'
29 | if(false == (condition)) { \
| ^~~~~~~~~
cc1plus: some warnings being treated as errors
test/CMakeFiles/TestVC4C.dir/build.make:218: recipe for target 'test/CMakeFiles/TestVC4C.dir/TestIntrinsics.cpp.o' failed
make[2]: *** [test/CMakeFiles/TestVC4C.dir/TestIntrinsics.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:380: recipe for target 'test/CMakeFiles/TestVC4C.dir/all' failed
make[1]: *** [test/CMakeFiles/TestVC4C.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
bhargavthriler@instance-3:~/VC4/arm64build/VC4C/build (master)$
Can you help me with this? Am I missing some building options while generating makefiles?
From the CMake error message it looks like you do not have any supported compilers installed. Did you check requirements in the Readme? If you installed the compiler into a non-standard location, you might need to set one of the CMake flags.
Edit: Since CMake finds some LLVM binaries, but not the CMake module, are you maybe missing the LLVM development packages, e.g. llvm-9-dev?
I wanted to prepare a raspberry pi 3 image (either 32 or 64 bit) with VC4CL integrated in the rootfs. Any suggestion how to do it? I'm using yocto build system to generate the images.