-
Notifications
You must be signed in to change notification settings - Fork 467
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
Incorrectly building dynamic library on Windows #1790
Comments
The logic in https://github.com/sass/libsass/blob/3.3.2/Makefile#L24 seems to be pretty unreliable to me. I was only using Visual Studio to build libsass, so I didn't check that. @Coridyn are you using MinGW 64 to build? What is the value of |
I'm using MinGW32 from the ruby devkit environment (Ruby 2.2.3p173 with DevKit mingw64-32-4.7.2). I don't think it's that though - the first check for Windows is matching so it doesn't fall through to the MinGW cases at all. Line 23 of the Makefile has the Windows check: ifneq (,$(findstring WINDOWS,$(PATH)))
# Matches here because "WINDOWS" is in the PATH variable
UNAME := Windows
else
# Doesn't get here because it's already detected as "Windows"
ifneq (,$(findstring mingw32,$(MAKE)))
UNAME := MinGW
else
# This `uname` check would work if it reached this far.
ifneq (,$(findstring MINGW32,$(shell uname -s)))
UNAME = MinGW
else
UNAME := $(shell uname -s)
endif
endif
endif |
Perhaps Windows should be detected with: // source: http://stackoverflow.com/a/12099167/863980
ifeq ($(OS),Windows_NT)
// Windows
else
// Unix
end |
I don't really know what this check is for. Visual Studio will not use that Makefile, you rule out cygwin earlier, is this a fallback case for "neither VS, nor cygwin, nor MinGW"? I think we should just remove this check. |
The compiler is not the important part here, but the used make utility and the shell. I think I have once tested it with: mingw32-make, make and dmake. Either in cmd.com, msys and cygwin shell. Finally compiler can also differ from native gcc on windows via cygwin, mingw32, clang, etc. I tried to apply some educated guesses what to expect under which circumstances. I suspect that this removal may be the culprit here. But it was probably removed because it broke something else. Maybe we just need to change the order of the detection. We will not be able to support all combinations with one native makefile. For that reason we also provide autotools build files, which can be used via cygwin (although cmake would be nicer on the windows side). |
Should hopefully be fixed by #1882 |
I merged #1882, please re-open if problem persists. |
In the Makefile on Windows the
UNAME
variable gets the valueWindows
instead ofMinGW
This causes the MinGW library check to fail and it builds a dynamic library on windows instead of a static lib:
Related to this issue: sass/sassc-ruby#18
The text was updated successfully, but these errors were encountered: