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

binary for Solaris 11 x86 #2033

Closed
drook opened this issue Jun 30, 2017 · 8 comments
Closed

binary for Solaris 11 x86 #2033

drook opened this issue Jun 30, 2017 · 8 comments

Comments

@drook
Copy link

drook commented Jun 30, 2017

(by the way the provided URL https://github.com/sass/node-sass/blob/master/CONTRIBUTING.md shows an 404, so someone should probably fix this first, rather than making it's reading mandatory).

I'm having constant problems with assembling node-sass on Solaris (because it doesn't compile on GCC 4.5.2, which is in the base system, and because the node-gyp has some cp flags hardcoded (and those are missing in the Solaris cp) and the latter one it's a shame, but not actually a node-sass problem).

Can I provide the Solaris 11 x86 binary proved to be working and containing only the symbols from the libraries that can easily be found in the Solaris 11 x86 base system ? So other people (and myself) could just download it from the repository rather than build it locally with GCC 4.8.x and various cp wrappers ? If yes, here's the link to it:

http://static.enaza.ru/binding.node

If not, well, tha's a pity.

ldd:

# ldd binding.node 
        libstdc++.so.6 =>        /usr/lib/64/libstdc++.so.6
        libm.so.2 =>     /lib/64/libm.so.2
        libgcc_s.so.1 =>         /usr/lib/64/libgcc_s.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1

Thanks anyway.

@saper
Copy link
Member

saper commented Jun 30, 2017

How can I repeat your build?

saper added a commit that referenced this issue Jun 30, 2017
Thanks to @drook for reporting it via #2033
@drook
Copy link
Author

drook commented Jul 1, 2017

You will need:

  • Solaris 11.x x86 (actually any recent version will fit, from 11.0 to 11.3 and more recent (if any))
  • node.js (well that's obvious)
  • GCC of any recent version (4.8.x fits, not sure if less recent versions will do) - that's actually the biggest problem because the stock GCC is 4.5.2 and it's unable to build node-sass - it shows various compilation errors releted to the syntax and/or the includes. Mine 4.8.x is built from sources by me.
  • a cp wrapper in PATH, it should be closer to the beginning than the stock binary cp. Mine looks just like a bourne shell script, stripping the -af (which are hardcoded to the node-gyp and it's a known but still unfixed problem, specific only to Solaris - that's probably why it's not fixed) from the argument list (another aproach is to have GNU coreutils in PATH, but I'm not sure if their version will have -a and -f on Solaris either).

Then you just build it.

@saper
Copy link
Member

saper commented Jul 1, 2017

Thanks, I actually have access to some Solaris 11 and even 10 machines.

Did you compile node.js yourself using the same compiler? Are you using SunOS binaries published on https://nodejs.org/en/download/ ?

The question is, if we ship the binary build with libstdc++.so.6.0.18 coming from GCC 4.8.0, will people know they need to have it installed?

@saper
Copy link
Member

saper commented Jul 1, 2017

I just checked, and I don't see any gcc coming in the base install. Solaris IPS offers lots of options, including 4.7, 4.8, 4.9 and 5.

Interestingly, "SunOS" version distributed https://nodejs.org/en/download/ will not work on Solaris 11.3, because it is compiled for Illumos-based distributions:

$ ldd ./node-v6.11.0-sunos-x64/bin/node
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libumem.so.1 =>  /lib/64/libumem.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libsendfile.so.1 =>      /lib/64/libsendfile.so.1
        libstdc++.so.6 =>        /usr/lib/64/libstdc++.so.6
        libm.so.2 =>     /lib/64/libm.so.2
        libgcc_s.so.1 =>         /usr/lib/64/libgcc_s.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libc.so.1 (ILLUMOS_0.17) =>      (version not found)
        libc.so.1 (ILLUMOS_0.5) =>       (version not found)
        libmp.so.2 =>    /lib/64/libmp.so.2
        libucrypto.so.1 =>       /lib/64/libucrypto.so.1
        libelf.so.1 =>   /lib/64/libelf.so.1
        libcryptoutil.so.1 =>    /lib/64/libcryptoutil.so.1
        libz.so.1 =>     /lib/64/libz.so.1

So this means we should agree on a compiler used to build node itself and then use it to build node-sass. Fortunately, it seems that a suitable GNU C++ runtime library is included:

$ pkg list system/library/gcc/gcc-c++-runtime
NAME (PUBLISHER)                                  VERSION                    IFO
system/library/gcc/gcc-c++-runtime                4.8.2-0.175.3.0.0.30.0     i--
$ pkg contents system/library/gcc/gcc-c++-runtime
PATH
usr/lib/amd64/libstdc++.so
usr/lib/amd64/libstdc++.so.6
usr/lib/amd64/libstdc++.so.6.0.18
usr/lib/libstdc++.so
usr/lib/libstdc++.so.6
usr/lib/libstdc++.so.6.0.18

so that means that building with gcc 4.8.2 should be safe for most Solaris users, provided they have compiled node with it as well. Except that node 6.11 needs gcc 4.8.5 ...

Is there any reliable source of node binary packages? We support multiple node engine versions and we should provide binaries at least for the current LTS releases.

@drook
Copy link
Author

drook commented Jul 3, 2017

Well, it's a nice surprise for me that Solaris pkg offers a recent GCC version now. As about your question - yes, I have compiled the node.js myself using the same compiler. And no, unfortunately, I don't know any node.js binary source repo. There's OpenCSW, but node.js there is like prehistoric.

@saper
Copy link
Member

saper commented Jul 10, 2017

Well, here's the problem - for all platforms we support we know which node engine and which compiler we are using. We would also need to build node ourselves in the CI-like setup to properly build a module. One could have solaris5.11-x86-gcc48-binding.node, solaris5.11-x86-gcc49-binding.node, but somebody would need to volunteer to build infrastructure to do this.

For now, if you have to compile node yourself, getting node-sass compiled is only marginally more difficult.

@nschonni
Copy link
Contributor

Closing as duplicate of #981

@saper
Copy link
Member

saper commented Jul 13, 2017

Not exactly duplicate, node released for SunOS is using Illumos APIs, so #981 is about OpenSolaris derivatives.

This issue is about Solaris 11 proper.

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

No branches or pull requests

3 participants