Repository navigation
Closed
Description
From atom issue atom/atom#10819 (atom/atom#10819 (comment)), a lot of 32-bit Linux users have been having troubles installing nodegit. From my research, it seemed to be a two-part problem of there not being a 32-bit prebuilt binary of nodegit
Error: 403 status code downloading tarball https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.11.9-node-v47-linux-ia32.tar.gz
and npm failing during the fallback build script
[nodegit] Building manually. (You'll be here a while.)
[nodegit] Regenerating and configuring code
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm ERR! Linux 4.4.5-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--ignore-scripts"
npm ERR! node v5.9.1
npm ERR! npm v3.8.2
npm ERR! Cannot read property 'target' of null
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/ivan/code/__/node_modules/nodegit/npm-debug.log
If the build problem is an issue with npm, could there at least be a prebuilt binary for 32-bit linux systems available for us to use?
Metadata
Metadata
Assignees
Labels
No labels
Activity
tbranyen commentedon Mar 28, 2016
Its probably because our Travis setup publishes 64bit builds and not 32bit. This was a big concern of mine with going full automated. We'll need to set up a secondary target that hits x86 32bit.
johnhaley81 commentedon Mar 28, 2016
travis-ci/travis-ci#986 (comment) :(
SEAPUNK commentedon Mar 28, 2016
Oh, that sucks. Is there a way to publish a 32-bit binary manually as a temporary workaround, then?
tbranyen commentedon Mar 28, 2016
@johnhaley81 is anything preventing us from cross compiling with this? http://stackoverflow.com/a/22469265
johnhaley81 commentedon Mar 28, 2016
@tbranyen nice find! That might be a way forward.. When running a build with
TRAVIS_TAGwe could do 2 compiles and publishes.SEAPUNK commentedon Apr 1, 2016
Bump; is there any progress on this? Is there any way I can help?
johnhaley81 commentedon Apr 1, 2016
@SEAPUNK could you start looking into what tbranyen said in #974 (comment)? That would be a great starting point I think. Add that to the CI matrix on Travis.
SEAPUNK commentedon Apr 1, 2016
Alright, I'll do some research.
SEAPUNK commentedon Apr 1, 2016
Question: Are there any needed environment variables for Travis for the builds? Are there any pieces from the build script that I can remove (e.g. publishing to S3)?
johnhaley81 commentedon Apr 1, 2016
When we push a tag travis will (pick that up)[https://github.com/nodegit/nodegit/blob/master/.travis.yml#L84] and do a publish to S3 with the resulting binary. If you don't push a tag you won't publish so I wouldn't worry about that.
Apart from that though, the (matrix)[https://github.com/nodegit/nodegit/blob/master/.travis.yml#L16-L18] is defined here and will declare environment variables that will be picked up. If you add a 32-bit one you'll have to ignore it on OSX and then use the above idea from Tim to build the 32-bit stuff on linux.
SEAPUNK commentedon Apr 1, 2016
I've added an extra handler for an additional environment variable,
TARGET_ARCH, and after installing the 32-bit compiler files (lib32-gcc-libson Arch Linux), it seems to be compiling. I'll be sure to inspect the built.nodefile to see if it's truly built for 32-bit machines.On a side note, I know that I had to do
--arch=ia32onnode-gyp, but don't you have to do the same fornode-pre-gyp, just under a different flag?SEAPUNK commentedon Apr 1, 2016
I made it compile! I just had the wrong compilation packages installed.
Here's the builder patch:
And when compiling, just provide
TARGET_ARCH=ia32.All that's left is the node-pre-gyp part, I think, and updating the travis file to include the 32-bit matrix, and having it excluse the 32-bit builds on osx (I have absolutely no idea how to do that).
SEAPUNK commentedon Apr 1, 2016
Alright, running Travis build(s). Let's hope nothing explodes.
https://github.com/SEAPUNK/nodegit
https://travis-ci.org/SEAPUNK/nodegit
SEAPUNK commentedon Apr 1, 2016
Alright, I was able to create a successful build for 32-bit systems. The problem now is when it actually tests the binary -- it can't load
nodegit.nodebecause it's built for 32-bit systems, but the system itself is 64-bit.What do I do?I'm trying a fix, hold on.SEAPUNK commentedon Apr 1, 2016
Alright, I think I got it. PR: #980
roshimon commentedon Apr 16, 2016
Upgrading to atom 1.8.0-beta1 has fixed the issue for me. Working flawlessly now :)