Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problems on Luckfox Pico Max #128

Open
DeroZaza opened this issue Mar 2, 2025 · 1 comment
Open

Installation problems on Luckfox Pico Max #128

DeroZaza opened this issue Mar 2, 2025 · 1 comment

Comments

@DeroZaza
Copy link

DeroZaza commented Mar 2, 2025

pico@luckfox:~/pico$ npm install i2c-bus
npm error code 1
npm error path /home/pico/pico/node_modules/i2c-bus
npm error command failed
npm error command sh -c node-gyp rebuild
npm error make: Entering directory '/home/pico/pico/node_modules/i2c-bus/build'
npm error CXX(target) Release/obj.target/i2c/src/i2c.o
npm error SOLINK_MODULE(target) Release/obj.target/i2c.node
npm error make: Leaving directory '/home/pico/pico/node_modules/i2c-bus/build'
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | linux | arm
npm error gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/pico/pico/node_modules/i2c-bus/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/pico/.cache/node-gyp/18.20.6/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/pico/.cache/node-gyp/18.20.6',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/pico/.cache/node-gyp/18.20.6/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/pico/pico/node_modules/i2c-bus',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error /usr/bin/ld: cannot find -lgcc: No such file or directory
npm error collect2: error: ld returned 1 exit status
npm error make: *** [i2c.target.mk:141: Release/obj.target/i2c.node] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: make failed with exit code: 2
npm error gyp ERR! stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm error gyp ERR! System Linux 5.10.160
npm error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /home/pico/pico/node_modules/i2c-bus
npm error gyp ERR! node -v v18.20.6
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /home/pico/.npm/_logs/2025-03-02T16_07_55_560Z-debug-0.log

What I already did:

sudo apt install build-essential libgcc-11-dev g++ gcc make

@DeroZaza
Copy link
Author

DeroZaza commented Mar 2, 2025

I got it to work by reinstalling the librarys and g++ compiler:

$ sudo apt-get remove --purge libgcc-11-dev libgcc-10-dev libgcc-9-dev
$ sudo ldconfig
$ ldconfig -p | grep libgcc
$ sudo apt-get update
$ sudo apt-get install g++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant