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

Hi,
I am trying to build Perl 5.14.0 (multi-thread) on AIX and getting this error :

----------------------------

Sequence (?<... not terminated in regex; marked by <-- HERE in m/(?< <-- HERE =\^)// at dist/Cwd/Cwd.pm line 697.
----------------------------

The said line of code is:
$path_unix = 1 if ($path =~ m#(?<=\^/#);
Can somebody suggest what's going wrong here? I have build the same version on other platforms without any issues.
Thanks, -Farooque

Replies are listed 'Best First'.
Re: Regex problem building perl on IBM AIX
by Tanktalus (Canon) on Jul 29, 2011 at 13:30 UTC

    I've successfully built Perl 5.14.0 on AIX (I haven't tried 5.14.1 yet). However, I recall having issues (not that I recall which ones) when compiling in 32-bit mode. For some reason, 64-bit mode worked better. Also, to get some other modules compiling properly, I remember that I had to modify Config.pm (or Config_heavy.pl or something) afterwards to add whatever was required to get the AIX compiler to treat // as comments.

    Have you tried 64-bit? Is there a reason you want a 32-bit perl?

      Thanks for the response. I am working on an SDK for the perl which is supported on both AIX 32 and 64 bit platforms. So yes, I need to have 32 bit perl build on AIX. I would appreciate if you can provide any information or help on the issues you faced and fixed. Thanks,
Re: Regex problem building perl on IBM AIX
by jwkrahn (Abbot) on Jul 29, 2011 at 09:32 UTC

    Your regular expression m#(?<=\^/# has a left parenthesis with no corresponding right parenthesis.

      Thanks for the reply. I apologize but I think I made a mistake posting the expression. The actual one in code is:
      $path_unix = 1 if ($path =~ m#(?<=\^)/#);
      Any more suggestions? Thanks in advance.
        Well, that code will not generate an error for any perl since v5.6.1 -- you need to show us what program you're executing
Re: Regex problem building perl on IBM AIX
by Anonymous Monk on Jul 29, 2011 at 09:35 UTC

    Can somebody suggest what's going wrong here?

    Nothing 5.14.0 related

    Whatever copy of Cwd you're running is broken, get a new one from cpan

    I am trying to build Perl 5.14.0 ...

    FYI, the latest is 5.14.1

      Thank you for the reply. I checked latest Cwd (3.33) at
        http://cpansearch.perl.org/src/SMUELLER/PathTools-3.33/Cwd.pm
      and it also has same expression. I anyway over wrote my version with the one from the site and still the same problem.
      I downloaded version 5.14.1 and tried to build it on same system, but same error at same location.
      Appreciate any suggestions/comments.

        Appreciate any suggestions/comments.

        Show what you're doing exactly, from step one (copy/paste your shell session)

Re: Regex problem building perl on IBM AIX
by Tux (Canon) on Aug 05, 2011 at 10:37 UTC

    I'm building perl on hateful AIX on a daily basis in both 32bit and 64bit mode and for both threaded (yuck) and unthreaded. What version of AIX and what version of xlc are your running?

    $ oslevel 5.3.0.0 $ oslevel -r 5300-09 $ lslpp -l xlC.rte Fileset Level State Description -------------------------------------------------------------------- +-------- Path: /usr/lib/objrepos xlC.rte 11.1.0.1 COMMITTED XL C/C++ Runtime $

    Enjoy, Have FUN! H.Merijn
      # oslevel 5.2.0.0 # oslevel -r 5200-01 # lslpp -l xlC.rte Fileset Level State Description -------------------------------------------------------------------- +-------- Path: /usr/lib/objrepos xlC.rte 6.0.0.0 COMMITTED C Set ++ Runtime #

        It might very well be a bug in your preprocessor or compiler:

        $ oslevel 5.2.0.0 $ oslevel -r 5200-04 $ lslpp -l xlC.rte Fileset Level State Description -------------------------------------------------------------------- +-------- Path: /usr/lib/objrepos xlC.rte 9.0.0.9 COMMITTED XL C/C++ Runtime $

        From the file README.aix (perldoc paerlaix), it says:

        At the moment of writing, AIX supports two different native C compiler +s, for which you have to pay: B<xlC> and B<vac>. If you decide to use eit +her of these two (which is quite a lot easier than using gcc), be sure to upgrade to the latest available patch level. Currently: xlC.C 3.1.4.10 or 3.6.6.0 or 4.0.2.2 or 5.0.2.9 or 6.0.0.3 vac.C 4.4.0.3 or 5.0.2.6 or 6.0.0.1

        Which is already rather outdated now, but most likely 6.0.0.0 is insufficient and you should up to at least 6.0.0.3.


        Enjoy, Have FUN! H.Merijn