Useful reference: klog#23398 for Debian10 and klog#31608 for Debian12.
-----
Troubles encountered are as follows.
/path/to/epics/base/configure/os/CONFIG_SITE.linux-x86_64.UnixCommon:2: *** missing separator. Stop.
Since Debian10; This is due to a change in the symbol for comment line. => commented out by '#'.
/usr/bin/ld: error.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
Since Debian13 (New); Though gcc in Debian13 makes PIE binaries as default, object files makes as non-PIE. => force making object files as PIE.
$ cat << EOF >> /kagra/apps/epics-deb13/base/Makefile
USR_CFLAGS += -fPIE
USR_LDFLAGS += -fPIE
EOF
../epicsExceptionTest.cpp:68:30: error: size ‘18446744073709551615’ of array exceeds maximum object size ‘9223372036854775807’
Since Debian10; This is caused by the difference between ULong and size_t => See also https://github.com/cms-sw/cmssw/issues/41795
../../../../src/cas/generic/caServerI.h:86:5: error: ‘class tsDLList
Since Debian12; This is caused by the difference between C++98/03 and more modern standard. => See also https://github.com/epics-modules/pcas/commit/56403e8e4774dccc3819cab27bc975f48ab5f988