From owner-freebsd-amd64@FreeBSD.ORG Wed Oct 22 21:10:06 2003 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5834F16A4B3 for ; Wed, 22 Oct 2003 21:10:06 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D274443FA3 for ; Wed, 22 Oct 2003 21:10:05 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id B53152A8D5; Wed, 22 Oct 2003 21:10:05 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "Seth Chandler" In-Reply-To: <000001c39919$23a369d0$9abafd80@cwm> Date: Wed, 22 Oct 2003 21:10:05 -0700 From: Peter Wemm Message-Id: <20031023041005.B53152A8D5@canning.wemm.org> cc: freebsd-amd64@freebsd.org Subject: Re: samba-devel build error on -CURRENT w/ amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 04:10:06 -0000 "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