[OpenAFS-devel] Shared library support on AIX

Ben Huntsman ben@huntsmans.net
Fri, 14 Apr 2023 19:35:13 +0000


--_000_MWHPR0701MB36740F0C36CE669CCCAC88DFA7999MWHPR0701MB3674_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi guys-
   Looking into fixing the build for --enable-transarc-paths on AIX.  One t=
hing I've noticed is that when that's not specified, and then you run make =
install, the $PREFIX/libs directory gets librokenafs.a, which contains the =
static .o files, etc for other libraries.  However, in the source tree, the=
re is a libroken.a and a .libs/libroken.a.  The .libs version includes the =
shared module librokenafs.so.2.  However when building with Transarc paths,=
 it installs the static version of libroken.a into /usr/local/lib, but all =
the binaries are built shared, so many of them crash with a message like:

exec(): 0509-036 Cannot load program ./vlserver because of the following er=
rors:
        0509-150   Dependent module /usr/local/lib/librokenafs.a(librokenaf=
s.so.2) could not be loaded.
        0509-152   Member librokenafs.so.2 is not found in archive

   I think an ideal scenario would be have all the .o files, as well as lib=
rokenafs.so.2 in the .a file.

   I guess I'm looking for suggestions as to how to accomplish that, or, ho=
w to make it so that make install does the right thing when using Transarc =
paths.  Where I'm getting a bit hung up is that when not using Transarc pat=
hs, both the static and shared libs are built, but only the static ones are=
 installed and everything works.  Yet it would seem that the makefiles for =
install are the same.

Thanks in advance.  I hope I explained all that clearly.

-Ben


--_000_MWHPR0701MB36740F0C36CE669CCCAC88DFA7999MWHPR0701MB3674_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
Hi guys-</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
&nbsp; &nbsp;Looking into fixing the build for --enable-transarc-paths on A=
IX.&nbsp; One thing I've noticed is that when that's not specified, and the=
n you run make install, the $PREFIX/libs directory gets librokenafs.a, whic=
h contains the static .o files, etc for other libraries.&nbsp;
 However, in the source tree, there is a libroken.a and a .libs/libroken.a.=
&nbsp; The .libs version includes the shared module librokenafs.so.2.&nbsp;=
 However when building with Transarc paths, it installs the static version =
of libroken.a into /usr/local/lib, but all
 the binaries are built shared, so many of them crash with a message like:<=
/div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
exec(): 0509-036 Cannot load program ./vlserver because of the following er=
rors:
<div class=3D"ContentPasted0">&nbsp; &nbsp; &nbsp; &nbsp; 0509-150 &nbsp; D=
ependent module /usr/local/lib/librokenafs.a(librokenafs.so.2) could not be=
 loaded.</div>
<div class=3D"ContentPasted0">&nbsp; &nbsp; &nbsp; &nbsp; 0509-152 &nbsp; M=
ember librokenafs.so.2 is not found in archive
</div>
<div class=3D"ContentPasted0"><br>
</div>
&nbsp; &nbsp;I think an ideal scenario would be have all the .o files, as w=
ell as librokenafs.so.2 in the .a file.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
&nbsp; &nbsp;I guess I'm looking for suggestions as to how to accomplish th=
at, or, how to make it so that make install does the right thing when using=
 Transarc paths.&nbsp; Where I'm getting a bit hung up is that when not usi=
ng Transarc paths, both the static and shared libs
 are built, but only the static ones are installed and everything works.&nb=
sp; Yet it would seem that the makefiles for install are the same.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
Thanks in advance.&nbsp; I hope I explained all that clearly.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
-Ben</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
</body>
</html>

--_000_MWHPR0701MB36740F0C36CE669CCCAC88DFA7999MWHPR0701MB3674_--