Hi Lewis,
READONLY is a macro which expands to "const" (for compilers which support it, C didn't have that before standardization) , although that macro isn't used inside Base anymore. It's defined in the shareLib.h
header, and since the shareLib.h header isn't being included by most of the Base header files now the macro is no longer being defined as a side-effect of some other includes in that source file.
I would recommend replacing it with "const" in those sources which still use it, now that all our supported compilers do understand that keyword, and sending a PR to the sscan project on GitLab.
- Andrew
Complexity comes for free, Simplicity you have to work for.
From:
Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of J. Lewis Muir via Tech-talk <tech-talk at aps.anl.gov>
Date: Thursday, November 30, 2023 at 12:40 PM
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Subject: sscan R2-11-4 build error on macOS Sonoma?
Hello, Tech-Talkers!
I'm building synApps 6.2.1 against EPICS Base 7.0.7 on macOS Sonoma
(14.1.1) on Apple Silicon (EPICS_HOST_ARCH=darwin-aarch64), and the
build fails with an error while building sscan; the end of the build
output is below. I'll keep looking into the issue, but since it's not
immediately obvious to me what's wrong, I thought I'd ask here, has
anyone successfully built sscan on this platform?
Thanks!
Lewis
----
cc -DUSE_TYPED_RSET -DUNIX -Ddarwin -O3 -g -Wall -Werror-implicit-function-declaration -arch arm64 -fno-common -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/clang -I../../../include/os/Darwin -I../../../include
-I/tmp/build-01/opt/synapps-6.2.1/seq-2-2-9/include -I/tmp/build-01/opt/epics-base-7.0.7/include/compiler/clang -I/tmp/build-01/opt/epics-base-7.0.7/include/os/Darwin -I/tmp/build-01/opt/epics-base-7.0.7/include -c ../saveData_writeXDR.c
../saveData_writeXDR.c:1841:2: error: use of undeclared identifier 'READONLY'
READONLY DBR_VAL * pval = eha.dbr;
^
../saveData_writeXDR.c:1850:23: error: use of undeclared identifier 'pval'
size= strlen((char*)pval);
^
../saveData_writeXDR.c:1874:22: error: use of undeclared identifier 'pval'
memcpy(pnode->pval, pval, size);
^
../saveData_writeXDR.c:1888:2: error: use of undeclared identifier 'READONLY'
READONLY DBR_VAL * pval = eha.dbr;
^
../saveData_writeXDR.c:1892:31: error: use of undeclared identifier 'pval'
strncpy(pnode->desc, (char *)pval, MAX_STRING_SIZE);
^
5 errors generated.
make[4]: *** [saveData_writeXDR.o] Error 1
make[3]: *** [install.darwin-aarch64] Error 2
make[2]: *** [src.install] Error 2
make[1]: *** [sscanApp.install] Error 2
make: *** [/tmp/build-01/opt/synapps-6.2.1/sscan-R2-11-4.install] Error 2
----
|