Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Build fails on NetBSD #1334

Closed
lhagan opened this issue Jan 8, 2016 · 8 comments
Closed

Build fails on NetBSD #1334

lhagan opened this issue Jan 8, 2016 · 8 comments

Comments

@lhagan
Copy link

lhagan commented Jan 8, 2016

I'm trying to install node-sass on NetBSD 7.0 w/ Node 5.2.0, but have run into a number of errors. Full platform details in a gist under the heading [0].

Here's a list of what I've tried and the end result for each. You can find the complete terminal output for each step under the matching numbered heading ([1], [2], etc.) in the gist.

  1. Installing with npm install node-sass, the build fails with return binding.lstat(pathModule._makeLong(path));. Similar issue reported in Can't install node-sass during deployment #1138.
  2. I cloned the node-sass repo and get the same error as above when running npm install.
  3. As a workaround, I tried /usr/pkg/bin/node scripts/install.js to eliminate the path issue. That got me to a 404 error as there is no pre-built binding for NetBSD.
  4. I tried building from source: /usr/pkg/bin/node scripts/build.js. This got pretty far into the build before failing at the linking stage. It's a similar error to installation fails to compile on ubuntu x86_64 #11, but I'm not using waf as far as I know.
ld: Release/obj.target/binding/src/binding.o: relocation R_X86_64_32S against `_ZTV14CallbackBridgeIP10Sass_ValuePvE' can not be used when making a shared object; recompile with -fPIC
Release/obj.target/binding/src/binding.o: could not read symbols: Bad value
binding.target.mk:114: recipe for target 'Release/obj.target/binding.node' failed

This pretty much exhausts my troubleshooting ideas as I'm not sure how (or what) to recompile with -fPIC. Any suggestions on what to try next, or am I out of luck for NetBSD?

@saper
Copy link
Member

saper commented Jan 8, 2016

For 1) what does process.execPath say from the node command line?

For 4) which compiler are you using? Which C++ libraries were used to build node? What does ldd /path/to/node say?

@saper
Copy link
Member

saper commented Jan 8, 2016

I have posted a full build log from my FreeBSD box https://gist.github.com/9986820a7b186de0eb39
( I am using --nodedir=/usr/local because FreeBSD port conveniently installs node include files in /usr/local/include/node, so node-gyp does not need to download it).

And all the symbols are position-independent (due to -fPIC): https://gist.github.com/df761a411a85f41eead8

By the way here are my private FreeBSD ports - those are used to build the binaries for FreeBSD in an automated way. Please note I am building libsass first as the library and then link it to node-sass statically (to let people just download one binding file).

saper added a commit to saper/node-gyp that referenced this issue Jan 8, 2016
@saper
Copy link
Member

saper commented Jan 8, 2016

Can you check if nodejs/node-gyp#856 fixes it? You might install the node-gyp fork before or patch the addon.gypi file manually.

@saper saper self-assigned this Jan 8, 2016
saper added a commit to saper/node-gyp that referenced this issue Jan 8, 2016
bnoordhuis pushed a commit to nodejs/node-gyp that referenced this issue Jan 8, 2016
Fixes: sass/node-sass#1334
PR-URL: #856
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@lhagan
Copy link
Author

lhagan commented Jan 12, 2016

Thanks! nodejs/node-gyp#856 did fix the compile issue and I now have node-sass running on my NetBSD image.

I still had the problem described in 1), but this seems like it's a node issue rather than a node-sass issue:

$ node -p process.execPath
node

@xzyfer
Copy link
Contributor

xzyfer commented Jan 20, 2016

Sounds like there is isn't anything we can do. Can we close this @saper?

@saper
Copy link
Member

saper commented Feb 14, 2016

@lhagan we have fixed the process.execPath issue with #1325 Feel free to re-open and comment on #1323 if that fix still does not work for you.

@saper saper closed this as completed Feb 14, 2016
@saper saper added this to the next.patch milestone Feb 14, 2016
@saper
Copy link
Member

saper commented Feb 14, 2016

@xzyfer I think this can be considered fully solved once we bump node-gyp dependency to not yet released 3.2.2

@xzyfer
Copy link
Contributor

xzyfer commented Feb 17, 2016

@saper node-gyp@3.3.0 has been released. Patch to bump the min node-gyp in #1386.

@xzyfer xzyfer modified the milestone: next.patch Sep 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants