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

SmartOS/Solaris: libsass/units.hpp:39:5: error: expected identifier before numeric constant #1308

Closed
djensen47 opened this issue Jul 6, 2015 · 33 comments

Comments

@djensen47
Copy link

$ sudo npm install node-sass
-
> node-sass@3.2.0 install /home/admin/src/road-rules-static-website/www/node_modules/node-sass
> node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.2.0/sunos-x64-14_binding.node": HTTP error 404 Not Found

> node-sass@3.2.0 postinstall /home/admin/src/road-rules-static-website/www/node_modules/node-sass
> node scripts/build.js

Building: /opt/local/bin/node node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/admin/src/road-rules-static-website/www/node_modules/node-sass/.node-gyp"
make: Entering directory '/home/admin/src/road-rules-static-website/www/node_modules/node-sass/build'
  CXX(target) Release/obj.target/libsass/src/libsass/ast.o
In file included from ../src/libsass/ast.hpp:34:0,
                 from ../src/libsass/ast.cpp:1:
../src/libsass/units.hpp:39:5: error: expected identifier before numeric constant
../src/libsass/units.hpp:39:5: error: expected '}' before numeric constant
../src/libsass/units.hpp:39:5: error: expected unqualified-id before numeric constant
../src/libsass/units.hpp:62:3: error: 'SassUnit' does not name a type
../src/libsass/units.hpp:63:30: error: 'SassUnit' was not declared in this scope
../src/libsass/units.hpp:63:30: note: suggested alternative:
../src/libsass/units.hpp:22:8: note:   'Sass::SassUnit'
../src/libsass/units.hpp:64:3: error: 'SassUnitType' does not name a type
../src/libsass/units.hpp:66:34: error: 'string' does not name a type
../src/libsass/units.hpp:66:40: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
../src/libsass/units.hpp:66:49: error: 'string' does not name a type
../src/libsass/units.hpp:66:55: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
../src/libsass/units.hpp:69:3: error: expected class-name before '{' token
../src/libsass/units.hpp:72:34: error: expected ')' before 'a'
../src/libsass/units.hpp:87:1: error: expected declaration before '}' token
src/libsass.target.mk:128: recipe for target 'Release/obj.target/libsass/src/libsass/ast.o' failed
make: *** [Release/obj.target/libsass/src/libsass/ast.o] Error 1
make: Leaving directory '/home/admin/src/road-rules-static-website/www/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/admin/src/road-rules-static-website/www/node_modules/node-sass/node_modules/pangyp/lib/build.js:271:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System SunOS 5.11
gyp ERR! command "/opt/local/bin/node" "/home/admin/src/road-rules-static-website/www/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/admin/src/road-rules-static-website/www/node_modules/node-sass
gyp ERR! node -v v0.12.0
gyp ERR! pangyp -v v2.2.1
gyp ERR! not ok
Build failed
npm ERR! SunOS 5.11
npm ERR! argv "/opt/local/bin/node" "/opt/local/bin/npm" "install" "node-sass"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.2.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.2.0 postinstall script 'node scripts/build.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
$ gcc -v
Using built-in specs.
COLLECT_GCC=/opt/local/gcc47/bin/gcc
COLLECT_LTO_WRAPPER=/opt/local/gcc47/libexec/gcc/x86_64-sun-solaris2.11/4.7.3/lto-wrapper
Target: x86_64-sun-solaris2.11
Configured with: ../gcc-4.7.3/configure --enable-languages='c obj-c++ objc go fortran c++' --enable-shared --enable-long-long --with-local-prefix=/opt/local --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/opt/local/lib ' --disable-nls --with-gxx-include-dir=/opt/local/gcc47/include/c++/ --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/opt/local/bin/gas --prefix=/opt/local/gcc47 --build=x86_64-sun-solaris2.11 --host=x86_64-sun-solaris2.11 --infodir=/opt/local/gcc47/info --mandir=/opt/local/gcc47/man
Thread model: posix
gcc version 4.7.3 (GCC)
@saper
Copy link
Member

saper commented Jul 6, 2015

Can you try running env V=1 npm install ?

