Aha! This ape/mp.h references the native lib not ape one. Applying the fix below and recompiling ape/lib/mp and ape/lib/sec eliminates the reference to /386/lib/libc.a, leaving just a few of unresolved references:
pcc -o 8.out bitmap.8 cache.8 channels.8 cliprdr.8 ewmhints.8 frpc.8 iso.8 licence.8 mcs.8 mppc.8 orders.8 pstcache.8 rdesktop.8 rdp.8 rdp5.8 seamless.8 secure.8 tcp.8 snarf.8 xkeymap.8 xwin.8 
mpkaratsuba: undefined: mallocz
_PIPE: argv0: not defined
pcc: 8l: 8l 97689: error

The mp.h fix:

/n/sources/plan9/sys/include/ape/mp.h:5,12 - /sys/include/ape/mp.h:5,12
  #ifndef __LIBMP_H_
  #define __LIBMP_H_
  
- #pragma src "/sys/src/libmp"
- #pragma lib "libmp.a"
+ #pragma src "/sys/src/ape/lib/mp"
+ #pragma lib "/$M/lib/ape/libmp.a"
  
  typedef unsigned int mpdigit; /* from /$objtype/include/u.h */
  



2013/2/4 Yaroslav <yarikos@gmail.com>
Hi,

I've noticed there are libsec/libmp became available for APE programs, and dove into replacing OpenSSL calls with libsec equivalents. However, there are still a reference to the native libc lurks somewhere in the ports as the linker reports conflicts like these:

checkenv: incompatible type signatures a9aa533a(/386/lib/ape/libap.a(freopen)) and aebfd74f(/386/lib/libc.a(calloc)) for open
ppanic: incompatible type signatures 4dcf09c4(/386/lib/ape/libap.a(_IO_putc)) and 55e8553c(/386/lib/libc.a(calloc)) for write
malloc: /386/lib/libc.a(calloc): redefinition: malloc
(1070) TEXT malloc+0(SB),$24
free: /386/lib/libc.a(calloc): redefinition: free
...

Could someone suggest a method for tracking down the library/object file which contains the loader instruction to load /386/lib/libc.a?

Thanks.
--
- Yaroslav



--
- Yaroslav