Skip to content

Compilation regression in musl libc in Emscripten 4.0.0 #23573

Closed
@hoodmane

Description

@hoodmane

A compilation regression in 4.0.0

Version of emscripten/emsdk

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.0 (97c7c2adab1791b9487d1f376934a3bdc28f8a67)
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

a.cpp

#include <xlocale.h> 
#include <map>

Compilation command

em++ -c a.cpp

Output

In file included from a.cpp:3:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/map:2175:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/functional:552:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/vector:325:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__format/formatter_bool.h:19:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__format/formatter_integral.h:35:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale:14:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale_dir/locale_base_api.h:27:
/home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale_dir/locale_base_api/musl.h:23:8: error: cannot add 'abi_tag' attribute in a redeclaration
   23 | inline _LIBCPP_HIDE_FROM_ABI long long strtoll_l(const char* __nptr, char** __endptr, int __base, locale_t) {
      |        ^
/home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__config:545:22: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
  545 |       __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
      |                      ^
/home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/compat/xlocale.h:13:11: note: previous declaration is here
   13 | long long strtoll_l(const char *start, char **end, int base, locale_t loc);
      |           ^
In file included from a.cpp:3:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/map:2175:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/functional:552:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/vector:325:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__format/formatter_bool.h:19:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__format/formatter_integral.h:35:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale:14:
In file included from /home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale_dir/locale_base_api.h:27:
/home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale_dir/locale_base_api/musl.h:27:8: error: cannot add 'abi_tag' attribute in a redeclaration
   27 | inline _LIBCPP_HIDE_FROM_ABI unsigned long long strtoull_l(const char* __nptr, char** __endptr, int __base, locale_t) {
      |        ^
/home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__config:545:22: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
  545 |       __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
      |                      ^
/home/rchatham/Documents/programming/pyodide/emsdk/emsdk/upstream/emscripten/cache/sysroot/include/compat/xlocale.h:14:20: note: previous declaration is here
   14 | unsigned long long strtoull_l(const char *start, char **end, int base, locale_t loc);
      |                    ^
2 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions