EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached)
From: Benjamin Franksen <[email protected]>
To: [email protected]
Cc: Eric Norum <[email protected]>, Benjamin Franksen <[email protected]>
Date: Tue, 19 Oct 2010 19:45:04 +0200
Thanks for the report and the patches.

Eric is right, this definition is not needed as types.h gets included 
(indirectly). I wonder why the compiler does not complain on Linux.

I have removed the typedef in the repository.

Ben

On Monday, October 18, 2010, Eric Norum wrote:
> I think that it's better to avoid conditionals if at all possible.
> The following change seems to allow things to build on linux-x86 and
> darwin-x86 (the two architectures I also have handy):
> ===========================================
> diff -ur seq-2.0.99.orig/src/snc/snl.re seq-2.0.99/src/snc/snl.re
> --- seq-2.0.99.orig/src/snc/snl.re	2010-05-17 09:13:31.000000000 -0700
> +++ seq-2.0.99/src/snc/snl.re	2010-10-18 08:49:22.000000000 -0700
> @@ -17,7 +17,6 @@
> 
>  #define	EOI		0
> 
> -typedef unsigned int uint;
>  typedef unsigned char uchar;
> 
>  #define	BSIZE	8192
> ===============================================
> 
> On Oct 17, 2010, at 5:33 PM, <[email protected]> wrote:
> > Hi,
> > 
> > When compiling the latest release of sncseq (2.0.99) on a MacOSX 10.6
> > (Snow Leopard) with EPICS base 3.14.11 the following error appears:
> > ...
> > 3 parsing conflicts.
> > ../snl.re:20: error: redefinition of typedef ‘uint’
> > ../types.h:40: error: previous declaration of ‘uint’ was here
> > make[3]: *** [lexer.o] Error 1
> > make[2]: *** [install.darwin-x86] Error 2
> > make[1]: *** [snc.install] Error 2
> > make: *** [src.install] Error 2
> > ...
> > 
> > Digging into the code I found two files (src/snc/snl.re and
> > src/snc/types.h) defining uint as a new type unsigned int. On MacOSX
> > (FreeBSD) that type is already defined in sys/types.h. I attached
> > possible patch files that disable the re-definition of the uint type
> > for Mac platforms. Please check if it is right, since these patch
> > files only work on Mac and linux-x86_64 (debian lenny 64-bit), which
> > are the platforms I can test. I haven't checked other FreeBSD
> > platforms.
> > 
> > Cheers,
> > 
> >  Juan Carlos.
> > 
> > <snl.re.patch><types.h.patch>
> > ----------
> > Juan Carlos Guzman
> > Software Engineer
> > Australia Telescope National Facility
> > CSIRO Astronomy and Space Science
> > P.O.Box 76, Epping NSW 1710, Australia
> > Phone: +61 2 9372 4457
> > Fax: +61 2 9372 4310
> > Email: [email protected]



References:
Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Juan.Guzman
Re: Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Eric Norum

Navigate by Date:
Prev: RE: EPICS CA problems Mark Rivers
Next: Re: Manipulating time in records Luedeke Andreas
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Eric Norum
Next: Manipulating time in records Di Maio Franck
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Oct 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·