Dual-Life / Devel-PPPort

Perl/Pollution/Portability
9 stars 28 forks source link

Cannot compile DateTime on 5.20.3-threaded with this version's output #156

Closed autarch closed 4 years ago

autarch commented 4 years ago

If I try to compile DateTime (latest git master and 1.51 on CPAN) with Perl 5.20.3 with threads, I get a compile error:

make
cp lib/DateTime/PPExtra.pm blib/lib/DateTime/PPExtra.pm
cp lib/DateTime/LeapSecond.pm blib/lib/DateTime/LeapSecond.pm
cp lib/DateTime/Duration.pm blib/lib/DateTime/Duration.pm
cp lib/DateTime/PP.pm blib/lib/DateTime/PP.pm
cp lib/DateTime/Infinite.pm blib/lib/DateTime/Infinite.pm
cp lib/DateTime.pm blib/lib/DateTime.pm
cp lib/DateTime/Types.pm blib/lib/DateTime/Types.pm
cp lib/DateTime/Helpers.pm blib/lib/DateTime/Helpers.pm
Running Mkbootstrap for DateTime ()
chmod 644 DateTime.bs
/home/autarch/perl5/perlbrew/perls/perl-5.20.3/bin/perl /home/autarch/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/ExtUtils/xsubpp  -typemap /home/autarch/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/ExtUtils/typemap  DateTime.xs > DateTime.xsc && mv DateTime.xsc DateTime.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"1.51\" -DXS_VERSION=\"1.51\" -fPIC "-I/home/autarch/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/x86_64-linux-thread-multi/CORE"   DateTime.c
In file included from DateTime.xs:5:0:
ppport.h:10554:0: warning: "sync_locale" redefined
 #      define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), 1)

In file included from DateTime.xs:2:0:
/home/autarch/perl5/perlbrew/perls/perl-5.20.3/lib/5.20.3/x86_64-linux-thread-multi/CORE/perl.h:5314:0: note: this is the location of the previous definition
 #define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)),        \

rm -f blib/arch/auto/DateTime/DateTime.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector DateTime.o  -o blib/arch/auto/DateTime/DateTime.so   \
        \

chmod 755 blib/arch/auto/DateTime/DateTime.so
/home/autarch/perl5/perlbrew/perls/perl-5.20.3/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- DateTime.bs blib/arch/auto/DateTime/DateTime.bs 644
autarch commented 4 years ago

Note that this seems to work fine with all other versions of Perl, including 5.20.3 without threads - see https://travis-ci.org/houseabsolute/DateTime.pm/builds/610924661 for output from many builds.

khwilliamson commented 4 years ago

This is fixed in 3.56 now available