Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  Trying to build openidc - failing with Undefined symbol:

    Posted Thu August 31, 2023 02:30 AM

    Hey All,

    I have downloaded openidc code from Git and trying to do - configure / make / make install

    Configure is now working good.  On the make im getting,

    ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__AIXI_libaprutil_1_so
    ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__AIXI_libapr_1_so
    ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__AIXD_libaprutil_1_so
    ld: 0711-317 ERROR: Undefined symbol: _GLOBAL__AIXD_libapr_1_so
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: error: ld returned 8 exit status
    make: *** [Makefile:809: test/test-cmd] Error 1

    I built new libapr and libaprutil successfully from Git to get the libapr-1.a and libaprutil-1.a files.  They were not there from dnf install of apr-1.7.4-1.ppc
    apr-util-1.6.3-1.ppc only  Shared Object files .so

    If I move libapr-1.a and libaprutil-1.a to .old the make will fail ld: 0706-006 Cannot find or open library file: -l aprutil-1
            ld:open(): No such file or directory
    ld: 0706-006 Cannot find or open library file: -l apr-1
            ld:open(): No such file or directory

    So Im sure the undefined symbols are coming from my the libapr-1.a file and libaprutil-1.a file.

    Any help or pointer very much appreciated please...

    Thanks,

    Brad



    ------------------------------
    Bradley Wells
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Thu August 31, 2023 05:03 AM
    Edited by Ranjit Ranjan Thu August 31, 2023 05:03 AM

    Hi

    • Let us know the steps followed to compile openidc. Share the git URL also.
    • Which compiler you are using to build openidc.
    • Why are you building libapr libraries . Any specific reason ?

    Thanks



    ------------------------------
    Ranjit Ranjan
    ------------------------------



  • 3.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Thu August 31, 2023 05:40 AM

    Hey Ranjit,

    So tried both downloading Apache tarball for OpenIDC and also git - git clone https://github.com/OpenIDC/mod_auth_openidc

    Both fail same place with those four undefined symbols.

    I can see in this file,

     strings /opt/freeware/lib/libaprutil-1.so | grep -i GLOBAL
    _GLOBAL__FI_libaprutil_1_so
    _GLOBAL__FD_libaprutil_1_so

    Compiler = gcc 10.3.0

    So rpms for libapr libaprutil from AIX Toolbox didn't provide libaprutil-1.a or  libapr-1.a archive files just the .so files. When I built those separately I got the .a file.

    Without the .a files in /opt/freeware/lib64 the make will bomb out with cant find libapr or libaprutil

    Thanks,

    Brad



    ------------------------------
    Bradley Wells
    ------------------------------



  • 4.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Thu August 31, 2023 07:14 AM
    Edited by Ranjit Ranjan Thu August 31, 2023 07:15 AM

    Hi

    Could you export below settings for linker and build again freshly.

    export LDFLAGS="-Wl,-brtl"

    Thanks

    Ranjit



    ------------------------------
    Ranjit Ranjan
    ------------------------------



  • 5.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Thu August 31, 2023 07:40 AM

    Hi Ranjit,

    It worked lol thanks so much. Tell me what does this do ? 

    Kind regards

    Brad



    ------------------------------
    Bradley Wells
    ------------------------------



  • 6.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Thu August 31, 2023 09:03 AM

    Hi,

    This -brtl option to linker will request linker to enable the run time linking for the application . As we don't have .a files for aprutil library and only .so files are available , so this -brtl option can be used for building the application in this scenario. 

    It will be good if AIX toolbox can provide .a, instead of .so.
    For more info, Have a look into this old blog https://web.archive.org/web/20100514132209/http://durgaprasad.wordpress.com/2006/09/28/problems-with-linking-of-shared-libraries-in-aix/ 



    ------------------------------
    Ranjit Ranjan
    ------------------------------



  • 7.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Fri September 01, 2023 01:49 AM

    Morning Ranjit,

    Thank you for the explanation and link - makes sense now.

    Thanks again!

    Brad



    ------------------------------
    Bradley Wells
    ------------------------------



  • 8.  RE: Trying to build openidc - failing with Undefined symbol:

    Posted Mon September 04, 2023 07:19 AM

    Hey All,

    Ok got a bit further now trying to load the openidc in Apache when accessing protected URL I'm getting some shared memory errors in error_log,

    [Mon Sep 04 12:14:36.740891 2023] [auth_openidc:error] [pid 6095110:tid 515] oidc_cache_mutex_lock: apr_global_mutex_lock() failed: Permission denied (13)
    [Mon Sep 04 12:14:36.774972 2023] [auth_openidc:error] [pid 6095110:tid 515] oidc_cache_mutex_unlock: apr_global_mutex_unlock() failed: Permission denied (13)

    Im trying to figure out where the permission denied is coming from...

    Thanks,

    Brad



    ------------------------------
    Bradley Wells
    ------------------------------