1

If I understand correctly, the variables LIBPATH and LD_LIBRARY_PATH have a higher priority than the argument to the linker -blibpath. I'm looking for how to tell the loader to search for libraries along the paths prescribed during compilation (that is, -blibpath or some other). On linux, for example, there is -rpath, which has priority higher than variables. I'm looking for an analog on AIX.

I'm also looking for where the priority of paths for finding libraries on AIX is clearly described.

6
  • I don't know about "priorities", but with option -bipath you can store the full path of the shared object. Details here: lzsiga.users.sourceforge.net/aix-linking.html Commented Oct 15, 2023 at 5:54
  • @LorinczyZsigmond thank, it works, but only when the compilation takes place directly on the AIX computer. When I try to cross-compile the code (from linux to AIX), it turns out that cross-compiler does not have the -bipath flag Commented Oct 24, 2023 at 10:58
  • @LorinczyZsigmond ./powerpc-ibm-aix7.1.0.0-gcc --version powerpc-ibm-aix7.1.0.0-gcc (GCC) 4.8.3 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Commented Oct 24, 2023 at 10:59
  • It is -Wl,-bipath when ld is invoked from gcc Commented Oct 24, 2023 at 12:35
  • @LorinczyZsigmond powerpc-ibm-aix7.1.0.0-gcc -Wl,-bipath /tmp/libgcc_s.a main.c /opt/crossaix/lib/gcc/powerpc-ibm-aix7.1.0.0/4.8.3/../../../../powerpc-ibm-aix7.1.0.0/bin/ld: target ipath not found collect2: error: ld returned 1 exit status Commented Oct 24, 2023 at 12:50

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.