Bug#1068708: Building with EPICS fails because the compiler cannot find `compilerSpecific.h`.

Andrius Merkys merkys at debian.org
Wed Apr 10 11:43:23 BST 2024


Hi Florian,

On 2024-04-09 16:38, Florian Forster wrote:
> Building with EPICS fails because the compiler cannot find 
> `compilerSpecific.h`:
> 
> ```
> In file included from /usr/include/epics/epicsThread.h:62,
>                   from /usr/include/epics/cadef.h:35,
>                   from src/epics.c:26:
> /usr/include/epics/compilerDependencies.h:21:10: fatal error: 
> compilerSpecific.h: No such file or directory
>    21 | #include "compilerSpecific.h"
>       | ^~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[1]: *** [Makefile:8195: src/epics_la-epics.lo] Error 1
> ```
> 
> The file exists at `/usr/include/epics/compiler/gcc/compilerSpecific.h`, 
> which is not a directory searched by the compiler.

According to /usr/share/pkgconfig/epics-base.pc, 
/usr/include/compiler/gcc should be added to include path when compiling.

> `"compilerSpecific.h"` isincluded unconditionally, and fails when not 
> compiled with GCC. My recommendation is to guard the inclusion of the 
> file with an appropriate check, for example:
> 
> ```
> // /usr/include/epics/compilerDependencies.h, line 21
> #if __GNUC__
> # include "compiler/gcc/compilerSpecific.h"
> #endif
> ```

What compiler do you use? Does this patch work for you? If so, it is 
probably worth upstreaming it. Can you as well try to add
/usr/include/compiler/gcc to your compiler's include path?

Best wishes,
Andrius



More information about the debian-science-maintainers mailing list