Skip to content

Compilation regression in musl libc in Emscripten 4.0.0 #23573

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

Closed
hoodmane opened this issue Feb 3, 2025 · 2 comments
Closed

Compilation regression in musl libc in Emscripten 4.0.0 #23573

hoodmane opened this issue Feb 3, 2025 · 2 comments

Comments

@hoodmane
Copy link
Collaborator

hoodmane commented Feb 3, 2025

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.
@hoodmane hoodmane changed the title Regression in musl libc in Emscripten 4.0.0 Compilation regression in musl libc in Emscripten 4.0.0 Feb 3, 2025
@sbc100
Copy link
Collaborator

sbc100 commented Feb 3, 2025

I think this was already reported in #23413 which was fixed in #23414 and releases in 4.0.1.

@hoodmane
Copy link
Collaborator Author

hoodmane commented Feb 3, 2025

Sorry for the duplicate.

@hoodmane hoodmane closed this as completed Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants