[SOLVED] Perl not working properly on armv5

Problems with packages? Post here, using [tags] of the package name.

[SOLVED] Perl not working properly on armv5

Postby planeteater » Tue Aug 13, 2019 10:44 am

Related previous topic (locked now for being too old): https://archlinuxarm.org/forum/viewtopic.php?f=15&t=13000&hilit=perl

On an armv5 device with current perl installed (5.30.0-3 as of now), various perl based utilities throw strange errors. Example:
$this->bbcode_second_pass_code('', '
$ autoreconf
Operator or semicolon missing before %_local_duplicate_messages at /usr/share/autoconf/Autom4te/Channels.pm line 315.
Ambiguous use of % resolved as operator % at /usr/share/autoconf/Autom4te/Channels.pm line 315.
Operator or semicolon missing before %_global_duplicate_messages at /usr/share/autoconf/Autom4te/Channels.pm line 327.
Ambiguous use of % resolved as operator % at /usr/share/autoconf/Autom4te/Channels.pm line 327.
Operator or semicolon missing before %channel_opts at /usr/share/autoconf/Autom4te/Channels.pm line 366.
Ambiguous use of % resolved as operator % at /usr/share/autoconf/Autom4te/Channels.pm line 366.
Global symbol "%_local_duplicate_messages" requires explicit package name (did you forget to declare "my %_local_duplicate_messages"?) at /usr/share/autoconf/Autom4te/Channels.pm line 286.
Global symbol "%_global_duplicate_messages" requires explicit package name (did you forget to declare "my %_global_duplicate_messages"?) at /usr/share/autoconf/Autom4te/Channels.pm line 287.
BEGIN not safe after errors--compilation aborted at /usr/share/autoconf/Autom4te/Channels.pm line 406.
Compilation failed in require at /usr/share/autoconf/Autom4te/ChannelDefs.pm line 19.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/ChannelDefs.pm line 19.
Compilation failed in require at /usr/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /usr/bin/autoreconf line 39.
')
According to this reply for perlbug #133803, the cause of these errors are unaligned memory accesses.
Issuing the following command locally makes the errors go away, which confirms this is indeed the cause:
$this->bbcode_second_pass_code('', '# echo 2 > /proc/cpu/alignment')
Explanation: https://www.kernel.org/doc/Documentation/arm/mem_alignment

The above is rather a quick&dirty hack than a real solution though. There is also a suggested workaround that can be implemented at distro level until they invent a proper fix upstream:
$this->bbcode_second_pass_quote('', 'T')his issue seems to be caused by wrong alignment causing unexpected behaviour. Running Configure with -Dd_u32align makes the build succeed.
Last edited by planeteater on Tue Aug 13, 2019 6:14 pm, edited 1 time in total.
planeteater
 
Posts: 26
Joined: Sat Dec 29, 2012 2:44 pm

Re: Perl not working properly on armv5

Postby planeteater » Tue Aug 13, 2019 6:14 pm

The new perl-5.30.0-3.1 package has the -Dd_u32align workaround for armv5, and updating to it fixed the problem for me.
planeteater
 
Posts: 26
Joined: Sat Dec 29, 2012 2:44 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 26 guests