Skip to content

Build failure on GCC 14+ due to 'bool' typedef redefinition (requires CFLAGS="-std=gnu11") #1351

Closed

Description

@hanjianqiao

Bug Report

IvorySQL Version

Master may be other versions

OS Version (uname -a)

Linux e15 7.0.0-22-generic #22-Ubuntu SMP PREEMPT_DYNAMIC Mon May 25 15:54:34 UTC 2026 x86_64 GNU/Linux

Configuration options ( config.status --config )

lct@e15:~/repos/IvorySQL$ ./config.status --config
'--prefix=/usr/local/ivorysql/ivorysql-master'

Current Behavior

  1. run make -j $(nproc)
  2. got
...
make -C port all
make[2]: Entering directory '/home/lct/repos/IvorySQL/src/port'
echo "#define PGBINDIR \"/usr/local/ivorysql/ivorysql-master/bin\"" >pg_config_paths.h
echo "#define PGSHAREDIR \"/usr/local/ivorysql/ivorysql-master/share/postgresql\"" >>pg_config_paths.h
echo "#define SYSCONFDIR \"/usr/local/ivorysql/ivorysql-master/etc/postgresql\"" >>pg_config_paths.h
echo "#define INCLUDEDIR \"/usr/local/ivorysql/ivorysql-master/include\"" >>pg_config_paths.h
echo "#define PKGINCLUDEDIR \"/usr/local/ivorysql/ivorysql-master/include/postgresql\"" >>pg_config_paths.h
echo "#define INCLUDEDIRSERVER \"/usr/local/ivorysql/ivorysql-master/include/postgresql/server\"" >>pg_config_paths.h
echo "#define LIBDIR \"/usr/local/ivorysql/ivorysql-master/lib\"" >>pg_config_paths.h
echo "#define PKGLIBDIR \"/usr/local/ivorysql/ivorysql-master/lib/postgresql\"" >>pg_config_paths.h
echo "#define LOCALEDIR \"/usr/local/ivorysql/ivorysql-master/share/locale\"" >>pg_config_paths.h
echo "#define DOCDIR \"/usr/local/ivorysql/ivorysql-master/share/doc//postgresql\"" >>pg_config_paths.h
echo "#define HTMLDIR \"/usr/local/ivorysql/ivorysql-master/share/doc//postgresql\"" >>pg_config_paths.h
echo "#define MANDIR \"/usr/local/ivorysql/ivorysql-master/share/man\"" >>pg_config_paths.h
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -Wmissing-variable-declarations -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE      -c -o path.o path.c
uuid-ossp.c:40:2: error: #error "please use configure's --with-uuid switch to select a UUID library"
   40 | #error "please use configure's --with-uuid switch to select a UUID library"
      |  ^~~~~
uuid-ossp.c: In function ‘uuid_generate_internal’:
uuid-ossp.c:281:33: error: unknown type name ‘uuid_t’; did you mean ‘uid_t’?
  281 |                                 uuid_t          uu;
      |                                 ^~~~~~
      |                                 uid_t
uuid-ossp.c:282:58: error: ‘uuid_s_ok’ undeclared (first use in this function); did you mean ‘uuid_ns_oid’?
  282 |                                 uint32_t        status = uuid_s_ok;
      |                                                          ^~~~~~~~~
      |                                                          uuid_ns_oid
uuid-ossp.c:282:58: note: each undeclared identifier is reported only once for each function it appears in
uuid-ossp.c:285:33: error: implicit declaration of function ‘uuid_create’; did you mean ‘uuid_recv’? [-Wimplicit-function-declaration]
  285 |                                 uuid_create(&uu, &status);
      |                                 ^~~~~~~~~~~
      |                                 uuid_recv
uuid-ossp.c:289:41: error: implicit declaration of function ‘uuid_to_string’; did you mean ‘text_to_cstring’? [-Wimplicit-function-declaration]
  289 |                                         uuid_to_string(&uu, &str, &status);
      |                                         ^~~~~~~~~~~~~~
      |                                         text_to_cstring
