[OpenAFS] linking afs.ext.64 on AIX fails with missing symbol vprintf
Ben Huntsman
ben@huntsmans.net
Sat, 13 Aug 2022 05:57:41 +0000
--_000_MWHPR0701MB3674039C4659C58B11EF9213A7669MWHPR0701MB3674_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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. Here is the error:
/usr/bin/ld -b"binder:/usr/lib/bind glink:/usr/lib/glink64.o" -bnoe=
ntry -b h:4 -D0 -T512 -b64 -bloadmap:afs.ext.64.loadmap -bmap:afs.ext.64.=
map -o afs.ext.64 sha256-kernel.o rand-timer-kernel.o afs_atomlist.o af=
s_lhash.o afs_analyze.o afs_axscache.o afs_buffer.o afs_bypassc=
ache.o afs_callback.o afs_cbqueue.o afs_cell.o afs_chunk.o =
afs_conn.o afs_daemons.o afs_dcache.o afs_dir.o =
afs_disconnected.o afs_dynroot.o afs_error.o afs_icl=
.o afs_init.o afs_lock.o afs_mariner.o afs_memcache.o afs_fetchstore.=
o afs_osi.o afs_osidnlc.o afs_osi_alloc.o af=
s_osi_pag.o afs_osi_uio.o afs_osi_vget.o afs_osi_vm.o afs_segments.o a=
fs_server.o afs_stat.o afs_syscall.o afs_tokens.o afs_user.o afs_util.=
o afs_vcache.o afs_vnop_access.o afs_vnop_attrs.o afs_vnop_create.o af=
s_vnop_dirops.o afs_vnop_fid.o afs_vnop_flock.o afs_vnop_link.o afs_vno=
p_lookup.o afs_vnop_open.o afs_vnop_read.o afs_vnop_readdir.o afs_vnop_=
remove.o afs_vnop_rename.o afs_vnop_strategy.o afs_vnop_symlink.o afs_v=
nop_write.o afs_volume.o afs_warn.o xdr_update.o xdr_refernce.o =
Kvice.xdr.o xdr_arrayn.o xdr_array.o xdr_int32.o xdr_int64.=
o Kvice.cs.o fcrypt.o rx.o rx_call.o =
rx_conn.o rx_peer.o rx_rdwr.o rx_clock.o rx_event=
.o rx_globals.o rx_identity.o rx_kmutex.o rx_knet.o rx_=
kcommon.o rx_misc.o rx_null.o rx_opaque.o rx_getaddr.o =
rx_packet.o rx_multi.o rx_stats.o opr_rbtree.o xdr_rx.o =
xdr_mem.o xdr_len.o Kvldbint.cs.o Kvldbint.xdr.o Kcal=
lback.ss.o Krxstat.ss.o Krxstat.xdr.o rxstat.o crypt_conn.o =
AFS_component_version_number.o afs_exporter.o rxkad_client.o rxkad_comm=
on.o xdr_afsuuid.o xdr.o Ktoken.xdr.o md5.o evp.o=
evp-algs.o rand-kernel.o alloc-kernel.o aes.o =
rijndael-alg-fst.o sha.o n-fold.o crypto.o =
crypto-algs.o crypto-aes.o crypto-context.o crypto-copy.o =
crypto-ct.o crypto-evp.o crypto-data.o crypto-keyblock.o crypto=
-store-int.o crypto-random.o afs_uuid.o osi_assem.o osi_config.o osi_gc=
pags.o osi_groups.o osi_file.o osi_inode.o osi_misc.o osi_sleep.o osi=
_timeout.o osi_vcache.o osi_vm.o rand-fortuna-kernel.o afs_call.o afs_p=
ioctl.o osi_vfsops.o osi_vnodeops.o -m -eafs_config -bexport:/project/o=
penafs/lib/afs.exp -bI:/lib/kernex.exp -bI:/lib/syscalls.exp -bI:/lib/socke=
ts.exp -bI:/lib/netinet.exp -bI:/project/openafs/lib/extras.exp -lsys -=
lcsys -b64 -bI:/project/openafs/lib/export64.exp
ld: 0711-224 WARNING: Duplicate symbol: vnodefops
ld: 0711-224 WARNING: Duplicate symbol: .___memmove64
ld: 0711-224 WARNING: Duplicate symbol: ___memmove64
ld: 0711-224 WARNING: Duplicate symbol: .___memset64
ld: 0711-224 WARNING: Duplicate symbol: ___memset64
ld: 0711-224 WARNING: Duplicate symbol: .ip_stripoptions
ld: 0711-224 WARNING: Duplicate symbol: .soclose
ld: 0711-224 WARNING: Duplicate symbol: soclose
ld: 0711-224 WARNING: Duplicate symbol: Trconflag
ld: 0711-224 WARNING: Duplicate symbol: .sounlock
ld: 0711-224 WARNING: Duplicate symbol: sounlock
ld: 0711-224 WARNING: Duplicate symbol: .close
ld: 0711-224 WARNING: Duplicate symbol: close
ld: 0711-224 WARNING: Duplicate symbol: .___memcmp64
ld: 0711-224 WARNING: Duplicate symbol: ___memcmp64
ld: 0711-224 WARNING: Duplicate symbol: .kioctl
ld: 0711-224 WARNING: Duplicate symbol: .lookupname
ld: 0711-224 WARNING: Duplicate symbol: lookupname
ld: 0711-224 WARNING: Duplicate symbol: .socreate
ld: 0711-224 WARNING: Duplicate symbol: socreate
ld: 0711-224 WARNING: Duplicate symbol: .soreserve
ld: 0711-224 WARNING: Duplicate symbol: soreserve
ld: 0711-224 WARNING: Duplicate symbol: .sobind
ld: 0711-224 WARNING: Duplicate symbol: sobind
ld: 0711-344 See the loadmap file afs.ext.64.loadmap for more information.
ld: 0711-319 WARNING: Exported symbol not defined: afs_setTimeHost
ld: 0711-319 WARNING: Exported symbol not defined: rxevent_nFree
ld: 0711-319 WARNING: Exported symbol not defined: rxevent_nPosted
ld: 0711-319 WARNING: Exported symbol not defined: freeSQEList_lock
ld: 0711-319 WARNING: Exported symbol not defined: rxevent_lock
ld: 0711-317 ERROR: Undefined symbol: .vprintf
make: 1254-004 The error code from the last command is 8.
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?
Thank you!
-Ben
--_000_MWHPR0701MB3674039C4659C58B11EF9213A7669MWHPR0701MB3674_
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);" class=3D"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 includ=
ed in /lib/libc.a, and nm confirms it.
Here is the error:</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
/usr/bin/ld -b"binder:/usr/lib/bind glink:=
/usr/lib/glink64.o" -bnoentry -b h:4 -D0 -T512 -b64 -bloadmap:af=
s.ext.64.loadmap -bmap:afs.ext.64.map -o afs.ext.64 sha256-kern=
el.o rand-timer-kernel.o afs_atomlist.o afs_lhash.o  =
;afs_analyze.o afs_axscache.o
afs_buffer.o afs_bypasscache.o af=
s_callback.o afs_cbqueue.o afs_cell.o &n=
bsp;afs_chunk.o afs_conn.o=
afs_daemons.o afs_dcache.o afs_dir.o &nbs=
p; afs_disconnected.o &nbs=
p; afs_dynroot.o afs_error.=
o afs_icl.o
afs_init.o afs_lock.o afs_mariner.o afs_memcache.o=
afs_fetchstore.o afs_osi.o =
afs_osidnlc.o afs_osi_alloc.o &n=
bsp; afs_osi_pag.o afs_osi_uio.o afs_osi_v=
get.o afs_osi_vm.o afs_segments.o afs_server.o afs_=
stat.o afs_syscall.o
afs_tokens.o afs_user.o afs_util.o afs_vcache.o &n=
bsp;afs_vnop_access.o afs_vnop_attrs.o afs_vnop_create.o =
afs_vnop_dirops.o afs_vnop_fid.o afs_vnop_flock.o afs_vno=
p_link.o afs_vnop_lookup.o afs_vnop_open.o afs_vnop_read.=
o afs_vnop_readdir.o afs_vnop_remove.o
afs_vnop_rename.o afs_vnop_strategy.o afs_vnop_symlink.o=
afs_vnop_write.o afs_volume.o afs_warn.o xdr_updat=
e.o xdr_refernce.o Kvice.xdr.o &nb=
sp; xdr_arrayn.o xdr_array.o xdr_int32.o =
xdr_int64.o Kvice.cs.o fcrypt.o &n=
bsp;
rx.o rx_call.=
o rx_conn.o rx_peer.o &nbs=
p; rx_rdwr.o rx_clock.o rx_=
event.o rx_globals.o rx_identity.o =
rx_kmutex.o rx_knet.o rx_kcommon.o  =
; rx_misc.o rx_null.o rx_op=
aque.o rx_getaddr.o
rx_packet.o rx_multi.o rx_s=
tats.o opr_rbtree.o xdr_rx.o =
xdr_mem.o xdr_len.o =
Kvldbint.cs.o Kvldbint.xdr.o Kcallback.ss.o Krxstat.ss.=
o Krxstat.xdr.o rxstat.o cry=
pt_conn.o AFS_component_version_number.o
afs_exporter.o rxkad_client.o rxkad_common.o xdr_afsuui=
d.o xdr.o Ktoken.xdr.o &nb=
sp;md5.o evp.o &nbs=
p; evp-algs.o rand-kernel.o alloc-k=
ernel.o aes.o  =
; rijndael-alg-fst.o sha.o =
n-fold.o
crypto.o crypto-algs.o crypt=
o-aes.o crypto-context.o crypto-copy.o &n=
bsp; crypto-ct.o crypto-evp.o crypto-data.o &nbs=
p; crypto-keyblock.o crypto-store-int.o crypto-random.o a=
fs_uuid.o osi_assem.o osi_config.o osi_gcpags.o osi_group=
s.o
osi_file.o osi_inode.o osi_misc.o osi_sleep.o &nbs=
p;osi_timeout.o osi_vcache.o osi_vm.o rand-fortuna-kernel=
.o afs_call.o afs_pioctl.o osi_vfsops.o osi_vnodeops.o &n=
bsp; -m -eafs_config -bexport:/project/openafs/lib/afs.exp -bI:/lib/kernex.=
exp -bI:/lib/syscalls.exp
-bI:/lib/sockets.exp -bI:/lib/netinet.exp -bI:/project/openafs=
/lib/extras.exp -lsys -lcsys -b64 -bI:/project/openafs/lib/exp=
ort64.exp
<div>ld: 0711-224 WARNING: Duplicate symbol: vnodefops</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .___memmove64</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: ___memmove64</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .___memset64</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: ___memset64</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .ip_stripoptions</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .soclose</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: soclose</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: Trconflag</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .sounlock</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: sounlock</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .close</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: close</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .___memcmp64</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: ___memcmp64</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .kioctl</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .lookupname</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: lookupname</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .socreate</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: socreate</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .soreserve</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: soreserve</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: .sobind</div>
<div>ld: 0711-224 WARNING: Duplicate symbol: sobind</div>
<div>ld: 0711-344 See the loadmap file afs.ext.64.loadmap for more informat=
ion.</div>
<div>ld: 0711-319 WARNING: Exported symbol not defined: afs_setTimeHost</di=
v>
<div>ld: 0711-319 WARNING: Exported symbol not defined: rxevent_nFree</div>
<div>ld: 0711-319 WARNING: Exported symbol not defined: rxevent_nPosted</di=
v>
<div>ld: 0711-319 WARNING: Exported symbol not defined: freeSQEList_lock</d=
iv>
<div>ld: 0711-319 WARNING: Exported symbol not defined: rxevent_lock</div>
<div>ld: 0711-317 ERROR: Undefined symbol: .vprintf</div>
<div>make: 1254-004 The error code from the last command is 8.</div>
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
The reference is from src/rx/rx_kcommon.c:</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"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=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"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. Ho=
w did this work on AIX in the past?</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
Thank you!</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
-Ben</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
</body>
</html>
--_000_MWHPR0701MB3674039C4659C58B11EF9213A7669MWHPR0701MB3674_--