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  2011  2012  2013  2014  2015  <20162017  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  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Compiling EPICS 3.14.12.5 with GCC 6
From: Bob Soliday <[email protected]>
To: <[email protected]>
Date: Tue, 28 Jun 2016 09:12:19 -0500
You can get it to compile with gcc 6.1 if you edit epicsExceptionTest.cpp and remove the "const" from the line:

static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();

There is a change committed to the for the next release, but it checks the version of gcc. It probably should check which -std option was given instead.

--Bob Soliday

On 06/28/2016 04:00 AM, Luca Cavalli wrote:
Dear all,

on my office laptop I'm running Fedora 24, which comes with GCC 6 by
default.

It seems that compiling EPICS 3.14.12.5 with GCC 6 fails here:

/usr/bin/g++ -c  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -
D_X86_64_  -DUNIX  -Dlinux     -O3 -g   -Wall       -m64      -MMD -I.
-I../O.Common -I. -I.. -I../../../../include/os/Linux
-I../../../../include         ../epicsExceptionTest.cpp
../epicsExceptionTest.cpp: In function ‘void
epicsExceptionTestPrivate()’:
../epicsExceptionTest.cpp:68:49: error: size of array is too large
          char * p = new char [unsuccessfulNewSize];
                                                  ^
../epicsExceptionTest.cpp:79:38: error: size of array is too large
              char [unsuccessfulNewSize];
                                       ^
../../../../configure/RULES_BUILD:218: recipe for target
'epicsExceptionTest.o' failed

GCC 6 defaults to -std=gnu++14 instead of -std=gnu++98 [1]. Adding this
option to compiler command seems to fix the problem, but which is the
best place to set the desired standard?

I tried in config/CONFIG_COMMON modifying:

POSIX_CPPFLAGS += $(POSIX_CPPFLAGS_$(POSIX)) -std=gnu++98

or:

USR_CXXFLAGS = -std=gnu++98

but the option seems to be ignored.


Thanks for your help.

Cheers,

Luca


[1] - https://gcc.gnu.org/gcc-6/porting_to.html#gxx14


________________________________

<< Le informazioni contenute in questo messaggio di posta elettronica e relativi allegati sono riservate e confidenziali e ne è vietata la diffusione in qualunque modo eseguita. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo e a darcene gentile comunicazione. Quanto precede ai fini del rispetto delle Legge 675/96 e del Decreto Legislativo 30/06/2003 n.196, sulla tutela dei dati personali >>

<< This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person: to do so could be a breach of confidence. Thank you for your co-operation. Please contact our IT Helpdesk on +3902380481 or email [email protected] if you need assistance >>




Replies:
RE: Compiling EPICS 3.14.12.5 with GCC 6 Hill, Jeff
References:
Compiling EPICS 3.14.12.5 with GCC 6 Luca Cavalli

Navigate by Date:
Prev: AW: bit shifting operators info22
Next: RE: Call to assert failed - EPICS Pedro Mantovani Antunes
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Compiling EPICS 3.14.12.5 with GCC 6 Luca Cavalli
Next: RE: Compiling EPICS 3.14.12.5 with GCC 6 Hill, Jeff
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·