-
Notifications
You must be signed in to change notification settings - Fork 157
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
Saasc 2.4.0 installation error - #include <vector> #225
Comments
I'm not familiar with the Mac ecosystem, but the error is definitely related to their specific compiler. Maybe they need some special build flags or the compiler version is simply outdated. Try to use a different one if possible. |
Getting the same error on Debian running in WSL. My error:
It was building fine on Rails |
Alright, it was pretty easy to solve. If someone stumbles upon this, just run |
I got the same error with:
Fetching gem metadata from https://rubygems.org/.........
Installing sassc 2.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/thaidang/.rvm/gems/ruby-3.1.2@sia/gems/sassc-2.4.0/ext
/Users/thaidang/.rvm/rubies/ruby-3.1.2/bin/ruby extconf.rb
creating Makefile
current directory: /Users/thaidang/.rvm/gems/ruby-3.1.2@sia/gems/sassc-2.4.0/ext
make DESTDIR\= sitearchdir\=./.gem.20240927-12423-ir9f8b sitelibdir\=./.gem.20240927-12423-ir9f8b clean
current directory: /Users/thaidang/.rvm/gems/ruby-3.1.2@sia/gems/sassc-2.4.0/ext
make DESTDIR\= sitearchdir\=./.gem.20240927-12423-ir9f8b sitelibdir\=./.gem.20240927-12423-ir9f8b
compiling ./libsass/src/ast.cpp
In file included from ./libsass/src/ast.cpp:3:
In file included from ./libsass/src/sass.hpp:55:
In file included from ./libsass/src/memory.hpp:8:
./libsass/src/memory/allocator.hpp:8:10: fatal error: 'vector' file not found
8 | #include <vector>
| ^~~~~~~~
1 error generated.
make: *** [ast.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/thaidang/.rvm/gems/ruby-3.1.2@sia/gems/sassc-2.4.0 for inspection.
Results logged to /Users/thaidang/.rvm/gems/ruby-3.1.2@sia/extensions/arm64-darwin-23/3.1.0/sassc-2.4.0/gem_make.out |
same here. Did you find any fix @dangquangthai ? |
@AJ-Ayush I resolved this by deleting the directory |
My issue was with how ruby was built when installing it with asdf. Two different versions of ruby had different output for compilers: # ruby 3.3.3 compiler check
ruby -rrbconfig -e'p RbConfig::CONFIG["CC"]' -e'p RbConfig::CONFIG["CXX"]'
"usr/bin/clang"
"false" # ruby 3.3.4 compiler check
ruby -rrbconfig -e'p RbConfig::CONFIG["CC"]' -e'p RbConfig::CONFIG["CXX"]'
"clang"
"clang++" After some searching I came across ruby-build, which is used by asdf uninstall ruby 3.3.3
CC="clang" CXX="clang++" asdf install ruby 3.3.3 After that I am not sure how this works with different ruby managers like |
This also works for me, thanks. 🙏🏾 And installation via rbenv is as same as asdf (rbenv uses ruby-build to install specific version ruby too). |
@crnastena Do you know what the equivalent would be for |
@shellandbull RVM seems to provide the |
This fixed for me. Though I did:
|
I had the following situation
This fix but without
|
Hi, when I try to do
bundle install
this dependency is unable to be installed. How can I solve this issue?OS:
macOS Big Sur v11.5.2
Ruby version:
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-darwin20]
Rails version:
5.2.6
Thanks in advance for the help. Let me know if you need more information.
The text was updated successfully, but these errors were encountered: