Giter Club home page Giter Club logo

Comments (25)

akhleung avatar akhleung commented on August 26, 2024

Not sure what the problem is yet. I'll be spending the next day or two working on cross-platform building.

from sassc.

tkellen avatar tkellen commented on August 26, 2024

Heya Aaron, did you have any luck?

from sassc.

akhleung avatar akhleung commented on August 26, 2024

Sorry, I don't have a Windows machine to develop on. I'll ask one of my colleagues who's recently been doing some Windows development. Sorry for the delay!

from sassc.

QuLogic avatar QuLogic commented on August 26, 2024

I think this may be caused by using the C++-ism of defining variables wherever you like. If you add struct sass_file_context* ctx; as the first line and change line 11 to remove the type (so it's just ctx = sass_new_file_context();), then I think that should fix it.

from sassc.

goodtimeaj avatar goodtimeaj commented on August 26, 2024

I'm attempting to compile sassc on Windows via cygwin. Has anyone done this? I'm getting undefined reference errors.

Capture

from sassc.

akhleung avatar akhleung commented on August 26, 2024

I might as well ask the obvious: did you remember to pull in the libsass submodule?

from sassc.

goodtimeaj avatar goodtimeaj commented on August 26, 2024

Yes, the submodule is there inside the libsass dir. Is that what the error indicates? I am using cygwin but of course it's Windows and I noticed the paths in Makefile are using a forward slash. Also, the Makefile in libass/Makefile references "usr/local". Do you think this is a problem with the paths or is there some underlying problem with the compiler on Windows. Am I taking the wrong direction with using cygwin? If anyone has the latest compiled binary for sassc on Windows, please contact me.

from sassc.

akhleung avatar akhleung commented on August 26, 2024

Some of my colleagues have used MinGW to compile a number of libraries on Windows (including LibSass, but not SassC). Maybe give that a try?

Sorry about not having better Windows support -- I don't have much experience with that platform!

from sassc.

goodtimeaj avatar goodtimeaj commented on August 26, 2024

I tried that too but got more errors - I'll try editing the paths. Still looking for anyone that can send me a compiled binary for Windows. Thanks, Aaron.

from sassc.

SamHasler avatar SamHasler commented on August 26, 2024

I have sassc successfully compiling on windows under msysGit. I had to download a couple of commands that weren't in msysGit but it works well enough.

from sassc.

QuLogic avatar QuLogic commented on August 26, 2024

@gregstallings: The sassc executable lives in the bin/ subdirectory. make sassc will attempt to compile sassc from sassc.o using a builtin rule and not anything in the Makefile. You need to do make bin/sassc or just plain make.

from sassc.

goodtimeaj avatar goodtimeaj commented on August 26, 2024

@SamHasler glad to hear msysgit worked. I'll try that.

from sassc.

normadize avatar normadize commented on August 26, 2024

I believe sassc has the potential of making SASS a lot more popular. The majority of people I know, especially the ones on Windows, are put off by SASS just because of Ruby alone. Even though I'm a dev myself, I also refuse to install Ruby just for SASS so I'm trying to get sassc to work on Windows.

I successfully compiled sassc on all of these: MinGW, Cygwin and MsysGit. The keyword here is compiled because they fail on syntax errors in the .scss file. Only the MsysGit (with some precaution) worked for me.

Note that it is of interest for sassc to also work if executed from outside these environments, i.e. from a raw Windows console or when called externally by an IDE. In that case, either place sassc.exe in the bin directory of those environments (next to required DLLs) or include those bin folders in PATH. Regardless of how I tried it, the MinGW and Cygwin compiled binaries still failed as per below.

MinGW: If there is any syntax error in the .scss file, then sassc.exe crashes spectacularly and outputs nothing about the .scss syntax error or line number, like the Linux version does. See screenshot:

https://www.dropbox.com/s/93tnih5wy468kit/screen-20130310-001.png

This happens both if the bin mingw folder is in PATH (the std C DLL is needed) or if the sassc binary is copied in the bin folder.

This is odd since MsysGit (which works, see below) also uses MinGW, but an older version of it. The minGW distro I'm usin gis based on gcc 4.7.2 while MsysGit is using MinGW based on gcc 4.4.0.

Cygwin: The Cygwin binary is less spectacular but not much more helpful. It crashes in the console, not with a pop-up window, but still nothing about the .scss having syntax errors:

bin\sassc.exe style.scss
Aborted (core dumped)

Again, it didn't matter if the Cygwin bin was in PATH or if the sassc binary was copied in bin or whether it was executed from within Cygwin's bash or externally (I need it inside my IDE so Cygwin bash is not an option for me anyway).

MsysGit. This is the only one that worked fine, provided I removed all bin folders of MinGW or Cygwin from PATH (which in my case created conflicts). If you take care of that, then it works fine:

$ bin\sassc style.scss 
ERROR -- style.scss:46: body for mixin asdas must begin with a '{'

MsysGit also embeds all libraries in the sassc binary so you don't need to carry the std C DLL with it or to place sassc in some folder where it exists ... but this is just a matter of configuring the compiler and linker options.

Linux: On Linux, sassc works just fine:

$ ~/sassc/bin/sassc style.scss 
ERROR -- style.scss:46: body for mixin asdas must begin with a '{'

Hopefully this helps other people .. this was the first thread I got in Google when searching about compiling sassc on Windows.

from sassc.

QuLogic avatar QuLogic commented on August 26, 2024

This happens both if the bin mingw folder is in PATH (the std C DLL is needed) or if the sassc binary is copied in the bin folder.
Again, it didn't matter if the Cygwin bin was in PATH or if the sassc binary was copied in bin or whether it was executed from within Cygwin's bash or externally (I need it inside my IDE so Cygwin bash is not an option for me anyway).
MsysGit also embeds all libraries in the sassc binary so you don't need to carry the std C DLL with it or to place sassc in some folder where it exists ... but this is just a matter of configuring the compiler and linker options.

Given that you need to mess with the PATH and you seem to have all three of Mingw, Cygwin, and MsysGit installed, it seems very much like you've compiled against one set of DLLs and ran with a different set. Especially since you say MsysGit links things statically and it works.

I would get each of them to compile statically. Or fix up the PATH and such so that only one of them could ever conceivably be used at one time before compiling at all.

from sassc.

normadize avatar normadize commented on August 26, 2024

Of course I took care to compile individually with no conflicts -- PATH was cleaned before compiling in each. I was talking about what to do with the executable afterwards (Cygwin and MinGW need the msys and stdC DLLs). What I posted above holds, at least for me, you can try it. I could only get the MsysGit version to run correctly.

from sassc.

georgiosd avatar georgiosd commented on August 26, 2024

I can confirm that compilation on Windows with msysgit (full 1.9.3) works as simple as fetching the repo and doing "make"

from sassc.

HamptonMakes avatar HamptonMakes commented on August 26, 2024

So sassc itself isn't meant for windows, as it's a unix command line util
wrapper. libsass itself does compile on windows. Node-sass doesn't use
sassc and is a wrapper on libsass. See if you can compile libsass by itself
on windows...

On Thursday, June 27, 2013, Georgios Diamantopoulos wrote:

I can confirm that compilation on Windows with msysgit (full 1.9.3) works
as simple as fetching the repo and doing "make"


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-20104360
.

from sassc.

georgiosd avatar georgiosd commented on August 26, 2024

It compiles ok for this guy: https://github.com/TBAPI-0KA/NSass
On this occasion I needed an executable compiler instead of a library

from sassc.

am11 avatar am11 commented on August 26, 2024

Compiling current libsass with VS2013 Update 3 (express, professional etc.) is possible. This is how node-sass' build system is configured (using node-gyp, which uses VS2013). For sassc, it would require two safe guard header.

Perhaps you can find the .vcxproj file useful: https://github.com/darrenkopp/libsass-net/tree/master/libsass.

Also, see this discussion: sass/libsass-net@94abbd7#commitcomment-8333599.

(this repository can have either nmake or vcxproj file of its own, to make it easy to compile with MSVCR's cl.exe)

from sassc.

am11 avatar am11 commented on August 26, 2024

Guys take a look at https://github.com/darrenkopp/sassc-win/.

There we have VS2013 solution for sassc and libsass.

Also appveyor is configured to run sass-specs tests on Windows via sassc-win: https://ci.appveyor.com/project/darrenkopp/sassc-win/. Comparing with Travis-ci, the results are ditto at the moment. :)

from sassc.

hon2a avatar hon2a commented on August 26, 2024

Compilation on Windows fails for me as well. I tried to use this instead of Ruby+Sass to avoid the need for Ruby. I compiled it in current MinGW (GCC 4.8.1; had to change -std=c++0x to -std=gnu++0x in libsass makefile) and wrote a shell-script adapter to translate command-line parameters from original Sass syntax. Then I found it to fail spectacularly, as described above (crashes with This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. text & popup).

I've got no more time for experimentation, so I'm installing Ruby. Pity.

from sassc.

am11 avatar am11 commented on August 26, 2024

BTW, to build libsass on WindOS, you don't need CYGWIN or MinGW. VS' free community version (for OSS devs) will do the job. Please see this: sass/libsass#648 (comment).

from sassc.

hon2a avatar hon2a commented on August 26, 2024

@am11 If I'm to choose between installing Visual Studio and installing Ruby, I think I'm gonna go with Ruby :)

from sassc.

am11 avatar am11 commented on August 26, 2024

Considering libsass has performance edge over Ruby sass, someone might go with different route here. :)

from sassc.

mgreter avatar mgreter commented on August 26, 2024

Closing this since we now have appveyor testing the build via mingw and visual studio 2013 on windows!

from sassc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.