xoofx / SharpScss

A portable cross-platform pinvoke .NET wrapper around libsass to convert SCSS to CSS
BSD 2-Clause "Simplified" License
55 stars 10 forks source link

Arm64 Support #19

Open argentini opened 2 years ago

argentini commented 2 years ago

Are there plans for Arm64 support (e.g. Apple Silicon)?

xoofx commented 2 years ago

Unlikely before GitHub actions support it for their virtual environments.

saxx commented 2 years ago

Is there any way to get SharpScss running on an M1 Mac (with .NET 6 for ARM)? It seems I cannot get past this error:

System.DllNotFoundException: Unable to load shared library 'libsass' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibsass, 0x0001): tried: 'liblibsass' (no such file), '/usr/local/lib/liblibsass' (no such file), '/usr/lib/liblibsass' (no such file), '/Users/hannes/Projects/Igevia/src/backend/liblibsass' (no such file), '/usr/local/lib/liblibsass' (no such file), '/usr/lib/liblibsass' (no such file)
saxx commented 2 years ago

Follow-Up on my last post: I got it running on an M1 Mac (.NET 6 for ARM) by downloading the latest libsass version via homebrew, then I dropped the libsass.dylib from the homebrew directory into the bin directory of my application.

SharpScss works now :) This is in no way ideal, but at least it's running for now. Thank you for this great library.

danroot commented 2 years ago

Ran into this just now and was stumped. Thanks to @saxx I was able to do this to resolve for now:

brew install libsass
cp /opt/homebrew/Cellar/libsass/3.6.5/lib/libsass.dylib ./bin/Debug/net6.0/libsass.dylib

I'll probably add to my .net code to do this automatically if in an ARM environment.

I second a switch to dartsass or some other cross-platform sass engine that can "just work" Mac M1/M2 (or conceivably other ARM environments).