AIX Open Source

 View Only
Expand all | Collapse all

building self contained httpd - some quirks with libiconv and libintl

  • 1.  building self contained httpd - some quirks with libiconv and libintl

    Posted Wed February 03, 2021 09:34 AM
    Edited by C- -T Wed February 03, 2021 09:35 AM
    hi,

    i am building a self contained apache distribution für internal usage, this has worked for some time now. today  during build i found out that some
    libs from the aixtoolbox are not behaving as usual.
    they insist in loading from /opt/freeware instead of the libpath set at buildtime, no matter what. of course i copy all the required libs to the self contained apache structure at buildtime, but its pointless.

    these are the suspects.

    root@aixbuildhostng: /tmp/apatest/modules # ldd mod_md.so | grep freeware
                        /opt/freeware/lib/libgssapi_krb5.a(libgssapi_krb5.so)
                        /opt/freeware/lib/libkrb5.a(libkrb5.so)
                        /opt/freeware/lib/libk5crypto.a(libk5crypto.so)
                        /opt/freeware/lib/libcom_err.a(libcom_err.so)
                        /opt/freeware/lib/libiconv.a(libiconv.so.2)
    ​

    i digged around with the dump command and found out that libintl has a strict searchpath for libiconv linked in , which seems the rootcause of the above. as libintl is used in most librariers this explains why the krb5* libs are showing up.

    root@aixbuildhostng: /tmp/apatest/lib # dump -H -Xany /opt/freeware/lib/libintl.a
    
    /opt/freeware/lib/libintl.a[libintl.so.8]:
    
                            ***Loader Section***
                          Loader Header Information
    VERSION#         #SYMtableENT     #RELOCent        LENidSTR
    0x00000001       0x00000088       0x0000010a       0x00000082
    
    #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
    0x00000005       0x00001958       0x0000084e       0x000019da
    
    
                            ***Import File Strings***
    INDEX  PATH                          BASE                MEMBER
    0      /opt/freeware/lib:/usr/lib
    1                                    libgcc_s.a          shr.o
    2      /opt/freeware/lib             libiconv.a          libiconv.so.2
    3                                    libc.a              shr.o
    4                                    libpthreads.a       shr_xpg5.o
    ​


    are there any tricks to get me build going again?



    ------------------------------
    I regret starting this entire conversation
    ------------------------------


  • 2.  RE: building self contained httpd - some quirks with libiconv and libintl

    Posted Wed February 03, 2021 10:05 AM
    We recently hardcoded the library search path for the Toolbox libraries/binaries linking to libiconv to /opt/freeware//lib/libiconv.a because there are users who sets LIBPATH to /usr/lib and that creates loading failure of Toolbox binaries because of AIX base provided /usr/llib/libiconv.a . /opt/freeware/lib/libiconv.a & /usr/lib/libiconv.a are incompatible libraries.

    I don't think there is any option to change it. Toolbox libintl.a library ( or kerberos libraries) is always going to link to /opt/freeware/lib/libiconv.a

    ------------------------------
    Ayappan P
    ------------------------------