VC4CL icon indicating copy to clipboard operation
VC4CL copied to clipboard

Test debian packages

Open doe300 opened this issue 6 years ago • 7 comments

(On a freshly installed Raspbian distribution) test installation and usage of the three created debian packages built with CircleCI.

Things to test:

  • [x] does VC4C find libLLVM correctly?
  • [x] does VC4C correctly expect the VC4CLStdLib headers to reside in /usr/local/include/vc4cl-stdlib?
  • [x] does VC4C build the PCH correctly on installation in the correct location?
  • [x] do simple compilation tests run with VC4C?
  • [x] is VC4CL correctly configured to use VC4C? Does it find the libVC4CC.so in /usr/local/lib?
  • [x] is VC4CL correctly configured with ICD loader?
  • [x] does e.g. clinfo print correct results?
  • [x] do the tools v3d_info and v3d_profile work?
  • [ ] test for various Raspberry versions (model A/B/Zero running on ARMv6 and model 3 running ARMv8)

doe300 avatar Dec 07 '17 13:12 doe300

In case it's useful, my notes on compiling and installing on raspbian jessie (clinfo runs successfully)

Setting up cmake:

(cd VC4CLStdLib; mkdir build; cd build; cmake ..)
(cd VC4C; mkdir build; cd build; cmake -DSPIRV_FRONTEND=false ..)
(cd VC4CL; mkdir build; cd build; cmake -DVC4CC_LIBRARY=$(pwd)/../../VC4C/build/build/libVC4CC.so ..)

Build it all with 'make package', in each of the build directories

install:

sudo dpkg -i *.deb
sudo ldconfig -v

ThijsWithaar avatar Dec 08 '17 11:12 ThijsWithaar

@ThijsWithaar, thanks for sharing the commands, when I run the 3rd line (generating makefile for vc4cl), I got an error:

none of the required 'ocl-icd>=1.3' found. I do have ocl-icd-opencl-dev 2.2.11-1 installed, did I miss anything?

I also tried to type "make" inside VC4C/build after the Makefile is created, I got another error:

VC4C/src/Precompiler.cpp:125:38: error "CLANG_PATH" was not declared in this scope. all codes were pulled from git today. any comment is appreciated.

fangq avatar Jan 24 '18 23:01 fangq

an update, I manually edited Precompiler.cpp and defined CLANG_PATH as a string "/usr/bin/clang", then make proceeds without further error.

regarding the ocl-icd error, I solved it by installing ocl-icd-dev (README only mentioned about ocl-icd-opencl-dev).

In the end, I managed to create all deb packages and install them. however, when I use "apt-get install clinfo" and then run clinfo, I got 0 available platforms. curious what additional setting I need to make in order to run clinfo.

fangq avatar Jan 25 '18 06:01 fangq

@fangq see here for the problem withclinfo seeing no platforms and a circumvention for it.

doe300 avatar Jan 27 '18 09:01 doe300

thanks for the link, yes, I did resolve the clinfo issue by defining the LD_LIBRARYPATH.

fangq avatar Jan 28 '18 00:01 fangq

I was following @doe300's instructions on how to get VC4CL, then @ThijsWithaar's on how to build, but when I try to "sudo dpkg -i *.deb" within VC4C's build directory, I get the error that vc4c-0.4-Linux.deb couldn't be processed because the "package architecture (amd64) does not match system (armhf)"

Additionally, I can't "make package" from within VC4CL's build directory because "file INSTALL cannot find "[my_dir]/VC4CL/VC4CL.icd"."

Any help would be greatly appreciated :) (I'm trying this from an RPi 3 model B)

maleroy avatar Mar 23 '18 11:03 maleroy

@maleroy , which instruction did you use? The ones from here should download the correct version for the ARM architecture.

I cannot reproduce the problem you encounter with make package though.

P.S. The cross-compiled packages currently do not work on "original" Raspberry Pis (see https://github.com/doe300/VC4C/issues/66)

doe300 avatar Mar 24 '18 08:03 doe300