[OpenAFS] linking afs.ext.64 on AIX fails with missing symbol vprintf

Jeffrey E Altman jaltman@auristor.com
Sat, 13 Aug 2022 05:23:44 -0400


This is a cryptographically signed message in MIME format.

--------------ms070105090206060102090309
Content-Type: multipart/alternative;
 boundary="------------gdh5fbR86AU2biDLXnnEslaL"

--------------gdh5fbR86AU2biDLXnnEslaL
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On 8/13/2022 1:57 AM, Ben Huntsman (ben@huntsmans.net) wrote:
> After a few tweaks to some of the source files (which I will submit
> later), I have all the code for afs.ext.64 compiling, but it fails to
> link due to a missing symbol .vprintf.  The AIX man pages show that
> this is included in /lib/libc.a, and nm confirms it.  
>
libc is a userspace library.   The failure is when linking the kernel
module and there is no vprintf in the kernel.


> The reference is from src/rx/rx_kcommon.c:
>
> void
> osi_Msg(const char *fmt, ...)
> {
>     va_list ap;
>     va_start(ap, fmt);
> #if defined(AFS_LINUX_ENV)
>     vprintk(fmt, ap);
> #else
>     vprintf(fmt, ap);
> #endif
>     va_end(ap);
> }
>
>
> Just as another sloppy fix I tried several variants of print functions
> that could substitute on AIX, but they all fail with a missing
> symbol.  How did this work on AIX in the past?
>
The vprintf usage in kernel on AIX was introduced by


  https://gerrit.openafs.org/14791




--------------gdh5fbR86AU2biDLXnnEslaL
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 8/13/2022 1:57 AM, Ben Huntsman
      (<a class="moz-txt-link-abbreviated" href="mailto:ben@huntsmans.net">ben@huntsmans.net</a>) wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:MWHPR0701MB3674039C4659C58B11EF9213A7669@MWHPR0701MB3674.namprd07.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
        After a few tweaks to some of the source files (which I will
        submit later), I have all the code for afs.ext.64 compiling, but
        it fails to link due to a missing symbol .vprintf.  The AIX man
        pages show that this is included in /lib/libc.a, and nm confirms
        it.  </div>
      <br>
    </blockquote>
    <p>libc is a userspace library.   The failure is when linking the
      kernel module and there is no vprintf in the kernel.</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:MWHPR0701MB3674039C4659C58B11EF9213A7669@MWHPR0701MB3674.namprd07.prod.outlook.com">
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
        The reference is from src/rx/rx_kcommon.c:</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
        void
        <div>osi_Msg(const char *fmt, ...)</div>
        <div>{</div>
        <div>    va_list ap;</div>
        <div>    va_start(ap, fmt);</div>
        <div>#if defined(AFS_LINUX_ENV)</div>
        <div>    vprintk(fmt, ap);</div>
        <div>#else</div>
        <div>    vprintf(fmt, ap);</div>
        <div>#endif</div>
        <div>    va_end(ap);</div>
        <div>}</div>
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
        Just as another sloppy fix I tried several variants of print
        functions that could substitute on AIX, but they all fail with a
        missing symbol.  How did this work on AIX in the past?</div>
      <br>
    </blockquote>
    <p>The vprintf usage in kernel on AIX was introduced by <br>
    </p>
    <p><br>
    </p>
    <p>  <a class="moz-txt-link-freetext" href="https://gerrit.openafs.org/14791">https://gerrit.openafs.org/14791</a></p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>

--------------gdh5fbR86AU2biDLXnnEslaL--

--------------ms070105090206060102090309
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
DHEwggXSMIIEuqADAgECAhBAAYJpmi/rPn/F0fJyDlzMMA0GCSqGSIb3DQEBCwUAMDoxCzAJ
BgNVBAYTAlVTMRIwEAYDVQQKEwlJZGVuVHJ1c3QxFzAVBgNVBAMTDlRydXN0SUQgQ0EgQTEz
MB4XDTIyMDgwNDE2MDQ0OFoXDTI1MTAzMTE2MDM0OFowcDEvMC0GCgmSJomT8ixkAQETH0Ew
MTQxMEQwMDAwMDE4MjY5OUEyRkQyMDAwMjMzQ0QxGTAXBgNVBAMTEEplZmZyZXkgRSBBbHRt
YW4xFTATBgNVBAoTDEF1cmlTdG9yIEluYzELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCkC7PKBBZnQqDKPtZPMLAy77zo2DPvwtGnd1hNjPvbXrpGxUb3
xHZRtv179LHKAOcsY2jIctzieMxf82OMyhpBziMPsFAG/ukihBMFj3/xEeZVso3K27pSAyyN
fO/wJ0rX7G+ges22Dd7goZul8rPaTJBIxbZDuaykJMGpNq4PQ8VPcnYZx+6b+nJwJJoJ46kI
EEfNh3UKvB/vM0qtxS690iAdgmQIhTl+qfXq4IxWB6b+3NeQxgR6KLU4P7v88/tvJTpxIKkg
9xj89ruzeThyRFd2DSe3vfdnq9+g4qJSHRXyTft6W3Lkp7UWTM4kMqOcc4VSRdufVKBQNXjG
IcnhAgMBAAGjggKcMIICmDAOBgNVHQ8BAf8EBAMCBPAwgYQGCCsGAQUFBwE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