You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to TruffleRuby out on my local machine for my project.
but it failed to bundle install on several gem's that requires native extension, one of them being sassc which sassc-rails was depending on.
Unrelated Question: I have other two errors on building native extension for gem eventmachine and unf_ext should i also open issue here?
Hope this is helpful,
Di
My Environment:
MacOS 11.3.1 Big Sur (13 inch 2017 Macbook Pro) 16GB RAM
rails v5.2.5
truffleruby 21.2.0-dev-a28e3da1, like ruby 2.7.3, GraalVM CE Native [x86_64-darwin]
Error Output:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/gems/gems/sassc-2.4.0/ext
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/bin/truffleruby -I /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/mri -r ./siteconf20210519-44795-5t50r5.rb
extconf.rb
creating Makefile
current directory: /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/gems/gems/sassc-2.4.0/ext
make "DESTDIR=" clean
current directory: /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/gems/gems/sassc-2.4.0/ext
make "DESTDIR="
compiling ./libsass/src/ast.cpp
In file included from ./libsass/src/ast.cpp:3:
In file included from ./libsass/src/sass.hpp:52:
./libsass/include/sass/base.h:76:40: error: unknown type name 'size_t'
ADDAPI void* ADDCALL sass_alloc_memory(size_t size);
^
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:
In file included from ./libsass/src/memory/allocator.hpp:6:
./libsass/src/memory/../MurmurHash2.hpp:32:8: error: unknown type name 'uint32_t'
inline uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed )
^
./libsass/src/memory/../MurmurHash2.hpp:32:58: error: unknown type name 'uint32_t'
inline uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed )
^
./libsass/src/memory/../MurmurHash2.hpp:37:9: error: unknown type name 'uint32_t'
const uint32_t m = 0x5bd1e995;
^
./libsass/src/memory/../MurmurHash2.hpp:42:3: error: unknown type name 'uint32_t'
uint32_t h = seed ^ len;
^
./libsass/src/memory/../MurmurHash2.hpp:50:5: error: unknown type name 'uint32_t'
uint32_t k = *(uint32_t*)data;
^
./libsass/src/memory/../MurmurHash2.hpp:50:20: error: use of undeclared identifier 'uint32_t'
uint32_t k = *(uint32_t*)data;
^
./libsass/src/memory/../MurmurHash2.hpp:50:29: error: expected expression
uint32_t k = *(uint32_t*)data;
^
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:
In file included from ./libsass/src/memory/allocator.hpp:8:
In file included from /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/vector:273:
In file included from /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/iosfwd:95:
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:136:77: error: use of undeclared identifier 'wcschr'
wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:143:87: error: use of undeclared identifier 'wcspbrk'
wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:150:78: error: use of undeclared identifier 'wcsrchr'; did you mean
'wcschr'?
wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:138:16: note: 'wcschr' declared here
const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:157:86: error: use of undeclared identifier 'wcsstr'; did you mean
'wcschr'?
wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:140:16: note: 'wcschr' declared here
wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:157:86: error: no matching functionfor call to 'wcschr'
wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:140:16: note: candidate disabled: <no message provided>
wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:157:93: error: cannot initialize a parameter of type'wchar_t *' with
an lvalue of type'const wchar_t *'
wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
^~~~
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:140:38: note: passing argument to parameter '__s' here
wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:164:60: error: unknown type name 'size_t'
wchar_t* __libcpp_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return (wchar_t*)wmemchr(__s, __c, __n);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:166:57: error: unknown type name 'size_t'
const wchar_t* wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/wchar.h:168:57: error: unknown type name 'size_t'
wchar_t* wmemchr( wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
^
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:
In file included from ./libsass/src/memory/allocator.hpp:8:
In file included from /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/vector:273:
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/iosfwd:189:14: error: use of undeclared identifier 'mbstate_t'
typedef fpos<mbstate_t> streampos;
^
/Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/llvm-toolchain/bin/../include/c++/v1/iosfwd:190:14: error: use of undeclared identifier 'mbstate_t'
typedef fpos<mbstate_t> wstreampos;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [ast.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/gems/gems/sassc-2.4.0 for inspection.
Results logged to /Users/scouttalent2/.rbenv/versions/truffleruby-dev/lib/gems/extensions/x86_64-darwin/2.7.3.1/sassc-2.4.0/gem_make.out
An error occurred while installing sassc (2.4.0), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.4.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
sass-rails was resolved to 6.0.0, which depends on
sassc-rails was resolved to 2.1.2, which depends on
sassc
(base) FAIL
The text was updated successfully, but these errors were encountered:
I think you are hitting this issue, which specific to macOS 11.3+: oracle/graal#3383 @rschatz is working on that, once there is a new LLVM toolchain with that fix it should work.
eventmachine and unf_ext are also C++ extensions so it's very likely the same issue.
Unfortunately I don't think there is an easy workaround available until that's fixed (macOS 11.3 broke LLVM 11 and before it seems). oracle/graal#3383 (comment) is possible but would require to build TruffleRuby yourself (with jt build --env native).
If you have a Linux system or an older macOS, or Docker then those gems should install fine.
Hi, I'm trying to TruffleRuby out on my local machine for my project.
but it failed to
bundle install
on several gem's that requires native extension, one of them beingsassc
whichsassc-rails
was depending on.Unrelated Question: I have other two errors on building native extension for gem
eventmachine
andunf_ext
should i also open issue here?Hope this is helpful,
Di
My Environment:
Error Output:
The text was updated successfully, but these errors were encountered: