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  2010  <20112012  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  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ioc segfault if - c seq flag is not set or +c?
From: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Tue, 19 Apr 2011 00:46:32 +0200
Am Montag, 18. April 2011, um 22:42:12 schrieb Andrew Johnson:
> On Monday 18 April 2011 14:24:12 J. Lewis Muir wrote:
> > FYI, there were a few warnings when building seq 2.0.13-rc1.

(BTW, the other warnings (from the C compiler) are ok.)

> This section of Lewis' output is illuminating:
> >preprocessing ../tooLong.st
> >/opt/vxworks-tornado-2.0.2/host/x86-linux/bin/ccppc -x c -E -DCPU=PPC603
> >
> > -DvxWorks -I. -I../O.Common -I. -I.. -I../../../include/os/vxWorks
> > -I../../../include
> > -I/home/jlmuir/tmp/opt/epics-3.14.11/include/os/vxWorks
> > -I/home/jlmuir/tmp/opt/epics-3.14.11/include
> > -I/opt/vxworks-tornado-2.0.2/target/h ../tooLong.st > tooLong.i
> >
> >converting tooLong.i
> >../../../bin/linux-x86_64/snc    tooLong.i -o tooLong.c.tmp
> >line 17: cannot assign variable >l< because on this architecture its
> >(base)
> >
> > type is larger than 4 bytes. Such variables cannot be faithfully mapped
> > to any of the Channel Access base types. Try declaring the variable as
> > 'int' or, if that is still too large on your system, as 'short'.
> >
> >line 20: cannot assign variable >ul< because on this architecture its
> >(base)
> >
> > type is larger than 4 bytes. Such variables cannot be faithfully mapped
> > to any of the Channel Access base types. Try declaring the variable as
> > 'int' or, if that is still too large on your system, as 'short'.
>
> Unfortunately those warnings from snc are wrong, since this is a
> cross-build for the vxWorks-ppc603 architecture where long is 32 bits so
> is legal.

Yes. Sigh.

> Since snc doesn't know what architecture the target will be
> compiled for or what the characteristics of that target are, I think it
> has to defer those size checks to the C compiler when someone uses a long
> variable.  It can do that by generating code like this:
>
> #include <limits.h>
> #if LONG_MAX > 2147483647L
> #  error Cannot assign ...
> #endif
>
> C doesn't allow the use of sizeof in a #if condition, but using LONG_MAX
> like this works fine.

This should be workable. I'll make another pre-release with this fixed.

Thanks
Ben

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c. Wolfgang Eberhardt, Dr. Ulrich Breuer

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


Replies:
RE: ioc segfault if - c seq flag is not set or +c? Abadie Lana
References:
ioc segfault if - c seq flag is not set or +c? Abadie Lana
Re: ioc segfault if - c seq flag is not set or +c? J. Lewis Muir
Re: ioc segfault if - c seq flag is not set or +c? Andrew Johnson

Navigate by Date:
Prev: RE: Does EPICS Base support multi-thread on vxWorks 6.3? Jeff Hill
Next: Re: ca.py - Throws error - workaround Matt Newville
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ioc segfault if - c seq flag is not set or +c? Andrew Johnson
Next: RE: ioc segfault if - c seq flag is not set or +c? Abadie Lana
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·