Edge Impulse setup script error on Jetson Nano

Question/Issue:
Hello everyone!
For the past few days, I’ve had the opportunity to experiment with an NVIDIA Jetson Nano. By following NVIDIA’s instructions, I was able to install JetPack 4.6.1 without any issues. My next step is to learn how to use Edge Impulse with the Nano, and I’ve decided to go through this tutorial. I found it while following the installation steps for Edge Impulse on the Nano.

However, I’m having issues with the setup script. Has anyone had the same problem or can help me? Thank you very much!
Best, Panx

Project ID:
No Project Started.

Context/Use case:
I want to connect my Jetson Nano to Edge Impulse.

Steps Taken:

  1. Running the Setup Script:
    wget -q -O - https://cdn.edgeimpulse.com/firmware/linux/jetson.sh | bash

  2. Connect to Edge Impulse with:
    edge-impulse-linux

Expected Outcome:
A wizard which will ask to log in on Edge Impulse.

Actual Outcome:
Error Message:

bash: edge-impulse-linux: command not found

Reproducibility:

  • [X] Always
  • [ ] Sometimes
  • [ ] Rarely

Environment:

  • Platform: NVIDIA Jetson Nano Developer Kit rev B01
  • Build Environment Details: JetPack 4.6.1
  • OS Version: Jetson Linux R32.7.1 / NVIDIA L4T 32.7.1 / Ubuntu 18.04

Additional Information:
The errors after running the setup script are really a lot…
I paste here the last lines:
Run npm audit for details.
npm notice
npm notice New major version of npm available! 8.1.2 → 11.5.2
npm notice Changelog: githubcom/npm/cli/releases/tag/v11.5.2
npm notice Run npm install -g npm@11.5.2 to update!
npm notice
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘npm-registry-fetch@17.1.0’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@aws-sdk/util-locate-window@3.804.0’,
npm WARN EBADENGINE required: { node: ‘>=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@npmcli/redact@2.0.1’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘make-fetch-happen@13.0.1’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘npm-package-arg@11.0.3’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘@npmcli/agent@2.2.2’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘cacache@18.0.4’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘hosted-git-info@7.0.2’,
npm WARN EBADENGINE required: { node: ‘^16.14.0 || >=18.0.0’ },
npm WARN EBADENGINE current: { node: ‘v16.13.1’, npm: ‘8.1.2’ }
npm WARN EBADENGINE }
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See v8dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see githubcom/request/request/issues/3142
npm WARN deprecated multer@1.4.5-lts.1: Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/edge-impulse-linux/node_modules/koffi
npm ERR! command failed
npm ERR! command sh -c node src/cnoke/cnoke.js -p . -d src/koffi --prebuild
npm ERR! >> Using CMake binary: cmake
npm ERR! >> Node: 16.13.1
npm ERR! >> Target: linux_arm64
npm ERR! >> Using local node-api headers
npm ERR! >> Running configuration
npm ERR! Not searching for unused variables given on the command line.
npm ERR! – The C compiler identification is GNU 7.5.0
npm ERR! – The CXX compiler identification is GNU 7.5.0
npm ERR! – The ASM compiler identification is GNU
npm ERR! – Found assembler: /usr/bin/cc
npm ERR! – Check for working C compiler: /usr/bin/cc
npm ERR! – Check for working C compiler: /usr/bin/cc – works
npm ERR! – Detecting C compiler ABI info
npm ERR! – Detecting C compiler ABI info - done
npm ERR! – Detecting C compile features
npm ERR! – Detecting C compile features - done
npm ERR! – Check for working CXX compiler: /usr/bin/c++
npm ERR! – Check for working CXX compiler: /usr/bin/c++ – works
npm ERR! – Detecting CXX compiler ABI info
npm ERR! – Detecting CXX compiler ABI info - done
npm ERR! – Detecting CXX compile features
npm ERR! – Detecting CXX compile features - done
npm ERR! – Performing Test use_no_finite_loops
npm ERR! – Performing Test use_no_finite_loops - Failed
npm ERR! – Configuring incomplete, errors occurred!
npm ERR! See also “/usr/local/lib/node_modules/edge-impulse-linux/node_modules/koffi/build/koffi/linux_arm64/v16.13.1_arm64/CMakeFiles/CMakeOutput.log”.
npm ERR! See also “/usr/local/lib/node_modules/edge-impulse-linux/node_modules/koffi/build/koffi/linux_arm64/v16.13.1_arm64/CMakeFiles/CMakeError.log”.
npm ERR! Failed to load prebuilt binary, rebuilding from source
npm ERR! CMake Error at CMakeLists.txt:23 (cmake_policy):
npm ERR! Policy “CMP0091” is not known to this version of CMake.
npm ERR!
npm ERR!
npm ERR! Error: Failed to run configure step
npm ERR! at Builder.configure (/usr/local/lib/node_modules/edge-impulse-linux/node_modules/koffi/src/cnoke/src/builder.js:227:19)
npm ERR! at Builder.build (/usr/local/lib/node_modules/edge-impulse-linux/node_modules/koffi/src/cnoke/src/builder.js:243:24)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! at async main (/usr/local/lib/node_modules/edge-impulse-linux/node_modules/koffi/src/cnoke/cnoke.js:145:9)

1 Like

Hi @panxita.jones,

Thanks for reporting an issue.
Can you let me know what version of CMake is on the system? And can you ensure version 3.81 or greater is installed.

// Raul

2 Likes

@panxita.jones,

I can reproduce the issue with your compiler version 7.5.0.
Please upgrade your compiler version to 8.3 or greater

// Raul

2 Likes

hello @rjames,

thanks, I have the CMake version 3.10.2

I updated to 3.31.0 (don’t found the 3.81):

sudo apt remove --purge cmake
which a- cmake

wget https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-linux-aarch64.sh
chmod +x cmake-3.31.0-linux-aarch64.sh
sudo sh cmake-3.31.0-linux-aarch64.sh --prefix=/usr/local --exclude-subdir

ls /usr/local/bin/cmake
echo 'export PATH=/usr/local/bin:$PATH' | tee -a ~/.bashrc
source ~/.bashrc
cmake --version

output:

cmake version 3.31.0

and now the command edge-impulse-linux works. I can login in Edge Impulse… thanks.

I have another question: the GCC version is 7.0.5. should I update this as you suggested too?

best, panx

1 Like

@panxita.jones

Awesome news that you got it working. :tada:

In your case the failing package was Koffi. I got the minimum requirements from their page. I see that I made an minor error in my previous post regarding version 3.81. This should be the minimum version of GNU Make, not CMake.

I’d recommend using GNU GCC 8.3. With 7.05 have you tried running an EIM downloaded from Edge Impulse Studio?

// Raul

1 Like

Hello @rjames,

Thanks for your help!

Well, now is so.

OLD version:

gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0

NEW version:

gcc (Ubuntu/Linaro 8.4.0-1ubuntu1~18.04) 8.4.0

With this commands:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo update-alternatives --config gcc

This installed 8.4.0, not 8.3.0, is this OK too?

have you tried running an EIM downloaded from Edge Impulse Studio?

No, I don’t tried to run any EIM. I want to do the Object Detection with Centroids tutorial first to learn Edge Impulse (I included the link in the first post).

Best, Panx.

1 Like

@panxita.jone,

Ye, 8.3 or greater will work.

// Raul

2 Likes