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

Windows? #18

Closed
someone29926 opened this issue Aug 13, 2015 · 8 comments · Fixed by #96
Closed

Windows? #18

someone29926 opened this issue Aug 13, 2015 · 8 comments · Fixed by #96

Comments

@someone29926
Copy link

Coincidentally the gem seems to install just fine however when I actually try to use it as a drop-in replacement for sass-rails I get the following upon trying to start a Rails server:

Uncaught exception: Could not open library 'C:/tools/ruby21/lib/ruby/gems/2.1.0/gems/sassc-1.6.0/ext/libsass/lib/libsass.so': The specified module could not be found.

Thoughts?

@bolandrm
Copy link
Member

I have not done any development on Windows.

I believe in order to support Windows, we'd need to swap the occurrences of .so with .dll if the user is on a windows platform.

@huangyq23
Copy link

Do we have any plan of switching to a rake-compiler solution so that we can have pre-compiled gem for different platforms?

@johnnyshields
Copy link

👍 for rake-compiler. It should not be too difficult to setup.

@Coridyn
Copy link
Contributor

Coridyn commented Dec 14, 2015

Just encountered the same error on Windows.

I fixed the problem by editing the libsass Makefile and forcing libgcc to be statically linked.

Change all of these variables to 1:

    STATIC_ALL       ?= 1
    STATIC_LIBGCC    ?= 1
    STATIC_LIBSTDCPP ?= 1

Once that's changed and recompiled then Windows can load the .so file fine - no need to swap to loading the .dll.

I found the answer in this old ruby-ffi post - statically linking the dependency sorts it out.

@johnnyshields
Copy link

@Coridyn it looks like this is already being done on Windows, see this line:

# enable mandatory flag
ifeq (MinGW,$(UNAME))

@Coridyn
Copy link
Contributor

Coridyn commented Dec 14, 2015

In that case it looks like the UNAME check needs to be swapped so MinGW takes precedence over Windows:

ifneq (,$(findstring /cygdrive/,$(PATH)))
    UNAME := Cygwin
else
    ifneq (,$(findstring WINDOWS,$(PATH)))
        UNAME := Windows
    else
        ifneq (,$(findstring mingw32,$(MAKE)))
            UNAME := MinGW
        else
            ifneq (,$(findstring MINGW32,$(shell uname -s)))
                UNAME = MinGW
            else
                UNAME := $(shell uname -s)
            endif
        endif
    endif
endif

On my machine UNAME ends up with the value Windows so it tries to build a dynamic instead of a static library.

@johnnyshields
Copy link

Should raise this on Libsass library

@schneems
Copy link

Wanted to chime in here, the Sprockets sassc integration is failing on Windows: rails/sprockets#349

I dug in and found one obvious place that needs to be fixed. The path separators is different in different operating systems schneems#1 I believe there need to be changes made to the C code but i'm not as familiar there, maybe if someone can point out where we're splitting out the path again that would be great.

I'm working on a windows VM right now, ideally once we get windows working it would be great to get Appveyor set up to run tests and let us know about any failures.

glebm added a commit to glebm/sassc-ruby that referenced this issue Nov 17, 2018
Updates libsass to master ([d225a09a](https://github.com/sass/libsass/tree/d225a09a152050d569c077f97bb944c8dc819d6f)) to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue Nov 17, 2018
Updates libsass to master ([d225a09a](https://github.com/sass/libsass/tree/d225a09a152050d569c077f97bb944c8dc819d6f)) to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
michael-gillett pushed a commit to michael-gillett/sassc-ruby that referenced this issue Apr 25, 2019
ACT-438: make spec correct and make urls longer than 255 chars
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 5, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 8, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 8, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 8, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
glebm added a commit to glebm/sassc-ruby that referenced this issue May 8, 2019
Updates libsass to master to incorporate fixes for:

1. The :not selector. Fixes sass#91. sass/libsass#2697
2. Default precision changed to 10. sass/libsass#2716
3. Now builds with `cc` instead of hard-coding `gcc`. sass/libsass#2707
4. Building on Linux and Solaris. sass/libsass#2720

Also:
1. Adds Windows RubyInstaller compilation support via `rake-compiler`. Fixes sass#18.
2. Fixes `load_paths` separator on Windows. Fixes sass#93.
3. Changes the location of `libsass.so` from `ext/` to `lib/`. Fixes sass#95.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants