SOLVED: Re: graphviz port build fails on alpha FBSD 6.3

Anton Shterenlikht mexas at bristol.ac.uk
Thu Jul 10 16:01:18 UTC 2008


On Thu, Jul 10, 2008 at 04:11:22PM +0100, Anton Shterenlikht wrote:
> On Thu, Jul 10, 2008 at 03:56:10PM +0100, Anton Shterenlikht wrote:
> > On Thu, Jul 10, 2008 at 03:37:53PM +0100, Anton Shterenlikht wrote:
> > > On Thu, Jul 10, 2008 at 01:55:48PM +0000, Christian Weisgerber wrote:
> > > > Anton Shterenlikht <mexas at bristol.ac.uk> wrote:
> > > > 
> > > > >    6931 configure:9309: cc -o conftest -O -pipe -mcpu=ev6 -mieee
> > > > > 	-Wstrict-prototypes -Wpointer-arith -Wall -ffast-math
> > > > > 	-I/usr/local/include -I/usr/local/include
> > > > > 	-L/usr/local/lib -L/usr/local/lib conftest.c  >&5
> > > > >    6932 conftest.c:86: warning: function declaration isn't a prototype
> > > > >    6933 conftest.c:96: warning: function declaration isn't a prototype
> > > > >    6934 /usr/lib/crtfastmath.o(.text+0x1c): In function `set_fast_math':
> > > > >    6935 : undefined reference to `__ieee_set_fp_control'
> > > > 
> > > > -ffast-math isn't supported on alpha.  Don't use it.  Ports that
> > > > unconditionally use it need to be fixed.
> > > 
> > > Naddy thanks, just in time!
> > > I was just discussing this with the port maintainer.
> > > Actually if I put
> > > 
> > > 	CFLAGS= -O -pipe -ffast-math
> > > 
> > > in /etc/make.conf I get stopped at the config stage:
> > > 
> > >         configure:3832: error: C compiler cannot create executables
> > > 
> > > I cannot find much info on -ffast-math. Could you please expand on your
> > > answer.
> > 
> > Found it, should've looked better, sorry.
> > 
> > >From gcc man pages:
> > 
> >        -ffast-math
> >            Sets -fno-math-errno, -funsafe-math-optimizations, -fno-trap-
> >            ping-math, -ffinite-math-only, -fno-rounding-math and -fno-signal-
> >            ing-nans.
> > 
> >            This option causes the preprocessor macro "__FAST_MATH__" to be
> >            defined.
> > 
> >            This option should never be turned on by any -O option since it can
> >            result in incorrect output for programs which depend on an exact
> >            implementation of IEEE or ISO rules/specifications for math func-
> >            tions.
> > 
> > plus PR ports/113599: graphics/dri: fix build on alpha
> > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=113599
> > 
> > 	FreeBSD/alpha can't handle -ffast-math (fails to link due to some
> > 	unimplemented functions), so don't try to build graphics/dri with
> > 	that option there.
> > 
> > 
> > I'll try your solution and add
> > 
> > .if ${ARCH} == alpha
> > 	FAST_MATH=
> > .else
> > 	FAST_MATH=      -ffast-math
> > .endif
> > 
> > to the Makefile
> > 
> > Will report on results.
> 
> no, adding this to Makefile doesn't help. It is being ignored, e.g.:
> 
> 	cc -DHAVE_CONFIG_H -I. -I../.. -I../../lib/ast -I../../lib/sfio
> 	-I/usr/local/include -I/usr/local/include -O -pipe -mcpu=ev6 -mieee
> 	-Wstrict-prototypes -Wpointer-arith -Wall
> --->	-ffast-math
> 	-MT vmopen.lo -MD -MP -MF .deps/vmopen.Tpo -c vmopen.c -o vmopen.o
> 	>/dev/null 2>&1
> 
> it must be somewhere in configure.ac probably.

I noted this line in configure:

            # icc doesn't like -ffast-math
            CFLAGS=`echo ${CFLAGS} | sed 's/ -ffast-math//'`

accordingly I just added the same line at the end of CFLAGS block:

            # alpha doesn't like -ffast-math
            CFLAGS=`echo ${CFLAGS} | sed 's/ -ffast-math//'`

now configure detects strncasecmp on OS:


configure:9256: checking for strcasecmp
configure:9312: cc -o conftest -O -pipe -mcpu=ev6 -mieee -Wstrict-prototypes -Wp
ointer-arith -Wall -I/usr/local/include -I/usr/local/include  -L/usr/local/lib -
L/usr/local/lib conftest.c  >&5
conftest.c:107: warning: function declaration isn't a prototype
conftest.c:117: warning: function declaration isn't a prototype
configure:9318: $? = 0
configure:9336: result: yes
configure:9256: checking for strncasecmp
configure:9312: cc -o conftest -O -pipe -mcpu=ev6 -mieee -Wstrict-prototypes -Wp
ointer-arith -Wall -I/usr/local/include -I/usr/local/include  -L/usr/local/lib -
L/usr/local/lib conftest.c  >&5
conftest.c:108: warning: function declaration isn't a prototype
conftest.c:118: warning: function declaration isn't a prototype
configure:9318: $? = 0
configure:9336: result: yes

and build and intall pass fine:

install -C  -o root -g wheel -m 444  /usr/ports/graphics/graphviz/work/graphviz-
2.20.2/tclpkg/tclpathplan/demo/pathplan_data/*.dat  /usr/local/share/examples/gr
aphviz/pathplan_data/
===>   Compressing manual pages for graphviz-2.20.2
===>   Registering installation for graphviz-2.20.2

Many thanks to Naddy for the advise.
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423


More information about the freebsd-alpha mailing list