Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34072

Compiling with gcc-14.1 is fails with error: implicit declaration of function 'event_loopbreak';

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.11.7
    • N/A
    • Server
    • None
    • Linux using gcc-14.1

    Description

      Here is the build error.

       
      FAILED: tests/CMakeFiles/async_queries.dir/async_queries.c.o 
      /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -DHAVE_CONFIG_H -DMYSQL_CLIENT -D_FILE_OFFSET_BITS=64 -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/libmariadb/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/.x86_64-libreelec-linux-gnu/libmariadb/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/wsrep-lib/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/wsrep-lib/wsrep-API/v26 -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/.x86_64-libreelec-linux-gnu/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/include/providers -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/client -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG  -DDBUG_OFF -std=gnu99 -MD -MT tests/CMakeFiles/async_queries.dir/async_queries.c.o -MF tests/CMakeFiles/async_queries.dir/async_queries.c.o.d -o tests/CMakeFiles/async_queries.dir/async_queries.c.o -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-10.11.7/tests/async_queries.c
      ../tests/async_queries.c: In function 'state_machine_handler':
      ../tests/async_queries.c:301:7: error: implicit declaration of function 'event_loopbreak'; did you mean 'event_loopexit'? [-Wimplicit-function-declaration]
        301 |       event_loopbreak();
            |       ^~~~~~~~~~~~~~~
            |       event_loopexit
      

      Attachments

        Activity

          I wasn't able to repeat it. I didn't try gcc 14.1, but both 14.0 and 15.0 compile MariaDB 10.11 just fine.

          What is /.../build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc? Is it patched gcc or vanilla? Is it 13.0 or 14.1?

          serg Sergei Golubchik added a comment - I wasn't able to repeat it. I didn't try gcc 14.1, but both 14.0 and 15.0 compile MariaDB 10.11 just fine. What is /.../build.LibreELEC-Generic.x86_64- 13.0 -devel/toolchain/bin/ x86_64-libreelec-linux-gnu-gcc ? Is it patched gcc or vanilla? Is it 13.0 or 14.1?
          heitbaum Rudi Heitbaum added a comment -

          It seems to be related to the version of libevent

          sysroot/usr/include/event.h:int event_loopexit (struct timeval *tv);
          sysroot/usr/include/event2/event_compat.h:int event_loopbreak(void);
          sysroot/usr/include/event2/event_compat.h:int event_loopexit(const struct timeval *);

          If I replace the #include <event.h> with

          #include <event2/event_struct.h>
          #include <event2/event_compat.h>
          #include <event2/event.h>

          I get a successful compile.

          heitbaum Rudi Heitbaum added a comment - It seems to be related to the version of libevent sysroot/usr/include/event.h:int event_loopexit (struct timeval *tv); sysroot/usr/include/event2/event_compat.h:int event_loopbreak(void); sysroot/usr/include/event2/event_compat.h:int event_loopexit(const struct timeval *); If I replace the #include <event.h> with #include <event2/event_struct.h> #include <event2/event_compat.h> #include <event2/event.h> I get a successful compile.

          what's your libevent version?

          serg Sergei Golubchik added a comment - what's your libevent version?
          heitbaum Rudi Heitbaum added a comment -

          We are running 2.1.12

          heitbaum Rudi Heitbaum added a comment - We are running 2.1.12

          I have 2.1.12 installed locally and everything compiles.
          In my Gentoo

          $ equery b  /usr/include/event.h 
           * Searching for /usr/include/event.h ... 
          dev-libs/libevent-2.1.12-r1 (/usr/include/event.h)
          

          means that /usr/include/event.h is part of libevent-2.1.12-r1.
          And indeed, it simply includes various headers from event2/
          https://github.com/libevent/libevent/blob/release-2.1.12-stable/include/event.h

          But it is present in libevent 2.1.12. Why is it missing for you?

          serg Sergei Golubchik added a comment - I have 2.1.12 installed locally and everything compiles. In my Gentoo $ equery b /usr/include/event.h * Searching for /usr/include/event.h ... dev-libs/libevent-2.1.12-r1 (/usr/include/event.h) means that /usr/include/event.h is part of libevent-2.1.12-r1 . And indeed, it simply includes various headers from event2/ https://github.com/libevent/libevent/blob/release-2.1.12-stable/include/event.h But it is present in libevent 2.1.12. Why is it missing for you?

          People

            Unassigned Unassigned
            heitbaum Rudi Heitbaum
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.