Looking at the file `include/carve/collection/unordered.hpp` it looks like
either `HAVE_STD_UNORDERED_COLLECTIONS` or maybe
`HAVE_LIBSTDCPP_UNORDERED_COLLECTIONS` should be defined, and that you
don't ever want to include the fallback (at least not with emscripten).

My advice would be to go back to your working version of emscripten and see
which of those macros is getting defined, then try to figure out why its no
longer being defined with the new version of emscripten.    I guess those
macros get automatically defined by some kind of configure process or are
then hardcoded?

On Mon, Feb 20, 2023 at 4:59 AM Tibor Kovács <tiberiusfa...@gmail.com>
wrote:

> I can send this lib. I still not found anything.
>
> Tibor Kovács <tiberiusfa...@gmail.com> ezt írta (időpont: 2023. febr.
> 13., H, 9:26):
>
>> Thanks for the answer.
>> This is a 3rd party library, called Carve. I was able to compile it in
>> Visual Studio and with the em++ 3.1.13. I'm not sure that I need to change
>> something in that code. In Visual Studio I have these options: 
>> -I"C:\Works\Dev\Carve-master\emscripten\\..\include"
>> -g -D"_LIBCPP_DEBUG=1" -D"_DEBUG" -std=c++2a and it worked. Now I have
>> to make a CMake for this and it worked with the mentioned compiler but the
>> 3.1.31 it's not..
>>
>> 'Sam Clegg' via emscripten-discuss <emscripten-discuss@googlegroups.com>
>> ezt írta (időpont: 2023. febr. 10., P, 17:18):
>>
>>>
>>>
>>> On Fri, Feb 10, 2023 at 12:13 AM Tibor Kovács <tiberiusfa...@gmail.com>
>>> wrote:
>>>
>>>> Hi Sam,
>>>>
>>>> Thanks for your reply. The Debug error message disappeared, big thanks
>>>> for this!
>>>>
>>>> The ambiguous error message looks like this:
>>>> The code section:
>>>> Face *clone(const vertex_t *old_base, vertex_t *new_base, std::
>>>> unordered_map<const edge_t *, edge_t *> &edge_map) const;
>>>> This is from Carve.
>>>> The full error message is this:
>>>>
>>>> In file included from
>>>> /mnt/c/Works/Dev/wasm/3rdParty/Carve/src/convex_hull.cpp:22:
>>>> In file included from
>>>> /mnt/c/Works/Dev/wasm/3rdParty/Carve/include/carve/csg.hpp:28:
>>>> /mnt/c/Works/Dev/wasm/3rdParty/Carve/include/carve/mesh.hpp:412:70:
>>>> error: reference to 'unordered_map' is ambiguous
>>>>       Face *clone(const vertex_t *old_base, vertex_t *new_base,
>>>> std::unordered_map<const edge_t *, edge_t *> &edge_map) const;
>>>>                                                                      ^
>>>> /mnt/c/Works/Dev/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/unordered_map:1028:28:
>>>> note: candidate found by name lookup is 'std::__2::unordered_map'
>>>> class _LIBCPP_TEMPLATE_VIS unordered_map
>>>>                            ^
>>>> /mnt/c/Works/Dev/wasm/3rdParty/Carve/include/carve/collection/unordered/fallback_impl.hpp:26:9:
>>>> note: candidate found by name lookup is 'std::unordered_map'
>>>>   class unordered_map : public std::map<K, T> {
>>>>
>>>         ^
>>>>
>>>>
>>> Looks like some kind of configuration issue where you are including both
>>> C++'s `std::unordered_map` as well as some kind of pollyfil for it
>>> fallback_impl.hpp.  When they are both included they (unsurprisingly)
>>> colide with each other.
>>>
>>> Is `fallback_impl.hpp` being included in my mistake?  Was it included in
>>> previous builds where this was working (try going back to your working
>>> configuration and adding a #error to `fallback_impl.hpp`)?
>>>
>>> I imagine some kind of change to libc++ could have triggered this but
>>> there is probably some local change to your project that will fix it.
>>>
>>>
>>> 'Sam Clegg' via emscripten-discuss <emscripten-discuss@googlegroups.com>
>>>> ezt írta (időpont: 2023. febr. 9., Cs, 18:31):
>>>>
>>>>>
>>>>>
>>>>> On Thu, Feb 9, 2023 at 7:27 AM Tibor Kovács <tiberiusfa...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I have several problems with the 3.1.31 compiler. I made a CMake for
>>>>>> a project and with the 3.1.13 it compiled properly. Now I updated to 
>>>>>> 3.1.31
>>>>>> and it doesn't work anymore. I try to compile it in Debug mode with the
>>>>>> next DEBUG definitions (this is a static library):
>>>>>>
>>>>>> set(DEBUG_DEFINITIONS
>>>>>>     _LIBCPP_DEBUG=1
>>>>>>     _DEBUG
>>>>>>     CMAKE_BUILD
>>>>>> )
>>>>>>
>>>>>> and the DEBUG_DEFINITIONS are added like this:
>>>>>>
>>>>>> target_compile_definitions(${LIBRARY_NAME}
>>>>>>     PRIVATE
>>>>>>         "$<$<CONFIG:DEBUG>:${DEBUG_DEFINITIONS}>"
>>>>>> )
>>>>>>
>>>>>> Previously it worked but now I have this error message:
>>>>>>
>>>>>> /mnt/c/Works/Dev/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__debug:24:5:
>>>>>> error: "Enabling the debug mode now requires having configured the 
>>>>>> library
>>>>>> with support for the debug mode"
>>>>>> # error "Enabling the debug mode now requires having configured the
>>>>>> library with support for the debug mode"
>>>>>>     ^
>>>>>> 1 error generated.
>>>>>>
>>>>>
>>>>> That looks like libc++ is warning you that you are using a legacy
>>>>> macro:
>>>>>
>>>>>  // Catch invalid uses of the legacy _LIBCPP_DEBUG toggle.
>>>>>
>>>>> #if defined(_LIBCPP_DEBUG) && _LIBCPP_DEBUG != 0 &&
>>>>> !defined(_LIBCPP_ENABLE_DEBUG_MODE)
>>>>> #   error "Enabling the debug mode now requires having configured the
>>>>> library with support for the debug mode"
>>>>> #endif
>>>>>
>>>>> It looks like you are expected to define _LIBCPP_ENABLE_DEBUG_MODE.
>>>>>  I'm not sure what either of those macros do, but they are not specific to
>>>>> emscripten, and apply to libc++ in general.
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> It doesn't stop here. If I compile it in Release mode, I'll have this
>>>>>> error messages: error: reference to 'unordered_map' is ambiguous.
>>>>>> AFAIK this error message would be generated if the compiler doesn't know
>>>>>> the C++ version. But I specified it like this:
>>>>>>
>>>>>> target_compile_options(${LIBRARY_NAME}
>>>>>>     PRIVATE
>>>>>>         -std=c++2a
>>>>>>         -fwasm-exceptions
>>>>>>         -pthread
>>>>>> )
>>>>>>
>>>>>> What could be the solution for these errors?
>>>>>> Thank you in advance the helps.
>>>>>>
>>>>>>
>>>>> Can you share the full error message?  And even better a piece of
>>>>> sample code that generates it?   I imagine this is another generic libc++
>>>>> issue and not emscripten-specific.
>>>>>
>>>>> cheers,
>>>>> sam
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "emscripten-discuss" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/emscripten-discuss/JAjo2Y3N1UQ/unsubscribe
>>>>> .
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> emscripten-discuss+unsubscr...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va29CMBO65yvAo_XZSyS4pNWv-x%2B%3DFFWdCfVB_Ryasg4iQA%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va29CMBO65yvAo_XZSyS4pNWv-x%2B%3DFFWdCfVB_Ryasg4iQA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> 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+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAJTUF4-jVKSnNXExYq8xW-pLSbRrufZWEMKnFV5T7yN%3DWRpQPg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAJTUF4-jVKSnNXExYq8xW-pLSbRrufZWEMKnFV5T7yN%3DWRpQPg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "emscripten-discuss" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/emscripten-discuss/JAjo2Y3N1UQ/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> emscripten-discuss+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-3%2Bc20buLeKMw90HDDbK1wC2yiVX_VJ5VYogOVnmhziQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-3%2Bc20buLeKMw90HDDbK1wC2yiVX_VJ5VYogOVnmhziQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAJTUF48CYcmQmaae%2Bd6hGfsj6kUZEArt6Hzf31LbUNoxsxa8Nw%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAJTUF48CYcmQmaae%2Bd6hGfsj6kUZEArt6Hzf31LbUNoxsxa8Nw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_6PqpkExbA%2BRMJK%3D%2BWFw_5ykcc%3Dxp2ng6JfN3w9R344A%40mail.gmail.com.

Reply via email to