Detect RISC-V compiler from PATH environment variable#22547
Detect RISC-V compiler from PATH environment variable#22547asmorkalov merged 1 commit intoopencv:4.xfrom
Conversation
|
/cc @hanliutong |
|
As I understand, if I pass cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/riscv64-gcc.toolchain.cmake \
-DCMAKE_C_COMPILER=/home/pli/bin/gnu-rv64-linux/bin/riscv64-unknown-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=/home/pli/bin/gnu-rv64-linux/bin/riscv64-unknown-linux-gnu-g++ \
../ |
|
@Incarnation-p-lee, yes, that should work. |
|
Looks the variables were unset by accident, see the below logs. Finally, it will have errors like |
|
@Incarnation-p-lee, can you please try with |
|
@dkurt Sure, but almost the same. |
There is no line 18 with So,
The last message doesn't contain any error message. See item 2 Can't reproduce: ( |
Just add some message to that file which results in the line number change. It works well when given |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
from https://github.com/riscv-collab/riscv-gnu-toolchain, default install path is
/opt/riscvand they recommend add it to the PATH variable.