lucvdv has asked for the wisdom of the Perl Monks concerning the following question:

Hello

I'm trying to compile perl 5.38 (gnu compiler) on a solaris 10 system, and I run into the following error :

Can't find Unicode property definition "M" in regex; marked by <-- HER +E in m/\PM <-- HERE / at /sybdump_netapp/software/install/perl-5.38.0 +/cpan/Text-Tabs/lib/Text/Tabs.pm line 28. Compilation failed in require at autodoc.pl line 3. BEGIN failed--compilation aborted at autodoc.pl line 3. make: *** [pod/perlintern.pod] Error 255
Do you know where the problem is, or where to find a solution?

Many thanks,

Luc.

Replies are listed 'Best First'.
Re: compiling perl 5.38 on a solaris 10 system
by syphilis (Archbishop) on Aug 13, 2023 at 01:27 UTC
    Do you know where the problem is, or where to find a solution?

    I don't really understand the issue - but here are some things you could try if no-one here comes up with some knowledgeable advice.

    The problematic line 28 in Tabs.pm is:
    $offs = () = /\PM/g;
    One thing you could do is to replace the cpan/Text-Tabs in the perl-5.38.0 source with the version that shipped with perl-5.34.0. That's actually what I would try first - but I'm not recommending that you do as I do.
    (The Tabs.pm that shipped with 5.36.0 contains the same problematic construct as the 5.38.0 version - so I don't see much point in testing it.)

    A more responsible thing to do would be to raise an issue about this at https://github.com/ap/Text-Tabs/issues and see what the Text::Tabs maintainer has to say about it.
    Or you could also try using the current github repo source. However, although line 28 has been changed, it still contains the same troublesome /\PM/g construct.
    You might also get some good advice by raising an issue about this at https://github.com/Perl/perl5/issues, though they might fob you off because it's a "cpan" distro, and not really p5p's responsibility to fix.

    That's about all I can think of.

    Cheers,
    Rob

      see what the Text::Tabs maintainer has to say about it.

      It's not a Text::Tabs issue. This is a problem with Perl's builtin Unicode support.

      Some other error occurred earlier in the Perl installation process. I can't believe that would be quiet!

      OP, please provide the complete build log.

      Hi Rob,

      Thanks for your reply.

      I've compiled perl on one of our linux systems and there compilation runs fine. The solaris system is quite old, so I assume something outdated is causing the problem.

      The reason I was compiling it on solaris was that our current perl version which is 5.12 doesn't support SSL, and I need that to connect to Microsoft's Active Directory. I can live with executing a ssh script from solaris to linux and put more effort in the migration from solaris to linux instead of trying to solve this issue as it seems not to have a straightforward solution.

      Thanks,
      Luc.

        The last few builds I tried on Solaris (SPARC) 10 failed, using gcc. The last would have been around v5.34, 2021ish. There was issues raised for failing builds at the time. Now we're focused on ditching Solaris as a platform for Linux.

Re: compiling perl 5.38 on a solaris 10 system
by kcott (Archbishop) on Aug 13, 2023 at 06:00 UTC

    G'day Luc,

    Welcome to the Monastery.

    [Note: Some of what follows repeats information already posted by ++syphilis.]

    I was surprised by "Can't find Unicode property definition "M" in regex" because that refers to the Mark property in the General Category and has been around for a long time. For more information about that, see:

    There are two versions of Text::Tabs which, as far as I can tell, might refer to your /sybdump_netapp/software/install/perl-5.38.0/cpan/Text-Tabs/lib/Text/Tabs.pm.

    The CPAN Tester Matrices for 2021.0814 and 2023.0511 both have many results under the solaris column and all are PASS (green swatch). This suggests to me that the problem does not lie with Solaris itself.

    I have a variety of Perl versions available ranging from v5.30.0 to v5.38.0. I ran a number of tests with those two versions. It would help if you ran the same with Perl versions you have on your Solaris system. I'm running on Cygwin 3.4.7 (up-to-date as of two days ago):

    $ uname -a CYGWIN_NT-10.0-19045 titan 3.4.7-1.x86_64 2023-06-16 14:04 UTC x86_64 +Cygwin

    Firstly, some basic syntax checks.

    $ perl -v | head -2 | tail -1 This is perl 5, version 30, subversion 0 (v5.30.0) built for cygwin-th +read-multi $ perl -MO=Deparse -e '$offs = () = /\PM/g;' $offs = () = /\PM/g; -e syntax OK $ perl -MO=Deparse -e '$offs = /^\pM/ + ( () = /\PM/g );' $offs = /^\pM/ + (() = /\PM/g); -e syntax OK $ perl -v | head -2 | tail -1 This is perl 5, version 38, subversion 0 (v5.38.0) built for cygwin-th +read-multi $ perl -MO=Deparse -e '$offs = () = /\PM/g;' $offs = () = /\PM/g; -e syntax OK $ perl -MO=Deparse -e '$offs = /^\pM/ + ( () = /\PM/g );' $offs = /^\pM/ + (() = /\PM/g); -e syntax OK

    I then wrote this script to check that \pM and \PM were behaving correctly. (Unicode::UCD is a core module which you should already have installed.)

    #!/usr/bin/env perl use strict; use warnings; use Unicode::UCD "charprop"; print "Perl version: $^V\n"; print "Example chars with Mark property:\n"; print "COMBINING GRAVE ACCENT U+0300: ", charprop("U+0300", "Gc"), + "\n"; print "COMBINING ENCLOSING KEYCAP U+20E3: ", charprop("U+20E3", "Gc"), + "\n"; my $x = "a\N{COMBINING GRAVE ACCENT}b\N{COMBINING ENCLOSING KEYCAP}c"; while ($x =~ /\pM/g) { print "Char at position @{[pos($x)-1]} HAS Mark property.\n"; } while ($x =~ /\PM/g) { print "Char at position @{[pos($x)-1]} NOT Mark property.\n"; }

    Output with Perl v5.30.0:

    Perl version: v5.30.0 Example chars with Mark property: COMBINING GRAVE ACCENT U+0300: Nonspacing_Mark COMBINING ENCLOSING KEYCAP U+20E3: Enclosing_Mark Char at position 1 HAS Mark property. Char at position 3 HAS Mark property. Char at position 0 NOT Mark property. Char at position 2 NOT Mark property. Char at position 4 NOT Mark property.

    Output with Perl v5.38.0:

    Perl version: v5.38.0 Example chars with Mark property: COMBINING GRAVE ACCENT U+0300: Nonspacing_Mark COMBINING ENCLOSING KEYCAP U+20E3: Enclosing_Mark Char at position 1 HAS Mark property. Char at position 3 HAS Mark property. Char at position 0 NOT Mark property. Char at position 2 NOT Mark property. Char at position 4 NOT Mark property.

    Please fully report successes and failures, as you did with your initial post. Thankyou.

    — Ken

      Hello Ken,

      Thanks for your reply. I successfully compiled perl 5.38 on a linux system and I'm going to drop trying to make it run on solaris as I explained in my reply to Rob.

      I did run the code you posted and I got the same output as yours.

      Thanks,
      Luc.