<#470 fail to compile magic on fedora 42> Issue cr...
# ihp-sg13g2
g
#470 fail to compile magic on fedora 42 Issue created by coryTuyaoqing Hi, i am trying to compile magic on fedora 42 and get this error:
Copy code
In file included from ../utils/tech.h:24,
                               from ../utils/utils.h:28,
                               from bpUtils.c:38:
              ../utils/magic.h:88:23: error: ‘bool’ cannot be defined via ‘typedef’
                 88 | typedef unsigned char bool;
                    |                       ^~~~
              ../utils/magic.h:88:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
              ../utils/magic.h:88:1: warning: useless type name in empty declaration
                 88 | typedef unsigned char bool;
                    | ^~~~~~~
              In file included from ../utils/tech.h:24,
                               from ../utils/utils.h:28,
                               from bpEnum.c:38:
              ../utils/magic.h:88:23: error: ‘bool’ cannot be defined via ‘typedef’
                 88 | typedef unsigned char bool;
                    |                       ^~~~
              ../utils/magic.h:88:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
              ../utils/magic.h:88:1: warning: useless type name in empty declaration
                 88 | typedef unsigned char bool;
                    | ^~~~~~~
              In file included from ../utils/tech.h:24,
                               from ../utils/utils.h:28,
                               from bpDump.c:37:
              ../utils/magic.h:88:23: error: ‘bool’ cannot be defined via ‘typedef’
                 88 | typedef unsigned char bool;
                    |                       ^~~~
              ../utils/magic.h:88:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
              ../utils/magic.h:88:1: warning: useless type name in empty declaration
                 88 | typedef unsigned char bool;
                    | ^~~~~~~
              make[2]: *** [../rules.mak:25: bpUtils.o] Error 1
              make[2]: *** Waiting for unfinished jobs....
              make[2]: *** [../rules.mak:25: bpEnum.o] Error 1
              make[2]: *** [../rules.mak:25: bpDump.o] Error 1
              In file included from ../utils/tech.h:24,
                               from ../utils/utils.h:28,
                               from bpBins.c:39:
              ../utils/magic.h:88:23: error: ‘bool’ cannot be defined via ‘typedef’
                 88 | typedef unsigned char bool;
                    |                       ^~~~
              ../utils/magic.h:88:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
              ../utils/magic.h:88:1: warning: useless type name in empty declaration
                 88 | typedef unsigned char bool;
                    | ^~~~~~~
              make[2]: *** [../rules.mak:25: bpBins.o] Error 1
              make[2]: Leaving directory '/home/cory/Downloads/magic-8.3.526/bplane'
              make[1]: *** [Makefile:52: modules] Error 1
              make[1]: Leaving directory '/home/cory/Downloads/magic-8.3.526'
              make: *** [Makefile:26: tcl] Error 2
and when I try to used c11 or c99 standard to compile it, i got this error:
Copy code
CmdSubrs.c: In function ‘CmdIllegalChars’:
              CmdSubrs.c:1231:14: error: implicit declaration of function ‘isascii’ [-Wimplicit-function-declaration]
               1231 |         if (!isascii(*p)) goto error;
                    |              ^~~~~~~
              make[2]: *** [../rules.mak:23: CmdSubrs.o] Error 1
              make[2]: *** Waiting for unfinished jobs....
              make[2]: Leaving directory '/home/cory/opensrc_eda/src/magic_src/commands'
              make[1]: *** [Makefile:52: modules] Error 1
              make[1]: Leaving directory '/home/cory/opensrc_eda/src/magic_src'
              make: *** [Makefile:26: tcl] Error 2
IHP-GmbH/IHP-Open-PDK