9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan9ports won't compile: undefined ref to getcallerpc
@ 2004-10-19 20:35 Derek Davis
  2004-10-19 21:14 ` Eric Van Hensbergen
  0 siblings, 1 reply; 4+ messages in thread
From: Derek Davis @ 2004-10-19 20:35 UTC (permalink / raw)
  To: 9fans

I've been trying to compile plan9port in linux simply so that I can
use Acme.  However, whenever I run the install script, it will go for
a while but quit with errors when running '9l -o o.9p 9p.o...'.  All
the shown errors are in the file fdwait.c, and are due to undefined
reference to getcallerpc.  I opened fdwait.c and it includes libc.h,
which defines getcallerpc, so I am not sure what is causing the error.
 Google searches turned up nothing, and I could find nothing in the
list archives about this.  Have you seen this problem before, and do
you know what might be causing it?  I am building on a Gentoo system
using gcc 3.3.4-r1.

Thanks in advance.
-- 
Derek M Davis                                derek.davis@gmail.com
-------------------------------------------------------------------
"We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us happy is something to be
enthusiastic about." - Albert Einstein


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] plan9ports won't compile: undefined ref to getcallerpc
  2004-10-19 20:35 [9fans] plan9ports won't compile: undefined ref to getcallerpc Derek Davis
@ 2004-10-19 21:14 ` Eric Van Hensbergen
  2004-10-19 22:35   ` Micah Stetson
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Van Hensbergen @ 2004-10-19 21:14 UTC (permalink / raw)
  To: Derek Davis, Fans of the OS Plan 9 from Bell Labs

On Tue, 19 Oct 2004 14:35:26 -0600, Derek Davis <derek.davis@gmail.com> wrote:
> I've been trying to compile plan9port in linux simply so that I can
> use Acme.  However, whenever I run the install script, it will go for
> a while but quit with errors when running '9l -o o.9p 9p.o...'.  All
> the shown errors are in the file fdwait.c, and are due to undefined
> reference to getcallerpc.  I opened fdwait.c and it includes libc.h,
> which defines getcallerpc, so I am not sure what is causing the error.
>  Google searches turned up nothing, and I could find nothing in the
> list archives about this.  Have you seen this problem before, and do
> you know what might be causing it?  I am building on a Gentoo system
> using gcc 3.3.4-r1.
> 

Okay, I was able to reproduce your problem on Gentoo x86 with the same compiler.
Simply remove lib/lib9.a and run ./INSTALL again.

Not sure why this fixes it (don't have time to look into it right
now), but it does.

        -eric


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] plan9ports won't compile: undefined ref to getcallerpc
  2004-10-19 21:14 ` Eric Van Hensbergen
@ 2004-10-19 22:35   ` Micah Stetson
  2004-10-20  2:25     ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Micah Stetson @ 2004-10-19 22:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> > reference to getcallerpc.  I opened fdwait.c and it includes libc.h,
> > which defines getcallerpc, so I am not sure what is causing the error.
 ...
> Okay, I was able to reproduce your problem on Gentoo x86 with the same compiler.
> Simply remove lib/lib9.a and run ./INSTALL again.
> 
> Not sure why this fixes it (don't have time to look into it right
> now), but it does.

I actually ran into this yesterday.  It's gnu as.  It
doesn't return an error status when it fails to open the
assembly source.  Mkmk.sh:40 interprets this to mean that
the assembly source was there, and so it doesn't try to
build getcallerpc from the C source.  Getcallerpc is
actually in the C source, so it doesn't get linked into
lib9.a.

Micah



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] plan9ports won't compile: undefined ref to getcallerpc
  2004-10-19 22:35   ` Micah Stetson
@ 2004-10-20  2:25     ` Russ Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Russ Cox @ 2004-10-20  2:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I actually ran into this yesterday.  It's gnu as.  It
> doesn't return an error status when it fails to open the
> assembly source.  Mkmk.sh:40 interprets this to mean that
> the assembly source was there, and so it doesn't try to
> build getcallerpc from the C source.  Getcallerpc is
> actually in the C source, so it doesn't get linked into
> lib9.a.

I'll swap the two around then, I guess - C first then as.
Thanks for figuring this out.  It must only break on some
as's since it has worked fine on my system for a while.

Russ


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-20  2:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19 20:35 [9fans] plan9ports won't compile: undefined ref to getcallerpc Derek Davis
2004-10-19 21:14 ` Eric Van Hensbergen
2004-10-19 22:35   ` Micah Stetson
2004-10-20  2:25     ` Russ Cox

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).