Can you paste (for example to https://gist.github.com) the output of

g++ -std=c++0x -fexceptions -dM -E -c ast.cpp

@djensen47
Copy link
Author

Where do find ast.cpp?

Do you have a SmartOS instance for testing or is this just happening on my instance(s)?

@saper
Copy link
Member

saper commented Jul 7, 2015

In node_moduless/node-sass/src/libsass

No, we don't have any SmartOS instances running.

@djensen47
Copy link
Author

Do you have VMWare Player? There's a VM you can download for SmartOS or you can start an instance for a couple of hours should cost under well under $1 USD.

I'll run that compiler command now.

@saper
Copy link
Member

saper commented Jul 7, 2015

Thanks, I have tried setting up SmartOS instance on some hosted site but even with my pretty decent Solaris skills it took me too long. If somebody wants to step up and maintain this, we can ship Solaris binaries, no problem.

@bahamat
Copy link

bahamat commented Jul 7, 2015

Do you just need an instance? What do you need on it?

@djensen47
Copy link
Author

I really wish I had the bandwidth to help out but I'm a one person team with already too much on my plate.

On Twitter @bcantrill asked if @jperkin might be able to help out.

@bahamat It sounds like the libsass project needs a community maintainer for SmartOS/Solaris. Since sass is pretty huge in terms of usage, maybe it's a good idea for Joyent to pitch in?

@saper
Copy link
Member

saper commented Jul 7, 2015

Some stuff I'd like to have to support the OS for node-sass: sass/node-sass#981 (comment)

@djensen47
Copy link
Author

Hrmm, I think I have to clone node-sass. When npm install fails, it cleans up the node-sass dir?

@saper
Copy link
Member

saper commented Jul 7, 2015

Yes, when checking out node-sass be sure to checkout git submodules as well (git submodule update --init for example).

You can also try standalone libsass checkout, and follow the standard autoconf procedure.

@djensen47
Copy link
Author

saper added a commit to saper/libsass that referenced this issue Jul 7, 2015
Solaris defines SEC in the global namespace

Fixes: sass#1308
@saper
Copy link
Member

saper commented Jul 7, 2015

@djensen47 can you try #1309?

@djensen47
Copy link
Author

I'll take a look today.

Also, did you see this: https://gist.github.com/jperkin/4b88403da41f556e540d

@saper
Copy link
Member

saper commented Jul 7, 2015 via email

@mgreter
Copy link
Contributor

mgreter commented Jul 7, 2015

Tried to add the suggestion from @djensen47 in b523c9e (also in #1249).

@djensen47
Copy link
Author

No, thank you!

Don't thank me, thank @jperkin 😉

saper added a commit to saper/libsass that referenced this issue Jul 8, 2015
Solaris defines SEC in the global namespace

Fixes: sass#1308
saper added a commit to saper/libsass that referenced this issue Jul 13, 2015
Solaris defines SEC in the global namespace

Fixes: sass#1308
@mgreter
Copy link
Contributor

mgreter commented Jul 14, 2015

Can somebody confirm if commit mgreter@73022b3 in #1330 fixes this issue ❓
This is a minimal hotfix to get this issue closed. Further optimizations may follow ...

@mgreter mgreter added this to the 3.3 milestone Jul 14, 2015
saper added a commit to saper/libsass that referenced this issue Jul 19, 2015
Solaris defines SEC in the global namespace

Fixes: sass#1308
@mgreter
Copy link
Contributor

mgreter commented Jul 26, 2015

IMHO #1367 should fix this for real, since it does not longer export the full std namespace by default.
But we have no access to SUB OS, so we cannot test it ourself!

@saper
Copy link
Member

saper commented Aug 11, 2015

@djensen47 can you check if the current git master compiles?

@xzyfer
Copy link
Contributor

xzyfer commented Aug 18, 2015

Assuming this is fixed by #1310

@saper
Copy link
Member

saper commented Aug 19, 2015

Well, unfortunately it does not. Got my gear running an the ancient Solaris 9 machine and we still fail with gcc 4.9 :(

@jaredmorrow
Copy link
Contributor

I can also confirm this still fails on SmartOS.

@xzyfer
Copy link
Contributor

xzyfer commented Dec 10, 2015

@jaredmorrow which version of libsass were you trying to compile?

@jaredmorrow
Copy link
Contributor

Head of master @b2a3d98ed384d2d19aa79157d08fa21c3e8043e0

@jaredmorrow
Copy link
Contributor

We found a few things and fixed them, but don't know how portable our fixes are

@xzyfer
Copy link
Contributor

xzyfer commented Dec 10, 2015

We'd be open to PRs. If nothing else they might set us on the right track to making a workable fix.

@xzyfer xzyfer reopened this Dec 10, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Dec 10, 2015

The core issue for us is that we have no way to test SmartOS so regressions happen frequently.
If you know of way to have a Travis CI like solution for SmartOS we'd love integrate it.

@jaredmorrow
Copy link
Contributor

Yeah, I'll get you a PR in the next 10 min hopefully, just retracing our steps.

@jaredmorrow
Copy link
Contributor

I understand the pain of keeping up with the integration tests. Having a Solaris or BSD handy is pretty hard for every library maintainer.

@xzyfer
Copy link
Contributor

xzyfer commented Dec 10, 2015

Thanks.

It's largely due to the barrier of testing on those systems. A lot of projects are beholden to online solutions like Travis and Circle. They do allow you to bring your own agents (machines) but that requires a sponsor to host and maintain that machine. If someone was invested enough in those OS to help out in that way we'd love to support it officially.

@jaredmorrow
Copy link
Contributor

Totally understand, as the packager of Riak once-upon-a-time, I had to run 16 VMs for our own internal build service since no online/service came close to providing all the things we needed. For anything short of a company-sponsored, for-pay product (like RIak), it is overkill to do the same.

@jaredmorrow
Copy link
Contributor

@xzyfer PR #1782 fixes it for us, but we weren't too sure what was going on in those enum's that required the #undef

@xzyfer
Copy link
Contributor

xzyfer commented Dec 28, 2015

Fixed by #1782. This will be in 3.3.3. Subscribe to #1808 for updates on that release.

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

6 participants