Page 1 of 1

Error trying to compile SDK

Posted: 2024-08-14 17:12
by Tomate
Hi, I downloaded and followed the instructions in the tutorial to compile buildroot. My Ubuntu version is 22.04. But when I run build.sh an error appears:
m /home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output/build/buildroot-config/zconf.tab.c
#
# configuration written to /home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/.config
#
make[1]: Leaving directory '/home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6'
/home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/tools/board/mirror_select/buildroot_mirror_select.sh /home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/.config
Fast mirror is http://sources.buildroot.net
make ARCH=arm CROSS_COMPILE=arm-rockchip830-linux-uclibcgnueabihf- source -C /home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6
make[1]: Entering directory '/home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6'
/usr/bin/make -j1 O=/home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6/output HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" syncconfig

You seem to have the current working directory in your
PATH environment variable. This doesn't work.
make[2]: *** [support/dependencies/dependencies.mk:27: dependencies] Error 1
make[1]: *** [Makefile:82: _all] Error 2
make[1]: Leaving directory '/home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv/source/buildroot/buildroot-2023.02.6'
make: *** [Makefile:572: buildroot] Error 2
make: Leaving directory '/home/epsonbox/dev/luckfox/sdk/luckfox-pico/sysdrv'
[build.sh:error] Running build_sysdrv failed!
[build.sh:error] exit code 2 from line 653:
[build.sh:info] make -C ${SDK_SYSDRV_DIR}
This my PATH variable
psonbox@device:~/dev/luckfox/sdk/luckfox-pico$ echo $PATH
/home/epsonbox/.pyenv/plugins/pyenv-virtualenv/shims:/home/epsonbox/.pyenv/shims:/home/epsonbox/.pyenv/bin:/home/epsonbox/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:
epsonbox@device:~/dev/luckfox/sdk/luckfox-pico$
Thanks in advance !

Re: Error trying to compile SDK

Posted: 2024-08-15 1:06
by Crocodile
Hello, your environment variables include ~/dev/luckfox/sdk/luckfox-pico, which causes the SDK check to fail during compilation. Please remove the declaration of the Luckfox Pico SDK root directory from your environment variables. If you set the environment variable in ~/.zshrc or ~/.bashrc, you can delete the setting directly. If you're not sure where it was added, you can temporarily use the export PATH command to set it.

Re: Error trying to compile SDK

Posted: 2024-08-15 13:59
by Tomate
Crocodile wrote: 2024-08-15 1:06 Hello, your environment variables include ~/dev/luckfox/sdk/luckfox-pico, which causes the SDK check to fail during compilation. Please remove the declaration of the Luckfox Pico SDK root directory from your environment variables. If you set the environment variable in ~/.zshrc or ~/.bashrc, you can delete the setting directly. If you're not sure where it was added, you can temporarily use the export PATH command to set it.
Thank you for your help.

I solved the problem by editing my PATH variable and removing the colons (::)

Another thing I discovered is that for the SDK to compile correctly you need a gcc version 9 or higher.

Best regards !