uuid-ossp.c:75:20: error: unknown type name ‘uuid_t’; did you mean ‘uid_t’?
   75 | #define dce_uuid_t uuid_t
      |                    ^~~~~~
uuid-ossp.c:329:33: note: in expansion of macro ‘dce_uuid_t’
  329 |                                 dce_uuid_t      uu;
      |                                 ^~~~~~~~~~
uuid-ossp.c:83:11: error: request for member ‘time_low’ in something not a structure or union
   83 |         uu.time_low = pg_hton32(uu.time_low); \
      |           ^
uuid-ossp.c:374:33: note: in expansion of macro ‘UUID_TO_NETWORK’
  374 |                                 UUID_TO_NETWORK(uu);
      |                                 ^~~~~~~~~~~~~~~
In file included from uuid-ossp.c:19:
uuid-ossp.c:83:35: error: request for member ‘time_low’ in something not a structure or union
   83 |         uu.time_low = pg_hton32(uu.time_low); \
      |                                   ^
../../src/include/port/pg_bswap.h:55:41: note: in definition of macro ‘pg_bswap32’
   55 | #define pg_bswap32(x) __builtin_bswap32(x)
      |                                         ^
uuid-ossp.c:83:23: note: in expansion of macro ‘pg_hton32’
...
make[1]: *** [<builtin>: uuid-ossp.o] Error 1
make[1]: Leaving directory '/home/lct/repos/IvorySQL/contrib/uuid-ossp'
make: *** [GNUmakefile:11: all-contrib/uuid-ossp-recurse] Error 2
make: *** Waiting for unfinished jobs....
src/xml_functions/ora_xml_functions.c: In function ‘ivy_xmlisvalid’:
src/xml_functions/ora_xml_functions.c:2469:16: error: returning ‘void *’ from a function with return type ‘Datum’ {aka ‘long unsigned int’} makes integer from pointer without a cast [-Wint-conversion]
 2469 |         return NULL;
      |                ^~~~
src/xml_functions/ora_xml_functions.c: At top level:
src/xml_functions/ora_xml_functions.c:940:13: warning: ‘ivy_checkXPath’ defined but not used [-Wunused-function]
  940 | static void ivy_checkXPath(text *xpath, Oid collid, char *message)
      |             ^~~~~~~~~~~~~~
make[1]: *** [<builtin>: src/xml_functions/ora_xml_functions.o] Error 1
make[1]: Leaving directory '/home/lct/repos/IvorySQL/contrib/ivorysql_ora'
...
In file included from fe-misc.c:48:
libpq-fe.h:79:23: error: ‘bool’ cannot be defined via ‘typedef’
   79 | typedef unsigned char bool;
      |                       ^~~~
libpq-fe.h:79:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
libpq-fe.h:79:1: warning: useless type name in empty declaration
   79 | typedef unsigned char bool;
      | ^~~~~~~
In file included from fe-auth.h:17,
                 from fe-connect.c:32:
libpq-fe.h:79:23: error: ‘bool’ cannot be defined via ‘typedef’
   79 | typedef unsigned char bool;
      |                       ^~~~
libpq-fe.h:79:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
libpq-fe.h:79:1: warning: useless type name in empty declaration
   79 | typedef unsigned char bool;
      | ^~~~~~~
make[3]: *** [<builtin>: fe-misc.o] Error 1

...

Expected behavior/code

Success is expected.

Step to reproduce

git clone [email protected]:hanjianqiao/IvorySQL.git --depth=1
cd IvorySQL/
./configure --prefix=/usr/local/ivorysql/ivorysql-master
make -j $(nproc)

Additional context that can be helpful for identifying the problem

Maybe configure scripts need to force the standards.
Adding CFLAGS="-std=gnu11" to the configure command resolves the issue:

./configure CFLAGS="-std=gnu11"

Activity

  1. added
    bug
    on Jun 5, 2026
  2. messere1 commented on Jul 9, 2026

    @messere1
    Contributor

    I'd like to work on this.

  3. added a commit that references this issue on Jul 21, 2026
    0b63396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions