-
Notifications
You must be signed in to change notification settings - Fork 463
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
include cstdlib for std::abs() for Emscripten #388
Conversation
While gcc compiled fine, emscripten did not. The following error was thrown: ``` /usr/local/bin/emscripten/emscripten/1.8.2/em++ -Wall -O2 -fPIC -c -o utf8_string.o utf8_string.cpp utf8_string.cpp:111:16: error: call to 'abs' is ambiguous else if (std::abs(index) <= signed_len) { ^~~~~~~~ ``` Either including `cstdlib` or changing `std::abs(index)` to `std::abs((float)index)` fixed the issue with Emscripten without breaking in gcc.
👍 was about to suggest the same |
Hmmm, I was wondering why the CI build failed but then again all of the previous build failed as well. Not very helpfull |
It fails because we haven't passed sass/sass-spec yet. Damnit. On Fri, Jun 6, 2014 at 4:06 PM, Laurent Goderre notifications@github.com
|
Sorry, there are a few |
Hmm, it seems to me like some of the build failure are compiling errors |
Ah, I see the problem ... the build that uses the default makefile compiles, but fails on the aforementioned test cases. The one that uses autotools fails to compile because I haven't updated the makefile template to include some new files that were added in a recent commit. |
I was getting the same error as OP when compiling using clang, and this patch fixed it. 👍! |
include cstdlib for std::abs() for Emscripten
👍 |
It appears this fix is incomplete and it still fails on Heroku. This fix probably need to be applied to this file as well https://github.com/sass/libsass/blob/483124834a75b1ad269e2555272ab96ad3296706/functions.cpp |
While gcc compiled fine, emscripten did not. The following error was thrown:
Either including
cstdlib
or changingstd::abs(index)
tostd::abs((float)index)
fixed the issue with Emscripten without breaking in gcc.