9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Yaroslav <yarikos@gmail.com>
To: 9fans@9fans.net
Subject: Re: [9fans] APE libsec
Date: Mon,  4 Feb 2013 13:44:48 +0200	[thread overview]
Message-ID: <CAG3N4d_2BdmZOz-VYMJ03pUxJN6bFFz0mG2ZiqbD7CQYAs-ZGw@mail.gmail.com> (raw)
In-Reply-To: <CAG3N4d9_2kgQGjD0e775=DoMpkRepMvAsA7SOPue1DDn9S3u6w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1796 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3148 bytes --]

  reply	other threads:[~2013-02-04 11:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 11:31 Yaroslav
2013-02-04 11:44 ` Yaroslav [this message]
2013-02-04 16:11   ` Jeff Sickel
2013-02-05  8:32     ` yaroslav
2013-02-05  8:41       ` Jens Staal
2013-02-05 15:28         ` erik quanstrom
2013-02-05 15:38       ` erik quanstrom
2013-02-08 15:35         ` Yaroslav
2013-02-09  2:46           ` Jeff Sickel
2013-02-12 21:27             ` michaelian ennis
2013-02-04 13:06 ` lucio
2013-02-04 15:46   ` erik quanstrom
2013-02-04 15:50     ` lucio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG3N4d_2BdmZOz-VYMJ03pUxJN6bFFz0mG2ZiqbD7CQYAs-ZGw@mail.gmail.com \
    --to=yarikos@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).