Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-426

Cmake errors during the debug build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 3.1.2
    • Fix Version/s: N/A
    • Labels:
      None
    • Environment:
      Fedora

      Description

      Hello,
      I have a problem running the debug build of the CONC/C.

      I use the following:

      %{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
      CXXFLAGS="$CFLAGS"
      export CFLAGS CXXFLAGS
      

      -DCMAKE_BUILD_TYPE="Debug"
      

      on standard x86_64.

      What I get is:

      -- Check if the system is big endian
      -- Searching 16 bit integer
      -- Looking for sys/types.h
      -- Looking for sys/types.h - found
      -- Looking for stdint.h
      -- Looking for stdint.h - found
      -- Looking for stddef.h
      -- Looking for stddef.h - found
      -- Check size of unsigned short
      -- Check size of unsigned short - failed
      -- Check size of unsigned int
      -- Check size of unsigned int - failed
      -- Check size of unsigned long
      -- Check size of unsigned long - failed
      CMake Error at /usr/share/cmake/Modules/TestBigEndian.cmake:50 (message):
        no suitable type found
      Call Stack (most recent call first):
        CMakeLists.txt:213 (TEST_BIG_ENDIAN)
       
       
      -- Configuring incomplete, errors occurred!
      

      Which, when googled:
      https://github.com/emscripten-core/emscripten/issues/400
      can be worked around by setting the "SET(CMAKE_16BIT_TYPE "unsigned short")" into /usr/share/cmake/Modules/TestBigEndian.cmake
      Which apparently isn't a good solution.


      The next error is:

      -- Configuring done
      CMake Error at libmariadb/CMakeLists.txt:369 (ADD_LIBRARY):
        Cannot find source file:
       
          ../zlib/adler32.c
       
        Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
        .hpp .hxx .in .txx
       
      CMake Error at libmariadb/CMakeLists.txt:369 (ADD_LIBRARY):
        No SOURCES given to target: mariadb_obj
       
      CMake Error at libmariadb/CMakeLists.txt:397 (ADD_LIBRARY):
        No SOURCES given to target: libmariadb
       
      CMake Error at libmariadb/CMakeLists.txt:393 (ADD_LIBRARY):
        No SOURCES given to target: mariadbclient
      

      Which is caused by me, executing "rm -r win zlib win-iconv examples" to be extra sure, those parts are not used during the compilation. For example that I force system zlib implementation.
      So the error above shouldn't IMHO happen with "-DWITH_EXTERNAL_ZLIB=YES", which I use.


      The next error is FTBFS

      In file included from /home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src/plugins/auth/caching_sha2_pw.c:31:
      /home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src/include/ma_global.h:621:2: error: #error "Neither int or long is of 4 bytes width"
       #error "Neither int or long is of 4 bytes width"
        ^~~~~
      make[2]: *** [CMakeFiles/caching_sha2_password.dir/build.make:66: CMakeFiles/caching_sha2_password.dir/plugins/auth/caching_sha2_pw.c.o] Error 1
      make[2]: Entering directory '/home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src'
      [  3%] Building C object CMakeFiles/caching_sha2_password.dir/plugins/auth/caching_sha2_pw.c.o
      /usr/bin/cc -DHAVE_OPENSSL -DHAVE_TLS -DMARIADB_MACHINE_TYPE=\"x86_64\" -DMARIADB_SYSTEM_TYPE=\"Linux\" -Dcaching_sha2_password_EXPORTS -I/usr/include -I/home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src/include -I/home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src/plugins/auth -I/home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src/plugins/pvio  -O0 -g -Wunused -Wlogical-op -Wno-uninitialized -Wall -Wextra -Wformat-security -Wno-init-self -Wwrite-strings -Wshift-count-overflow -Wdeclaration-after-statement -Wno-undef -Wno-unknown-pragmas -fPIC   -DPLUGIN_DYNAMIC=1  -o CMakeFiles/caching_sha2_password.dir/plugins/auth/caching_sha2_pw.c.o   -c /home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src/plugins/auth/caching_sha2_pw.c
      make[2]: Leaving directory '/home/faramos/work/COCN-C_final/mariadb-connector-c/mariadb-connector-c-3.1.2-src'
      make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/caching_sha2_password.dir/all] Error 2
      make: *** [Makefile:155: all] Error 2
      
      

      Which may be caused by the improper workaround of the first issue.


      Can reproduce same errors in your buildbot?

      For the full reference, the Fedora sources can be found here:
      https://src.fedoraproject.org/rpms/mariadb-connector-c/tree/master
      https://src.fedoraproject.org/rpms/mariadb-connector-c/blob/master/f/mariadb-connector-c.spec

        Attachments

        1. CMakeError.log
          18 kB
        2. CMakeError.log_2
          44 kB
        3. CMakeOutput.log
          21 kB
        4. CMakeOutput.log_2
          98 kB

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            mschorm Michal Schorm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: