Compiler error in Emscripten v1.39.18 -no member named 'acos' in the global namespace

56 views
Skip to first unread message

Brian Gavin

unread,
Jun 17, 2020, 3:04:05 PM6/17/20
to emscripten-discuss
Hello,
When I tried to upgrade from Emscripten version 1.39.15 to 1.39.18.   I am now getting some compiler error related to things in the cmath file.   Is there a new flag I need to add or something similar?

emsdk\upstream\EMEA44~1\system\include\libcxx\cmath(338,9): error G1A4676F8: no member named 'acos' in the global namespace

Thanks,
Brian Gavin

Brian Gavin

unread,
Jun 17, 2020, 3:16:30 PM6/17/20
to emscripten-discuss
After doing some more testing the problem first appears when using version 1.39.16 of Emscripten

Brian Gavin

Sam Clegg

unread,
Jun 17, 2020, 6:05:31 PM6/17/20
to emscripte...@googlegroups.com
I think this is related to the adding of `emscripten/math.h`.   Is your build system adding `system/include/emscripten` to the include path?    The recommended fix would be remove this from your include path.   Hopefully that isn't a problem for you.   If it is we could potentially rename this `math.h` header.

On Wed, Jun 17, 2020 at 12:16 PM Brian Gavin <bgav...@gmail.com> wrote:
After doing some more testing the problem first appears when using version 1.39.16 of Emscripten

Brian Gavin

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/0e0100bd-a0ba-4f74-9a40-48832bbdbce0o%40googlegroups.com.

Brian Gavin

unread,
Jun 18, 2020, 10:33:45 AM6/18/20
to emscripten-discuss
I was using 'system/include/emscripten' as an include path so I removed it, but I am still seeing the same errors.

Brian Gavin

Alon Zakai

unread,
Jun 18, 2020, 11:49:32 AM6/18/20
to emscripte...@googlegroups.com
Perhaps we should rename emscripten/math.h to emscripten/em_math.h, or something else? It seems risky to leave as it is.

On Thu, Jun 18, 2020 at 7:33 AM Brian Gavin <bgav...@gmail.com> wrote:
I was using 'system/include/emscripten' as an include path so I removed it, but I am still seeing the same errors.

Brian Gavin

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Sam Clegg

unread,
Jun 18, 2020, 12:30:34 PM6/18/20
to emscripte...@googlegroups.com
Are you sure?   Having 'system/include/emscripten' in the include path is almost certainly the culprit.

Can you post the failing emcc command along with `-v` added to the command line to show the include path its using?

cheers,
sam

On Thu, Jun 18, 2020 at 7:33 AM Brian Gavin <bgav...@gmail.com> wrote:
I was using 'system/include/emscripten' as an include path so I removed it, but I am still seeing the same errors.

Brian Gavin

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Sam Clegg

unread,
Jun 18, 2020, 12:32:30 PM6/18/20
to emscripte...@googlegroups.com
On Thu, Jun 18, 2020 at 8:49 AM Alon Zakai <alon...@gmail.com> wrote:
Perhaps we should rename emscripten/math.h to emscripten/em_math.h, or something else? It seems risky to leave as it is.

I mean it would also fix the issue... but its also a good way to ensure we are all the same page about our include paths :)
 

On Thu, Jun 18, 2020 at 7:33 AM Brian Gavin <bgav...@gmail.com> wrote:
I was using 'system/include/emscripten' as an include path so I removed it, but I am still seeing the same errors.

Brian Gavin

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/2930fc46-a938-4f17-801b-597a00e74dd8o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.

Floh

unread,
Jun 20, 2020, 9:44:41 AM6/20/20
to emscripten-discuss
I agree with Alon, even though it's not "good practice" to have include/emscripten in the search path, the problems that result from such a name collision might be too confusing because nothing points to the file include/emscripten/math.h being the problem (also the function in emscripten/math.h are prefixed with emscripten_math_xxx(), so em_math.h would make more sense to me than math.h

Cheers,
-Floh.

On Thursday, 18 June 2020 18:32:30 UTC+2, Sam Clegg wrote:
On Thu, Jun 18, 2020 at 8:49 AM Alon Zakai <alon...@gmail.com> wrote:
Perhaps we should rename emscripten/math.h to emscripten/em_math.h, or something else? It seems risky to leave as it is.

I mean it would also fix the issue... but its also a good way to ensure we are all the same page about our include paths :)
 
On Thu, Jun 18, 2020 at 7:33 AM Brian Gavin <bgav...@gmail.com> wrote:
I was using 'system/include/emscripten' as an include path so I removed it, but I am still seeing the same errors.

Brian Gavin

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

Brian Gavin

unread,
Oct 1, 2020, 9:26:56 AM10/1/20
to emscripten-discuss
I just wanted to follow up.   The change you made fixed the problem.  
Reply all
Reply to author
Forward
0 new messages