AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

How to get and build perl modules in aix7.3

  • 1.  How to get and build perl modules in aix7.3

    Posted Tue August 27, 2024 02:15 AM

    We are currently migrating from aix7.2 to aix7.3

    We would like to use the perl module Encode::JP::H2Z in our self-developed application, but it seems that it is no longer available in aix7.3.

    In AIX7.2, it was located in /usr/opt/perl5/lib//5.28.1/aix-thread-multi/Encode/JP/H2Z.pm.

    I looked in the rpm version of the AIXToolbox package, but the module was not found.

    I also asked IBM support, but they replied, "As stated in the release notes, the Perl package provided by the OS may not maintain full compatibility across all versions.

    However, the perl provided with the AIX OS is intended for use by the OS, and is not supported for use by users.

    Therefore, we are very sorry, but we do not provide support at our office.

    "

    I'm sorry, but I don't understand the basics of Perl, but could you please tell me how to obtain the above module?



    ------------------------------
    Gen-ei Takao
    ------------------------------


  • 2.  RE: How to get and build perl modules in aix7.3

    Posted Tue August 27, 2024 05:19 AM
    Edited by RESHMA KUMAR Tue August 27, 2024 05:20 AM

    You can install the perl module using the cpan command. 
    First, please ensure that xlc compiler is installed in the system and path to the xlc compiler is included in the PATH environment variable.
    [For eg:export PATH="/opt/IBM/xlc/13.1.3/bin:$PATH"]
    After this, you can execute the following commands:

    export LDR_CNTRL=MAXDATA=0x80000000@DSA
    /usr/bin/cpan Encode::JP::H2Z



    ------------------------------
    RESHMA KUMAR
    ------------------------------



  • 3.  RE: How to get and build perl modules in aix7.3

    Posted Tue August 27, 2024 11:34 PM

    Thank you for your answer.
    I did some research myself and found out that I could install the module from CPAN.
    However, the environment in question was not connected to the Internet, so I unzipped Encode-3.21.tar.gz downloaded from CPAN.

    As a separate issue,
    I tried making and making test to check where the module was installed, but I was unable to confirm the destination folder where the module would ultimately be installed. Is there a way to check this?
    Or will it be placed in the default perl folder?



    ------------------------------
    Gen-ei Takao
    ------------------------------



  • 4.  RE: How to get and build perl modules in aix7.3

    Posted Wed August 28, 2024 07:18 AM

    When "make install" is executed, the files will be installed in /usr/opt/perl5/lib/site_perl/5.34.1/aix-thread-multi path by default. 
    You can also install it in a custom location using the command "make install DESTDIR=<newLocation>" . In this case, the files will be installed in <newLocation>/usr/opt/perl5/lib/site_perl/5.34.1/aix-thread-multi.



    ------------------------------
    RESHMA KUMAR
    ------------------------------



  • 5.  RE: How to get and build perl modules in aix7.3

    Posted Wed August 28, 2024 09:44 PM

    Thank you for your reply, Kumar. My question has been answered!



    ------------------------------
    Gen-ei Takao
    ------------------------------



  • 6.  RE: How to get and build perl modules in aix7.3

    Posted Wed August 28, 2024 05:40 PM

    Hello, Takao San

    I always share this information with application teams so they can consider different perl options in future releases.  This is of particular interest to applications that install modules to perl.

     
    Reference: AIX Perl Updates and Support for perl.rte
    https://www.ibm.com/support/pages/node/885927
    ======================
    The perl shipped with AIX in the perl.rte fileset is intended for sole use by the operating system. The AIX perl.rte will install in /usr/opt/perlN/ (where N is the version number) and create the symlink /usr/bin/perl. Operating system components rely on the specific level of perl shipped with the release. AIX does not migrate modules to this new version, since the modules are not tested by AIX.  They are usually left on the system in a directory left over from the previous version, but copying them, for example from l /usr/opt/perl5/lib/5.28.1/CPAN to l /usr/opt/perl5/lib/5.34.1/CPAN is not recommended, because they are built on different versions of Perl.
     
    Users are always encouraged to use the latest perl RPM version available on the AIX Toolbox for Open Source Software  to ensure they are using the latest versions tested on AIX. Since this perl version will install to a different location, this also gives the user control over any perl updates which could impact their environment.


    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 7.  RE: How to get and build perl modules in aix7.3

    Posted Wed August 28, 2024 10:07 PM

    Thank you for your answer, Harris.

    I think the perl install path will change if we install the toolbox version of the rpm package, e.g. /opt/freeware (I haven't tried this because I don't have a test environment at the moment).
    In this case, depending on the coding of the application team, we would have to review the settings and environment variables, is this correct?
    (e.g. coding with full path specification, etc.)



    ------------------------------
    Gen-ei Takao
    ------------------------------



  • 8.  RE: How to get and build perl modules in aix7.3

    Posted Fri August 30, 2024 01:36 AM

    I prepared a verification environment and tested it

    I got ESD-Toolbox_for_Linux_Apps_Common_7.2-7.3_062024_LKT010327.tar.gz from ESD since I can't access to the Internet.

    # . /dnf_aixtoolbox_local.sh

    # /opt/freeware/bin/dnf install perl

    # which perl
    /usr/bin/perl
    # ls -la /usr/bin/perl
    lrwxrwxrwx 1 root system 29 Aug 18 2023 /usr/bin/perl -> /usr/opt/perl5/bin/perl5.34.1

    # perl -v

    This is perl 5, version 34, subversion 1 (v5.34.1) built for aix-thread-multi
    Omit the following


    # /opt/freeware/bin/perl -v

    This is perl 5, version 38, subversion 2 (v5.38.2) built for ppc-aix-thread-multi-64all
    Omit the following

    From the above
    Is it OK to change the /usr/bin/perl link from /usr/opt/perl5/bin/perl5.34.1 to /opt/freeware/bin/perl_32bit (because the existing environment is 32bit)?
    Or should I have the application team modify the program?
    I'd appreciate it if you could enlighten me.



    ------------------------------
    Gen-ei Takao
    ------------------------------



  • 9.  RE: How to get and build perl modules in aix7.3

    Posted Fri August 30, 2024 11:58 AM

    Hello Takao-San

    You asked:

    Is it OK to change the /usr/bin/perl link from /usr/opt/perl5/bin/perl5.34.1 to /opt/freeware/bin/perl_32bit (because the existing environment is 32bit)?
    Or should I have the application team modify the program?

    As noted in the previously mentioned technote,

    AIX Perl Updates and Support for perl.rte
    https://www.ibm.com/support/pages/node/885927

    Replacing /usr/bin/perl links with custom Perl installations can cause unexpected results for AIX applications, and is not supported.

    Additionally, you would encounter issues during any subsequent updates, since the perl.rte update would replace your links.

    It is best to handle this in the application level, then you have control over the updates.



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 10.  RE: How to get and build perl modules in aix7.3

    Posted Mon September 02, 2024 09:29 PM

    Thank you for your answer, Harris.

    We have decided not to change the symbolic to /usr/bin/perl.

    The application team will be asked to use /opt/freeware/bin/perl_32bit.

    Summary
    ・The system-supplied perl perl.rte is not intended to be used by users.
    ・If users want to use perl, use AIX Toolbox for Open Source Software.
    ・The system uses /usr/bin/perl (actually /usr/opt/perl5/bin/perl5.34.1).
    ・Users should use binaries under /opt/freeware/bin.



    ------------------------------
    Gen-ei Takao
    ------------------------------