tangramdotdev / packages

A collection of community maintained Tangram packages.
https://www.tangram.dev
MIT License
8 stars 2 forks source link

Fix perl v5.40.0 on Linux with glibc #85

Closed deciduously closed 2 months ago

deciduously commented 3 months ago

The current version of perl is v5.38.2, but v5.40.0 has been released. The new version compiles without modification on macOS and Linux with musl, but produces the following error with glibc-based SDKs, tested with both v2.39 and v2.40:

locale.c: In function 'Perl_init_i18nl10n':
locale.c:8812:43: error: 'PERL_LC_ALL_CATEGORY_POSITIONS_INIT' undeclared (first use in this function)
 8812 |         int lc_all_category_positions[] = PERL_LC_ALL_CATEGORY_POSITIONS_INIT;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
locale.c:8812:43: note: each undeclared identifier is reported only once for each function it appears in
In file included from /.tangram/artifacts/dir_01rxkm47p4fmpwx46w4qw0brj9k0zj3s3jqk7z0aaaq3xdfz8g58s0/include/features.h:511,
                 from /.tangram/artifacts/dir_01rxkm47p4fmpwx46w4qw0brj9k0zj3s3jqk7z0aaaq3xdfz8g58s0/include/sys/types.h:25,
                 from perl.h:1117,
                 from locale.c:383:
perl.h:4280:36: error: negative width in bit-field '__error_if_negative'
 4280 | #  define STATIC_ASSERT_DECL(COND) static_assert(COND, #COND)
      |                                    ^~~~~~~~~~~~~
perl.h:4296:52: note: in expansion of macro 'STATIC_ASSERT_DECL'
 4296 | #define STATIC_ASSERT_STMT(COND)      STMT_START { STATIC_ASSERT_DECL(COND); } STMT_END
      |                                                    ^~~~~~~~~~~~~~~~~~
locale.c:8813:9: note: in expansion of macro 'STATIC_ASSERT_STMT'
 8813 |         STATIC_ASSERT_STMT(   C_ARRAY_LENGTH(lc_all_category_positions)
      |         ^~~~~~~~~~~~~~~~~~
make: *** [makefile:265: locale.o] Error 1

Fix this, then bump the version.