Skip to content

Blead breaks build in g++, clang++ builds on some platforms #21948

@jkeenan

Description

@jkeenan

Compiling perl using g++ or clang++ has started to fail on certain platforms, such as several of the BSDs.

For example, building on FreeBSD-13 with the following configuration:

$ g++ --version | head -n1
g++ (FreeBSD Ports Collection) 12.2.0

$ sh ./Configure -des -Dusedevel -Dcc=g++ && make test_prep

... the build stops here:

g++ -c -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DNO_POSIX_2008_LOCALE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wwrite-strings -Wno-use-after-free locale.c
locale.c: In function 'void S_ints_to_tm(tm*, int, int, int, int, int, int, int, int, int)':
locale.c:8072:25: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
 8072 |         mytm->tm_zone = zone;
      |                         ^~~~
      |                         |
      |                         const char*
*** Error code 1

Stop.
make: stopped in /usr/home/jkeenan/gitwork/perl

Line 8072 in locale.c was last modified in blead yesterday.

commit 36e41d53ff6a5995c16234f8027ef34b5e6a34cc
Author:     Karl Williamson <khw@cpan.org>
AuthorDate: Wed Jan 10 11:30:11 2024 -0700
Commit:     Karl Williamson <khw@cpan.org>
CommitDate: Wed Feb 7 10:59:05 2024 -0700

    Don't use both mini_mktime() and mkttime()

g++ builds on Linux so far appear to be unaffected.

@khwilliamson, can you take a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-buildRelates to building perl or a distribution we bundle.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions