The following patch looks like one way to fix it. This was not a problem on my Rocky 8 g++ 8.5. Details below.
diff --git a/src/ChecksumConverter.cc b/src/ChecksumConverter.cc
index 53ffcc6..2684d7d 100644
--- a/src/ChecksumConverter.cc
+++ b/src/ChecksumConverter.cc
@@ -52,11 +52,15 @@
#if defined(vxWorks) || defined(__rtems__)
// These systems have no strncasecmp at the moment
// But avoid compiler errors in case strncasecmp exists in future versions
-static int mystrncasecmp(const char *s1, const char *s2, size_t n)
-{
- int r=0;
- while (n && (r = toupper(*s1)-toupper(*s2)) == 0) { n--; s1++; s2++; };
- return r;
+extern "C" {
+
+ static int mystrncasecmp(const char *s1, const char *s2, size_t n)
+ {
+ int r=0;
+ while (n && (r = toupper(*s1)-toupper(*s2)) == 0) { n--; s1++; s2++; };
+ return r;
+ }
+
}
#define strncasecmp mystrncasecmp
#endif
Rocky 8 setup
g++ rpm
$ rpm -qi gcc-c++-8.5.0-4.el8_5.x86_64
Name : gcc-c++
Version : 8.5.0
Release : 4.el8_5
Architecture: x86_64
Install Date: Tue Mar 29 08:18:57 2022
Group : Development/Languages
Size : 32190812
License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
Signature : RSA/SHA256, Wed Nov 10 17:51:41 2021, Key ID 15af5dac6d745a60
Source RPM : gcc-8.5.0-4.el8_5.src.rpm
Build Date : Wed Nov 10 17:33:27 2021
Build Host : ord1-prod-x86build003.svc.aws.rockylinux.org
Relocations : (not relocatable)
Packager : infrastructure@rockylinux.org
Vendor : Rocky
URL : http://gcc.gnu.org
Summary : C++ support for GCC
Description :
This package adds C++ support to the GNU Compiler Collection.
It includes support for most of the current C++ specification,
including templates and exception handling.
Thanks. I will have a look. Strange that it did not fail with my other architectures. I think I need to set up an RTEMS environment for better coverage of all possible EPICS systems.
Hi Dirk,
Building with RTEMS5(gcc7.5), I found the following compile error.
The following patch looks like one way to fix it. This was not a problem on my Rocky 8 g++ 8.5. Details below.
Rocky 8 setup
g++ rpm
g++
RTEMS 5