Hello all,
As you may already know, last Thursday was the release of the new Ubuntu 16.04 LTS. We decided to take a look at it and test our control system tools starting with EPICS.
I installed the OS on VMware Workstation, when doing the build, these are the error messages that appeared:
/usr/bin/g++ -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_X86_64_
-DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -O3 -Wall -m64 -MMD -I. -I../O.Common -I. -I.. -I../../../../include/os/Linux -I../../../../include ../epicsCalcTest.cpp
../epicsCalcTest.cpp: In function ‘int main(int, char**)’:
../../../../include/os/Linux/epicsMath.h:22:21: error: non-floating-point argument in call to function
‘__builtin_isfinite’
# define finite(x) isfinite(x)
^
../epicsCalcTest.cpp:102:40: note: in definition of macro
‘testExpr’
#define testExpr(expr) testCalc(#expr, expr);
^
../epicsCalcTest.cpp:314:14: note: in expansion of macro
‘finite’
testExpr(finite(0));
^
../epicsCalcTest.cpp:328:14: error: non-floating-point
argument in call to function ‘__builtin_isinf_sign’
testExpr(isinf(0));
^
../epicsCalcTest.cpp:102:40: note: in definition of macro
‘testExpr’
#define testExpr(expr) testCalc(#expr, expr);
^
../epicsCalcTest.cpp:332:14: error: non-floating-point
argument in call to function ‘__builtin_isnan’
testExpr(isnan(0));
^
../epicsCalcTest.cpp:102:40: note: in definition of macro
‘testExpr’
#define testExpr(expr) testCalc(#expr, expr);
^
../../../../configure/RULES_BUILD:209: recipe for target
'epicsCalcTest.o' failed
make[3]: *** [epicsCalcTest.o] Error 1
make[3]: Leaving directory '/home/abdalla/epics/base-3.14.12.3/src/libCom/test/O.linux-x86_64'
../../../configure/RULES_ARCHS:63: recipe for target 'install.linux-x86_64' failed
make[2]: *** [install.linux-x86_64] Error 2
make[2]: Leaving directory '/home/abdalla/epics/base-3.14.12.3/src/libCom/test'
../configure/RULES_DIRS:70: recipe for target 'libCom/test.install' failed
make[1]: *** [libCom/test.install] Error 2
make[1]: Leaving directory '/home/abdalla/epics/base-3.14.12.3/src'
configure/RULES_DIRS:70: recipe for target 'src.install' failed
make: *** [src.install] Error 2
A quick search over the Internet shows that some people have faced this error with the same GCC 5.3 compiler and the solution was to add a simple cast to float to the argument that
caused the error.
The two needed files are:
1.
epicsCalcTest.cpp (located at base/src/libCom/test)
2.
epicsMath.h (located at base/src/libCom/osi/os/posix)
You can see the attached patch file for more details (which is applied on the base's top level folder). After doing the modifications in the patch file, the build works fine producing
all EPICS binaries.
The question is, could there be another way to bypass this error? I think something can be done on the compiler side especially it is the new GCC 5.3 since the same EPICS version
worked on Ubuntu 15.04 and 14.04 LTS without any problem (can't recall GCC version here).
Best Regards,
Abdalla Ahmad
Control Engineer
SESAME.
Allan, Jordan.
Tel: (+962-5) 3511348 , ext. 265
Fax: (+962-5) 3511423
Mob: (+962-7)88183296
www.sesame.org.jo