-
Notifications
You must be signed in to change notification settings - Fork 463
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
Build: Compile with dietlibc (dependency-free) #782
Comments
Since |
Also, you should remember to use
Or it fails because there's no C++ library:
Distro packages would be built against the standard libraries in the distro, so using |
Hi @QuLogic. Thanks for the info! 👍
This makes perfect sense. I was afraid of the same thing. :) But according to ldd, part of the dynamic lib depends on GLIBC (which is one of two issues described here: sass/node-sass#517). Wouldn't using dietlibc fix the libc dependency bit? For distro releases I agree, it would make more sense to compile against the standard libc. |
I don't think this is something we want to include in our build scripts. But I also don't see the actual problem. Is there a problem when building with autotools? If you like you may add a chapter to the Building Wiki about how to build libsass against dietlibc, but I do not really see the reason for this, as IMO
|
But I agree with @mgreter; I'm not sure there's any need to be putting anything in libsass itself. You could just set the |
True. I think we should stick with the current approach: compile our binding with oldest GCC and Glibc, which does not require altering the libsass code. That is probably GCC 4.5.4 and GlibC 2.12. :) Thanks for curing my curiosity! 😃 👍 |
(Based on @aredridel's suggestions via IRC channel)
With @mgreter's help, we are able to succeed in building cross-distribution binaries: sass/node-sass#517. But undoubtedly, that was a painful process, as eventually we had to alter to code to build with GCC 4.4.7 and glibc 2.12. Moving forward, this might not be feasible solution (to change the code each time before the release).
Here is one proposal to make the libsass build promising (which we may consume as is -- compiled form -- via node-sass).
Using dietlibc:
If libsass incorporates dietlibc (instead of OOTB glibc) in its build script; Makefile (
CC = "diet gcc -nostdinc"
, more info here), we can deliver an unbiased, dependency-free libsass binary for Linux, ready to distribute to masses! With that, we will set our binding.gyp, to produce the Makefile with similar configurations.Points to ponder:
- Since libsass consumes both C and C++ features, would dietlib suffice to render it dependency-free? - Would this also help in future plans for distro package (https://github.com//issues/757) and libsass.so.\* releases?Footnote: I am able to compile libsass with dietlibc, but
ldd
showslibc.so.6
as dependency (hence a failed attempt?)The text was updated successfully, but these errors were encountered: