Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PA-4871) Add our libdir to the runtime linker search path #690

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

joshcooper
Copy link
Contributor

@joshcooper joshcooper commented Jun 30, 2023

When the runtime linker loads executables, it uses a search path in the
executable to find library dependencies. On most platforms this is done
via -rpath, but on AIX it's -R. The search path is embedded in the
executable and can be seen using:

# dump -H /opt/puppetlabs/puppet/bin/openssl
...
                           ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0      /opt/puppetlabs/puppet/lib:/usr/lib:/lib

Built in https://jenkins-platform.delivery.puppetlabs.net/view/vanagon-generic-builder/job/platform_vanagon-generic-builder_vanagon-packaging_generic-builder/2110/BUILD_TARGET=aix-7.2-ppc,SLAVE_LABEL=k8s-worker/

Project agent-runtime-main

Platform name: aix-7.2-ppc

Component 'openssl-3.0'

        Field: environment

- CC=/opt/freeware/bin/gcc CFLAGS=-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include -static-libgcc LDFLAGS=-Wl,-brtl -L/opt/puppetlabs/puppet/lib -latomic -lm
+ CC=/opt/freeware/bin/gcc CFLAGS=-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include -static-libgcc LDFLAGS=-Wl,-brtl -L/opt/puppetlabs/puppet/lib -Wl,-R/opt/puppetlabs/puppet/lib -latomic -lm

@joshcooper joshcooper force-pushed the aix72_openssl branch 2 times, most recently from ebaa230 to fd31343 Compare July 5, 2023 18:55
When the runtime linker loads executables, it uses a search path in the
executable to find library dependencies. On most platforms this is done
via -rpath, but on AIX it's -R. The search path is embedded in the
executable and can be seen using:

    # dump -H /opt/puppetlabs/puppet/bin/openssl
    ...
                               ***Import File Strings***
    INDEX  PATH                          BASE                MEMBER
    0      /opt/puppetlabs/puppet/lib:/usr/lib:/lib
@joshcooper joshcooper marked this pull request as ready for review July 6, 2023 01:22
@joshcooper joshcooper requested review from a team as code owners July 6, 2023 01:22
@cthorn42 cthorn42 merged commit b6922b8 into puppetlabs:master Jul 6, 2023
@joshcooper joshcooper deleted the aix72_openssl branch July 6, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants