From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Paul Chu via Tech-talk
Sent: 30 July 2020 08:10
To: 'tech-talk at aps.anl.gov' <tech-talk at aps.anl.gov>
Subject: EPICS Base Compilation Failed Under Cygwin gcc 9+
Hi,
The EPICS Base is broken for Cygwin under gcc 9.0.* The error message seems pointing to “TCP_NODELAY” not declared. I tried for several Base 3.15.*, 3.14.*, and 7.*, and all got the same error messages (see below). If
using gcc 7.4.*, all versions can compile without any issue. Does anybody experience the same issue?
…
g++ -D_POSIX_THREADS -D_POSIX_TIMERS -DUNIX -DCYGWIN32 -O3 -g -Wall -m64 -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -I. -I../O.Common -I. -I. -I.. -I../../../../src/ca/client/test -I../../../../include/compiler/gcc
-I../../../../include/os/cygwin32 -I../../../../include -o tcpiiu.obj -c ../tcpiiu.cpp
In file included from ../localHostName.h:32,
from ../tcpiiu.cpp:32:
../../../../include/epicsSingleton.h:164:15: warning: ‘void* SingletonUntyped::pInstance() const’ redeclared without dllimport attribute after being referenced with dll linkage
164 | inline void * SingletonUntyped :: pInstance () const
| ^~~~~~~~~~~~~~~~
../tcpiiu.cpp: In constructor ‘tcpiiu::tcpiiu(cac&, epicsMutex&, epicsMutex&, cacContextNotify&, double, epicsTimerQueue&, const osiSockAddr&, comBufMemoryManager&, unsigned int, ipAddrToAsciiEngine&, const priLev&, SearchDestTCP*)’:
../tcpiiu.cpp:728:56: error: ‘TCP_NODELAY’ was not declared in this scope
728 | int status = setsockopt ( this->sock, IPPROTO_TCP, TCP_NODELAY,
| ^~~~~~~~~~~
make[3]: *** [../../../../configure/RULES_BUILD:240: tcpiiu.obj] Error 1
make[3]: Leaving directory '/cygdrive/c/epics/base-3.15.7/src/ca/client/O.CYGWIN-X86_64'
make[2]: *** [../../../configure/RULES_ARCHS:58: install.CYGWIN-X86_64] Error 2
make[2]: Leaving directory '/cygdrive/c/epics/base-3.15.7/src/ca/client'
make[1]: *** [../configure/RULES_DIRS:84: ca/client.install] Error 2
make[1]: Leaving directory '/cygdrive/c/epics/base-3.15.7/src'
make: *** [configure/RULES_DIRS:84: src.install] Error 2
Thanks,
Paul
Paul Chu
Head of Accelerator Division
Nanjing Proton Source
Nanjing University, Nanjing, China