-
Notifications
You must be signed in to change notification settings - Fork 17
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
Alpine linux compatibility issue #33
Comments
I am able to get beyond this point but I get a NAPI error when downloading. https://github.com/storj-thirdparty/uplink-js works for me on Linux. |
Does uplink-js work on Alpine Linux for you? When I installed it on an Alpine container built with FROM node:lts-alpine
RUN \
npm install -g npm@latest && \
apk update && \
apk add --no-cache bash g++ make git musl-dev go python3 alpine-sdk && \
npm i -g node-gyp@7.1.2 It gives me this error The Errornpm ERR! Cloning into 'uplink-c'... npm ERR! Note: switching to '496683529b9328761d8398fa57a0e23215e45d9f'. npm ERR! npm ERR! You are in 'detached HEAD' state. You can look around, make experimental npm ERR! changes and commit them, and you can discard any commits you make in this npm ERR! state without impacting any branches by switching back to a branch. npm ERR! npm ERR! If you want to create a new branch to retain commits you create, you may npm ERR! do so (now or later) by using -c with the switch command. Example: npm ERR! npm ERR! git switch -c npm ERR! npm ERR! Or undo this operation with: npm ERR! npm ERR! git switch - npm ERR! npm ERR! Turn off this advice by setting config variable advice.detachedHead to false npm ERR! npm ERR! % Total % Received % Xferd Average Speed Time Time Time Current npm ERR! Dload Upload Total Spent Left Speed 100 115M 100 115M 0 0 9555k 0 0:00:12 0:00:12 --:--:-- 10.1M npm ERR! /bin/sh: /home/up/node_modules/uplink-js/go/bin/go: not found npm ERR! /bin/sh: /home/up/node_modules/uplink-js/go/bin/go: not found npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@14.17.1 | linux | x64 npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/up/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/up/node_modules/uplink-js/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/up/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/14.17.1/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/14.17.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/up/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/14.17.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/up/node_modules/uplink-js', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@14.17.1 | linux | x64 npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/up/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/up/node_modules/uplink-js/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/up/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/root/.cache/node-gyp/14.17.1/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/14.17.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/up/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/14.17.1/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/up/node_modules/uplink-js', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! make: *** No rule to make target '/home/up/node_modules/uplink-js/libuplinkc.h', needed by '/home/up/node_modules/uplink-js/build/Release/libuplinkc.h'. Stop. npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/up/node_modules/node-gyp/lib/build.js:194:23) npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:375:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) npm ERR! gyp ERR! System Linux 5.10.25-linuxkit npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/up/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/up/node_modules/uplink-js npm ERR! gyp ERR! node -v v14.17.1 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok |
Yes there seems to be an issue there where it downloads the Go binary but then it isn't at the location where the author intended.
|
I don't know directly how to help out, I hope one of the more regular maintainers can chime in. |
Hi @dennyhong96, I got so far as to get the object file for libuplink, however, it looks like there are numerous compatibility items due to alpine using musl instead of glib. One core issue is the types seems to be incompatible with cgo:
I spent some time replacing with Bool from stdbool.h which gets the object to build, however, the binding file still will not build due to:
We're happy to accept a PR from the community to solve, however will not be prioritizing this item in the near-term, though may revisit in the future. |
Hi there, we are trying to install
uplink-nodejs
on an Alpine linux container built with the following Dockerfile./home/node/test2 # npm i uplink-nodejs
We got an
'_Bool' does not name a type
ErrorThe Error
We solved that error by cloning down the master branch of
uplink-nodejs
repo, then runmake build
within it.The build was successful, removed the
install
andpreinstall
script inpackage.json
to prevent rebuilding when installing as a dependency.The installation is successful. Copied the
HelloStorj.js
and try to run it.We got this error
Could not locate the bindings file
.The error
To get the
uplink.node
file, we spin up a container using this Dockerfile from your repo and installed theuplink-nodejs
in there.Then in the alpine container, we downloaded the
uplink.node
intouplink-nodejs/out/Release/
then re-installed as a dependency.After installation. We got this error
initial-exec TLS resolves to dynamic definition in /home/uplink/libuplinkcv1.2.4.so
trying to run theHelloStorj.js
exampleThe Error
We think it's related to an ongoing bug when using cgo, and want to bring it to your attention. Is there anything you recommend trying?
The text was updated successfully, but these errors were encountered: