-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
var arguments = [ | ||
path.join('node_modules', 'pangyp', 'bin', 'node-gyp'), | ||
'rebuild', | ||
[ '-PKGCONFIG=', process.env.PKGCONFIG || 'NO' ].join(""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single quotes in join('')
.
}] | ||
[ 'PKGCONFIG == "YES"', { | ||
'cc_flags': [ | ||
'<!(pkg-config --cflags libsass)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation check.
af1eab7
to
8c9399d
Compare
Thanks for the contribution. 👌 I think, we can use Also, in JS code, you can just check the presence of @mgreter, do we already have RPM packages available for RH distros? Any thoughts about this PR? |
I also wonder whether to have another switch to link external static Don't have Windows running right now, can you check the build? I am not sure about this
in |
We can probably have Windows CI (AppVeyor) is also configured. The jobs are running at https://ci.appveyor.com/project/sass/node-sass/build/719 (their free package is slower than a tortoise, so we check back after an hour or so). Also, it will show that it fails some tests (due to the timeout issue), but the only thing that matters is it builds and start running tests. |
AppVeyor is fine. (ignore the io.js job as well -- the last one -- that is due to nodejs/node#751). |
Regarding |
You are right, let's drop the prefix as it generates What about this: Variable
Variable
For http://github.com/sass/node-sass-binaries binary building I will be using |
This is a sound idea. I think we can try it for beta and see the reaction from masses. :) |
478b2b3
to
19a36b4
Compare
I have given up on |
Re "": too much python recently, sorry. I decided to lowercase gyp variables because the convention there is that uppercase are only pre-defined variables (like |
61f8535
to
b5075f0
Compare
Use environment variables to control how libsass is linked: LIBSASS_EXT variable empty or unset Build a bundled libsass source (from src/libsass). This is the default. LIBSASS_EXT=auto libsass is located using pkg-config and linked dynamically LIBSASS_EXT=yes LIBSASS_CFLAGS= compiler flags LIBSASS_LDFLAGS= linker flags LIBSASS_LIBRARY= library to link Link libsass manually, by adding compiler and linker flags. For example this way libsass can be linked in statically (on Unix): LIBSASS_EXT=yes LIBSASS_CFLAGS=-I/usr/local/include LIBSASS_LIBRARY=/usr/local/lib/libsass.a When using LIBSASS_EXT there is no need to checkout the libsass source into src/libsass submodule and the library from the package management system can be used. PR: sass#139 PR: sass#389 PR: sass#744
Thanks! |
LGTM! BTW, I am going forward with //cc @xzyfer |
👍
|
Thanks! This is great. I have run into tiny issue that prevents me from doing
without In short: I think we should check the binary first if it is already there and then proceed with download/rebuild. What do you think? Is it worth opening another PR? |
@saper, I think we don't have this feature at all:
If you are thinking about a use-case, like we can install Ruby's gem locally (from a |
I was thinking on using the same test as we do now to check the downloaded binary (as a quick test). But actually I think we should sign binaries and verify that. |
🎉 There are number of features we need to implement for LibSass v3.2.0. Once we get stable again, we can continue enhancing the build aspect of node-sass. |
@saper Is there a trick to getting |
Currently we have an old libsass in the ports. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198489 proposes an upgrade to 3.1.0. Besides, you need to call something like
In this case it builds and not just fetches the binary. I have so half-working node-sass port that is doing this. |
@saper, based on the FreeBSD bug, please see this conversation (till end): sass/libsass#382 (comment). Which means that long standing Perhaps Docker is the answer for FreeBSD ports as well, if the binaries built against old FreeBSD are forward compatible, then find a oldest-possible version of FreeBSD in docker contribs with has GCC 4.7.x support. |
I think even gcc 4.6 worked for me. It would have helped if libsass compiled with gcc 4.2 :) but really instead of Docker we just could have invoked On a FreeBSD system many compiler versions can live in parallel (system gcc42 or clang, gcc46, 47, 49, 5...), so for that particular problem we don't need docker or jails. |
This is awesome! We also have plans to release v3 binaries for Solaris. Hopefully they have the similar toolchians available . BTW, is |
Unfortunately, this is causing issues with npm install: #780 (comment).
It builds only libsass, because npm publish ignores both binding.gyp as well as libsass.gyp, if you have more than one gyp defined in package.json (like we have now). Apparently, npm does not allow to have more than one gyp file. Although it is not explicitly clear in docs, but it does mention "a .gyp file": https://docs.npmjs.com/misc/scripts. Also, I can't find a reference, if someone has tried this kind of thing before: separating C++ libs within node.js module and having multiple gyp files in node.js project. Nevertheless, it would be an interesting issue to open with https://github.com/npm/npm repo. If this is only concerning the Otherwise we would need to revert this back.. |
The problem is that we are not using a built-in npm facitlity to build bindings via gyp files directly - because we are using But I think that d89b901 solves the original problem. Those two .gyp files are chained together if necessary. I have built a pretty nice |
Which is because io.js is not supported by node-gyp yet.
I am all for such a tweak which we can handle at our part, rather shifting the problem to the consumer domain.
Actually it did not solved any problem, but presented another flavour of same problem.
That is all good stuff. We are fixing that issue differently using newer compiler with older glibc. But all that is besides the point. If npm publish is not equipped for handing multiple gyp files, any such cool fancy feature would have to wait unless this limitation is lifted. To recap: For right now, I am reverting this back for 3.0 beta and hoping it to come back as soon we have publishable solution ready. |
Minor cleanup; removing redundant headers from `.cpp` files.
Can you show me how to reproduce this? Nothing in the |
If
LIBSASS_EXT
is set toauto
in the procesenvironment, use pkg-config to locate
system libsass to be linked.
This way there is no need to checkout
a src/libsass submodule at all and
the library from the package management
system can be used.
Otherwise fallback to the bundled libsass.
By default, use the bundled library.
PR: #139
PR: #389
PR: #744