Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 2003 21:10:05 -0700
From:      Peter Wemm <peter@wemm.org>
To:        "Seth Chandler" <sbc28@cornell.edu>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: samba-devel build error on -CURRENT w/ amd64 
Message-ID:  <20031023041005.B53152A8D5@canning.wemm.org>
In-Reply-To: <000001c39919$23a369d0$9abafd80@cwm> 

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
"Seth Chandler" wrote:
> Peter this might be of some interest to you, but as of yet I've been
> unable to figure out the source of the problem.  I've gotten this to
> build a number of other places, maybe its related to a change in
> -CURRENT, but I'm not sure.

> Compiling lib/dprintf.c
> lib/dprintf.c: In function `d_vfprintf':
> lib/dprintf.c:45: error: incompatible types in assignment
*** Error code 1

Yes. this is because it is trying to copy a va_list, which is not something
that can be copied on amd64 (and powerpc).  The code needs to be patched to
use va_copy(newap, oldap);  which also copies the data structures that ap
points to.  On machines like i386, a va_list is an integral type.  But on
amd64, it is effectively a pointer to an invisible external structure that
contains counters and pointers for the rather complicated amd64 function
calling convention.

Generally, most of these have already been identified by the powerpc folks
on linux.  There are some other tricks possible instead of using the
relatively new va_copy(), what works for linux/powerpc generally works for
amd64 as well.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20031023041005.B53152A8D5>