Open tvutonyguo opened 3 years ago
I ran into the same issue and had to manually run the script V3dLib/script/install.sh
which installs the CmdParameter library and calls update_repo.sh
.
I ran into the same issue too, and found one solution is to unmark the make line in script/install.sh to make it compile without errors. Build on raspios-buster-arm64. Here is the modified script/install.sh
############################################################################### . "script/update_repo.sh"
update_repo CmdParameter "https://github.com/wimrijnders/CmdParameter.git" 0.4.1
make clean make DEBUG=1 all make DEBUG=0 all
I'm on a Pi3 and running into the same issue. Trying to run V3DLib/script/install.sh
actually results in my terminal crashing, specifically from executing the line update_repo CmdParameter "https://github.com/wimrijnders/CmdParameter.git" 0.4.1
.
for anyone that gets here in 2022 (and later): you have to clone https://github.com/wimrijnders/CmdParameter.git
adjacent to this repo, i.e.
pi@raspberrypi:~/dev_projects $ tree -L 1
.
├── CmdParameter
└── V3DLib
and then build CmdParameter
using make DEBUG=0 all
.
Only then can you run
make QPU=1 DEBUG=1 all
make QPU=1 DEBUG=1 test
Note if you try to build this repo with DEBUG=0
, then you'll get an error in Lib/v3d/KernelDriver.cpp
:
Lib/v3d/KernelDriver.cpp: In function ‘void V3DLib::v3d::{anonymous}::_encode(const V3DLib::Instr::List&, V3DLib::v3d::Instructions&)’:
Lib/v3d/KernelDriver.cpp:735:11: error: ‘checkUniformAtTop’ was not declared in this scope
735 | assertq(checkUniformAtTop(instrs), "_encode(): checkUniformAtTop() failed (v3d)", true);
| ^~~~~~~~~~~~~~~~~
make: *** [Makefile:199: obj/qpu/Lib/v3d/KernelDriver.o] Error 1
You just need to fence a call to a debug helper around line 732:
--- a/Lib/v3d/KernelDriver.cpp
+++ b/Lib/v3d/KernelDriver.cpp
@@ -732,7 +732,9 @@ bool checkUniformAtTop(V3DLib::Instr::List const &instrs) {
* Translate instructions from target to v3d
*/
void _encode(V3DLib::Instr::List const &instrs, Instructions &instructions) {
+#ifdef DEBUG
assertq(checkUniformAtTop(instrs), "_encode(): checkUniformAtTop() failed (v3d)", true);
+#endif
bool prev_was_init_begin = false;
or just comment it out...
You might also need
sudo apt-get install libpthread-stubs0-dev
if you're getting linker errors about pthreads_once
.
EDIT: if you get hands (something something timer expired), you probably need to
sudo usermod --append --groups video $USER
or
sudo setfacl -m u:$USER:rw /dev/dri/card*
or you need to reboot (I think I observed this failure mode when experimenting with https://github.com/Idein/py-videocore6)
I tried to build V3DLib on my Raspberry Pi4 but I got error message as below. Can you please advise? Thanks.
make QPU=1 DEBUG=1 all
... make: *** No rule to make target '../CmdParameter/obj-debug/libCmdParameter.a', needed by 'obj/qpu-debug/bin/HeatMap'. Stop
Attached full building logs:
build_full_logs.txt .