Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

861
Views
Error al instalar sassc, el compilador clang no es compatible con '-march=native', M1

Usando la máquina Apple Silicon M1. Intentando instalar ruby gem gem install sassc -v '2.1.0' .

El problema es que el compilador clang aún no tiene el indicador 'nativo' para Apple M1. Relacionados

Error dado: (nota que reemplacé mi nombre con 'tunombreaquí')

 Fetching sassc 2.1.0 Installing sassc 2.1.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/sassc-2.1.0/ext /Users/yournamehere/.asdf/installs/ruby/2.7.2/bin/ruby -I /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/2.7.0 -r ./siteconf20210303-14183-1uwhwj4.rb extconf.rb creating Makefile current directory: /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/sassc-2.1.0/ext make "DESTDIR=" clean current directory: /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/sassc-2.1.0/ext make "DESTDIR=" compiling ./libsass/src/units.cpp clang: error: the clang compiler does not support '-march=native' make: *** [units.o] Error 1 make failed, exit code 2 Gem files will remain installed in /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/sassc-2.1.0 for inspection. Results logged to /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/extensions/arm64-darwin-20/2.7.0/sassc-2.1.0/gem_make.out An error occurred while installing sassc (2.1.0), and Bundler cannot continue. Make sure that `gem install sassc -v '2.1.0' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: sassc-rails was resolved to 2.1.2, which depends on sassc
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Podemos instalar manualmente la gema sin esa bandera. Primero encuentre dónde está al acecho la gema, mirando el error completo, esta es la línea que queremos:

 Gem files will remain installed in /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/sassc-2.1.0 for inspection.

Así que naveguemos allí en la terminal. Ejecutaremos comandos futuros desde esta carpeta hasta que cd de allí.

 cd /Users/yournamehere/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/sassc-2.1.0

Busque en el directorio march=native usando ripgrep o algo así. Tal como dice el mensaje de error completo, está en ext/Makefile . En este Makefile en particular, hay dos lugares donde hay una línea con march=native .

 87 CFLAGS = $(CCDLFLAGS) $(cflags) -fno-common -pipe -march=native -mtune=native -flto -DLIBSASS_VERSION='"3.6.1"' $(ARCH_FLAG) ... 91 CXXFLAGS = $(CCDLFLAGS) -g -O2 -std=c++11 -march=native -mtune=native -flto -DLIBSASS_VERSION='"3.6.1"' $(ARCH_FLAG)

Recorte la march=native de todas las líneas. Guarde y cierre el archivo. Ahora queremos construir la gema.

 gem build sassc.gemspec

Esto creará sassc-2.1.0.gem . NO intente instalarlo desde aquí, este directorio se sobrescribe. Vamos a copiarlo en la carpeta Descargas (o en algún otro lugar).

 mkdir ~/Downloads/sassc cp -r . ~/Downloads/sassc

Ahora navegue de regreso a su carpeta de inicio donde tenía problemas para instalar sassc.

 cd ~/work/projecty_mc_project_face

Ahora instálelo desde su gema gratuita March march=native Native construida localmente

 gem install --local ~/Downloads/sassc/sassc-2.1.0.gem

Y debería funcionar

 > gem install --local ~/Downloads/sassc/sassc-2.1.0.gem Building native extensions. This could take a while... Successfully installed sassc-2.1.0 Parsing documentation for sassc-2.1.0 Installing ri documentation for sassc-2.1.0 Done installing documentation for sassc after 0 seconds 1 gem installed

ACTUALIZACIÓN : aunque el enfoque anterior le permite agrupar la instalación, cualquier código que realmente use sassc genera un error:

 LoadError: cannot load such file -- sassc
over 4 years ago · Santiago Trujillo Report

0

Esto lo resolvió para mí:

 bundle update sassc
over 4 years ago · Santiago Trujillo Report

0

De acuerdo con esta respuesta en sassc-ruby, esta bandera funcionó para mí como una solución actual:

 gem install sassc -- --disable-march-tune-native
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!