EPICS Home

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  2016  <20172018  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  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Compiling EPICS 3.15.4 with GCC 6.3.0
From: Jeong Han Lee <[email protected]>
To: [email protected]
Date: Mon, 6 Nov 2017 23:12:08 +0100
Hi All,

The following compiling error welcomed me when I compiled EPICS 3.15.4 on Debian 9.

```
/usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64 -I. -I../O.Common -I. -I. -I.. -I/epics/bases/base-3.15.4/include/compiler/gcc -I/epics/bases/base-3.15.4/include/os/Linux -I/epics/bases/base-3.15.4/include -c ../epicsExceptionTest.cpp
../epicsExceptionTest.cpp: In function ‘void epicsExceptionTestPrivate()’:
../epicsExceptionTest.cpp:61:49: error: size of array is too large
         char * p = new char [unsuccessfulNewSize];
                                                 ^
../epicsExceptionTest.cpp:74:38: error: size of array is too large
             char [unsuccessfulNewSize];
                                      ^
../../../../configure/RULES_BUILD:234: recipe for target 'epicsExceptionTest.o' failed
make[4]: *** [epicsExceptionTest.o] Error 1
make[4]: Leaving directory '/home/jhlee/e3/e3-base/epics-base/src/libCom/test/O.linux-x86_64' ../../../configure/RULES_ARCHS:61: recipe for target 'install.linux-x86_64' failed
make[3]: *** [install.linux-x86_64] Error 2
make[3]: Leaving directory '/home/jhlee/e3/e3-base/epics-base/src/libCom/test'
../configure/RULES_DIRS:88: recipe for target 'libCom/test.install' failed
make[2]: *** [libCom/test.install] Error 2
make[2]: Leaving directory '/home/jhlee/e3/e3-base/epics-base/src'
configure/RULES_DIRS:88: recipe for target 'src.install' failed
```

I saw the same compile error in old tech-talk [1], and one of the following solution allowed me to compile the EPICS base properly.

1) edit static size_t unsuccessfulNewSize = numeric_limits < size_t > :: max (); in epicsExceptionTest.cpp

2) USR_CXXFLAGS = -std=gnu++98 in configure/CONFIG_COMMON


  gcc info is

```
gcc --version
gcc (Debian 6.3.0-18) 6.3.0 20170516


gcc -dM -E - </dev/null |grep STDC
#define __STDC_HOSTED__ 1
#define __STDC_UTF_16__ 1
#define __STDC_IEC_559__ 1
#define __STDC_ISO_10646__ 201605L
#define __STDC_NO_THREADS__ 1
#define _STDC_PREDEF_H 1
#define __STDC_IEC_559_COMPLEX__ 1
#define __STDC_VERSION__ 201112L
#define __GNUC_STDC_INLINE__ 1
#define __STDC_UTF_32__ 1
#define __STDC__ 1
```


  Best,
  Han


[1] http://www.aps.anl.gov/epics/tech-talk/2016/msg01113.php

Replies:
Re: Compiling EPICS 3.15.4 with GCC 6.3.0 Andrew Johnson

Navigate by Date:
Prev: Anyone else using Bira Ethernet Power Supply Controllers? Dunning, Michael
Next: Re: Compiling EPICS 3.15.4 with GCC 6.3.0 Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Anyone else using Bira Ethernet Power Supply Controllers? Dunning, Michael
Next: Re: Compiling EPICS 3.15.4 with GCC 6.3.0 Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024