Skip to content

Issues with dev_deploy and compiling #1002

@Jonher937

Description

@Jonher937

Disclaimer

  • I have read and understood the disclaimer.

Application version

0.4.9

System version

0.2.5

Device model

JetKVM

Extension model

None

Remote device Hardware

No response

Remote device OS

No response

Bug description

I was going to flash my JetKVM with the latest source since I've seen some 0.5.0 dev changes.

Since the dev_deploy scripts were reworked for native it's no longer working on my machine.

TL;DR: Scripts to deploy dev env is "bad", document requirements clearly.

Assumptions:

  • Since docker is used it should contain all the necessary commands to compile the "kvm" projects frontend and backend code
  • When docker is NOT used, requirements should be listed clearly

Don't take this as complaining, but rather as constructive feedback. The team should expect a lesser technical person to be able to compile the project.

So now to the problems:

non-docker, clean git clone

Missing buildkit
./dev_deploy.sh  -r 192.168.10.10 --install --disable-docker

▶ Building release binary
▶ Building the project in host ...
+ make build_release SKIP_NATIVE_IF_EXISTS=0 SKIP_UI_BUILD=1 ENABLE_SYNC_TRACE=0
Skipping frontend build...
Building native...
▶ Generating UI index
ui_index.c has been generated successfully.
▶ Building native library
Re-run cmake no build system arguments
CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:159 (message):
  Could not find toolchain file:

   "/opt/jetkvm-native-buildkit/rv1106-jetkvm-v2.cmake"
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** [Makefile:51: build_native] Error 1

OK so fixing that manually by downloading and extracting the version mentioned in .devcontainer/install-deps.sh it starts building.but fails:

Missing kconfiglib
▶ Building native library
Re-run cmake no build system arguments
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/jetkvm-native-buildkit/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc - 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: /opt/jetkvm-native-buildkit/bin/arm-rockchip830-linux-uclibcgnueabihf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /opt/jetkvm-native-buildkit/bin/arm-rockchip830-linux-uclibcgnueabihf-gcc
-- Found Python: /usr/bin/python3.13 (found version "3.13.7") found components: Interpreter
-- Using defconfig: jetkvm/kvm/internal/native/cgo/lvgl_defconfig
-- Converted to absolute path: jetkvm/kvm/internal/native/cgo/lvgl_defconfig
Traceback (most recent call last):
  File "jetkvm/kvm/internal/native/cgo/build/_deps/lvgl-src/scripts/kconfig.py", line 24, in <module>
    from kconfiglib import (
    ...<9 lines>...
    )
ModuleNotFoundError: No module named 'kconfiglib'
CMake Error at build/_deps/lvgl-src/env_support/cmake/kconfig.cmake:46 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  build/_deps/lvgl-src/env_support/cmake/os_desktop.cmake:132 (include)
  build/_deps/lvgl-src/CMakeLists.txt:23 (include)


-- Configuring incomplete, errors occurred!
make: *** [Makefile:51: build_native] Error 1

Installing my distros python-kconfiglib resolves that issue and now I can deploy JetKVM

With Docker

First run on a new git clone with docker
▶ Building release binary
▶ Building the project in Docker ...
++ pwd
+ docker run --env JETKVM_INSIDE_DOCKER=1 -v jetkvm/kvm-docker:/build -v jetkvm/kvm-docker/.cache:/root/.cache/go-build ghcr.io/jetkvm/buildkit:latest make build_release SKIP_NATIVE_IF_EXISTS=0 SKIP_UI_BUILD=1 ENABLE_SYNC_TRACE=0
Skipping frontend build...
Building native...
▶ Generating UI index
ui_index.c has been generated successfully.
▶ Building native library
Re-run cmake no build system arguments
CMake Error at /usr/share/cmake-3.31/Modules/CMakeDetermineSystem.cmake:152 (message):
  Could not find toolchain file:
  /opt/jetkvm-native-buildkit/rv1106-jetkvm-v2.cmake
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** [Makefile:51: build_native] Error 1

Seems to also expect the buildkit to be present in the container, but no script installs it.

Dockerfile.build references COPY install-deps.sh /install-deps.sh but there's no install-deps.sh present in / nor /scripts

So I patched build_utill.sh to mount the buildkit for now, since I already have it on disk:

-v /opt/jetkvm-native-buildkit:/opt/jetkvm-native-buildkit:ro \

And that makes the docker build work as well. Meaning the buildkit should be downloaded in the image build process, or saved in a cache folder similar to the DOCKER_GO_CACHE_DIR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions