Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2011 18:13:57 +0100
From:      Fernando Herrero =?ISO-8859-1?Q?Carr=F3n?= <fhcarron@terra.es>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/155446: Port devel/ode compiled always with single precision even when double precision is specified.
Message-ID:  <1299777237.1853.1.camel@localhost>
Resent-Message-ID: <201103101730.p2AHUD3J083764@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         155446
>Category:       ports
>Synopsis:       Port devel/ode compiled always with single precision
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 10 17:30:13 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Fernando Herrero Carron
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD fionn 8.0-STABLE FreeBSD 8.0-STABLE #1: Fri May 14
16:39:49 CEST 2010 root@:/usr/obj/usr/src/sys/FIONN amd64


>Description:
Port "devel/ode" is a rigid body physics simulation library. It allows
for single or double precision simulations by specifying the
"--enable-double-precision" to the configure script.

This option is supported in the ports infrastructre as a knob in the
configuration dialog. However, when it is selected, the configuration
(running the "configure" script) of the port prints out a strange
line:

...
checking if double precision is requested... yes
CPPFLAGS+= -DdDOUBLE: not found
checking which drawstuff lib to build... X11
...

Looking at the script:

...
if test "$precision" = yes;
then
        ODE_PRECISION=-DdDOUBLE
else
        ODE_PRECISION=-DdSINGLE
fi

CPPFLAGS+=" $ODE_PRECISION"
...

Apparently, "/bin/sh" does not support operand "+=", so this line is
interpreted as a command, instead of as a variable assignation.


>How-To-Repeat:
Enable double precision in the configuration dialog and compile.

>Fix:

The following patch should work:

--- configure 2009-01-30 05:34:40.000000000 +0100
+++ configure    2011-03-02 17:31:19.000000000 +0100
@@ -21968,7 +21968,7 @@
         ODE_PRECISION=-DdSINGLE
 fi
 
-CPPFLAGS+=" $ODE_PRECISION"
+CPPFLAGS="$CPPFLAGS $ODE_PRECISION"
 


>Release-Note:
>Audit-Trail:
>Unformatted:
 even when double precision is specified.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1299777237.1853.1.camel>