From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 23 13:00:25 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4D1D1065670 for ; Fri, 23 Dec 2011 13:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8138FC0A for ; Fri, 23 Dec 2011 13:00:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBND0PFS031224 for ; Fri, 23 Dec 2011 13:00:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBND0Pvx031219; Fri, 23 Dec 2011 13:00:25 GMT (envelope-from gnats) Resent-Date: Fri, 23 Dec 2011 13:00:25 GMT Resent-Message-Id: <201112231300.pBND0Pvx031219@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, bob frazier Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED7591065672 for ; Fri, 23 Dec 2011 12:56:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id D7EF48FC0A for ; Fri, 23 Dec 2011 12:56:39 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNCudZc034555 for ; Fri, 23 Dec 2011 12:56:39 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pBNCud3Y034554; Fri, 23 Dec 2011 12:56:39 GMT (envelope-from nobody) Message-Id: <201112231256.pBNCud3Y034554@red.freebsd.org> Date: Fri, 23 Dec 2011 12:56:39 GMT From: bob frazier To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/163562: avr-libc will not compile when using util/delay.h X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 13:00:25 -0000 >Number: 163562 >Category: ports >Synopsis: avr-libc will not compile when using util/delay.h >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 23 13:00:24 UTC 2011 >Closed-Date: >Last-Modified: >Originator: bob frazier >Release: 7.4-STABLE >Organization: S.F.T. Inc. >Environment: FreeBSD BSDSilver.SFT.local 7.4-STABLE FreeBSD 7.4-STABLE #15: Thu Dec 15 19:14:22 PST 2011 root@BSDSilver.SFT.local:/usr/obj/usr/src/sys/GENERIC amd64 >Description: attempting to build code for avr using avr-gcc and avr-libc (arduino build environment). Code that makes use of 'delay' causes several compile errors, similar to the following: /usr/local/lib/gcc/avr/4.3.4/../../../../avr/include/util/delay.h:149: error: 'fabs' was not declared in this scope the problem and a workable solution are both described here http://code.google.com/p/arduino/issues/detail?id=604 the attached patch file resolves this issue. >How-To-Repeat: install latest avr-libc and arduino build environment and attempt to build the 'blink' sample. >Fix: see attached patch file, that adds #include to /usr/local/avr/include/util/delay.h Patch attached with submission follows: --- include/util/delay.h.in.orig 2010-11-09 11:39:32.000000000 -0800 +++ include/util/delay.h.in 2011-12-23 04:40:40.000000000 -0800 @@ -37,10 +37,13 @@ #ifndef __HAS_DELAY_CYCLES #define __HAS_DELAY_CYCLES @HAS_DELAY_CYCLES@ #endif +// patch recommended by http://code.google.com/p/arduino/issues/detail?id=604 +#include +// end patch #include #include /** \file */ /** \defgroup util_delay : Convenience functions for busy-wait delay loops >Release-Note: >Audit-Trail: >Unformatted: