From: Muli Ben-Yehuda Subject: Re: problems with tools/pygrub/setup.py and xen/xm/main.py Date: Fri, 21 Oct 2005 19:03:28 +0200 Message-ID: <20051021170328.GD3229@granada.merseine.nu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Return-path: In-reply-to: Content-disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: peter Bier List-Id: xen-devel@lists.xenproject.org On Fri, Oct 21, 2005 at 04:47:04PM +0000, peter Bier wrote: > > When making the "unstable" version I got an in "tools". There was a complaint > about "cc.has_function" in the following code area in tools/pygrub/setup.py > > if cc.has_function("ext2fs_open"): > ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) > else : > sys.stderr.write ("Warning: older veriosn of e2fsprogs installed ...") > sys.stderr.write (" .... " ) > ext2 = ... > > As workaround I simply deleted the entire if - else construct. Make worked > then, but I suppose this is not a really satisfactory solution. There's a patch for this from Jeremy Katz at http://bugzilla.xensource.com/bugzilla/attachment.cgi?id=75. Could someone please commit it? (Signed-Off-By Jeremy available here: http://lists.xensource.com/archives/html/xen-devel/2005-10/msg01071.html). Patch also attached for convenience: diff -r 7c951e3eb5ab tools/pygrub/setup.py --- a/tools/pygrub/setup.py Wed Oct 19 10:53:00 2005 +++ b/tools/pygrub/setup.py Thu Oct 20 11:48:00 2005 @@ -12,7 +12,7 @@ ext2defines = [] cc = new_compiler() cc.add_library("ext2fs") - if cc.has_function("ext2fs_open2"): + if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"): ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) else: sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n") Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/