Criterion: Can't compile on openSUSE
Hello, I’m trying to package Criterion on openSUSE, but I’m facing some issues:
[ 12s] The Meson build system
[ 12s] Version: 0.64.1
[ 12s] Source dir: /home/abuild/rpmbuild/BUILD/Criterion-2.4.1
[ 12s] Build dir: /home/abuild/rpmbuild/BUILD/Criterion-2.4.1/x86_64-suse-linux
[ 12s] Build type: native build
[ 12s] Project name: criterion
[ 12s] Project version: 2.4.1
[ 12s] C compiler for the host machine: cc (gcc 12.2.1 "cc (SUSE Linux) 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7]")
[ 12s] C linker for the host machine: cc ld.bfd 2.39.0.20220810-1
[ 12s] Host machine cpu family: x86_64
[ 12s] Host machine cpu: x86_64
[ 12s] Program python3 found: YES (/usr/bin/python3)
[ 12s] Program git found: NO
[ 12s] WARNING: You should add the boolean check kwarg to the run_command call.
[ 12s] It currently defaults to false,
[ 12s] but it will default to true in future releases of meson.
[ 12s] See also: https://github.com/mesonbuild/meson/issues/9300
[ 12s] C++ compiler for the host machine: c++ (gcc 12.2.1 "c++ (SUSE Linux) 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7]")
[ 12s] C++ linker for the host machine: c++ ld.bfd 2.39.0.20220810-1
[ 12s] Compiler for C supports arguments -Wno-unused-parameter: YES
[ 12s] Compiler for C supports arguments -Wno-unused-value: YES
[ 12s] Compiler for C supports arguments -fvisibility=hidden: YES
[ 12s] Compiler for C supports arguments -fexceptions: YES
[ 12s] Compiler for C supports arguments /SAFESEH:NO: NO
[ 12s] Compiler for C supports arguments /source-charset:utf-8: NO
[ 12s] Checking for function "clock_gettime" : YES
[ 12s] Checking for function "fopencookie" : YES
[ 12s] Checking for function "funopen" : NO
[ 12s] Checking for function "getcwd" : YES
[ 12s] Checking for function "isatty" : YES
[ 12s] Checking for function "nl_langinfo" : YES
[ 12s] Checking for function "open_memstream" : YES
[ 12s] Checking for function "strtok_r" : YES
[ 12s] Checking for function "strtok_s" : NO
[ 12s] Header "time.h" has symbol "CLOCK_MONOTONIC_RAW" : YES
[ 12s] Checking for function "GetCurrentDirectory" : NO
[ 12s] Checking for function "PathIsRelative" : NO
[ 12s] Has header "synchapi.h" : NO
[ 12s] Program gettext found: YES (/usr/bin/gettext)
[ 12s] Program msgfmt found: YES (/usr/bin/msgfmt)
[ 12s] Program msginit found: YES (/usr/bin/msginit)
[ 12s] Program msgmerge found: YES (/usr/bin/msgmerge)
[ 12s] Program xgettext found: YES (/usr/bin/xgettext)
[ 12s] Run-time dependency threads found: YES
[ 12s] Found pkg-config: /usr/bin/pkg-config (1.8.0)
[ 12s] Run-time dependency nanomsg found: YES 1.1.5
[ 12s] Found CMake: /usr/bin/cmake (3.25.1)
[ 12s] Run-time dependency nanopb (modules: nanopb::protobuf-nanopb) found: YES 0.4.6
[ 12s] Run-time dependency libgit2 found: YES 1.5.0
[ 12s] Run-time dependency boxfort found: YES 0.0.1
[ 12s] Run-time dependency libffi found: YES 3.4.4
[ 12s] Library rt found: YES
[ 12s] Library m found: YES
[ 12s] Library intl found: NO
[ 12s] Header "libintl.h" has symbol "gettext" with dependency -lintl: YES
[ 12s] Program protoc found: YES (/usr/bin/protoc)
[ 12s] Program protoc-gen-nanopb found: YES (/usr/bin/protoc-gen-nanopb)
[ 12s] Configuring config.h using configuration
[ 12s] Compiler for C supports link arguments -Wl,--exclude-libs,ALL: YES
[ 12s] Program sh found: YES (/usr/bin/sh)
[ 12s] Program cram found: NO
[ 12s] Build targets in project: 49
[ 12s] NOTICE: Future-deprecated features used:
[ 12s] * 0.55.0: {'ExternalProgram.path'}
[ 12s] * 0.56.0: {'meson.source_root'}
[ 12s]
[ 12s] criterion 2.4.1
[ 12s]
[ 12s] User defined options
[ 12s] auto_features : enabled
[ 12s] bindir : /usr/bin
[ 12s] buildtype : plain
[ 12s] datadir : /usr/share
[ 12s] includedir : /usr/include
[ 12s] infodir : /usr/share/info
[ 12s] libdir : /usr/lib64
[ 12s] libexecdir : /usr/libexec
[ 12s] localedir : /usr/share/locale
[ 12s] localstatedir : /var
[ 12s] mandir : /usr/share/man
[ 12s] prefix : /usr
[ 12s] sbindir : /usr/sbin
[ 12s] sharedstatedir: /var/lib
[ 12s] sysconfdir : /etc
[ 12s] wrap_mode : nodownload
then the compilation starts and fails at the following steps:
[ 13s] [37/138] cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/debugbreak -I../dependencies/klib -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fPIC -DOPENSSL_LOAD_CONF -pthread -DBXF_STATIC_LIB=1 -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/core_abort.c.o -MF src/libcriterion.so.3.2.0.p/core_abort.c.o.d -o src/libcriterion.so.3.2.0.p/core_abort.c.o -c ../src/core/abort.c
[ 13s] FAILED: src/libcriterion.so.3.2.0.p/core_abort.c.o
[ 13s] cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/debugbreak -I../dependencies/klib -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fPIC -DOPENSSL_LOAD_CONF -pthread -DBXF_STATIC_LIB=1 -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/core_abort.c.o -MF src/libcriterion.so.3.2.0.p/core_abort.c.o.d -o src/libcriterion.so.3.2.0.p/core_abort.c.o -c ../src/core/abort.c
[ 13s] ../src/core/abort.c:32:10: fatal error: debugbreak.h: No such file or directory
[ 13s] 32 | #include "debugbreak.h"
[ 13s] | ^~~~~~~~~~~~~~
[ 13s] compilation terminated.
[ 13s] [38/138] cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/debugbreak -I../dependencies/klib -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fPIC -DOPENSSL_LOAD_CONF -pthread -DBXF_STATIC_LIB=1 -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/core_client.c.o -MF src/libcriterion.so.3.2.0.p/core_client.c.o.d -o src/libcriterion.so.3.2.0.p/core_client.c.o -c ../src/core/client.c
[ 13s] FAILED: src/libcriterion.so.3.2.0.p/core_client.c.o
[ 13s] cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/debugbreak -I../dependencies/klib -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fPIC -DOPENSSL_LOAD_CONF -pthread -DBXF_STATIC_LIB=1 -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/core_client.c.o -MF src/libcriterion.so.3.2.0.p/core_client.c.o.d -o src/libcriterion.so.3.2.0.p/core_client.c.o -c ../src/core/client.c
[ 13s] In file included from ../src/core/client.c:33:
[ 13s] ../src/core/client.h:27:10: fatal error: khash.h: No such file or directory
[ 13s] 27 | #include <khash.h>
[ 13s] | ^~~~~~~~~
[ 13s] compilation terminated.
[ 13s] [40/138] cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/debugbreak -I../dependencies/klib -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fPIC -DOPENSSL_LOAD_CONF -pthread -DBXF_STATIC_LIB=1 -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/core_runner.c.o -MF src/libcriterion.so.3.2.0.p/core_runner.c.o.d -o src/libcriterion.so.3.2.0.p/core_runner.c.o -c ../src/core/runner.c
[ 13s] FAILED: src/libcriterion.so.3.2.0.p/core_runner.c.o
[ 13s] cc -Isrc/libcriterion.so.3.2.0.p -Isrc -I../src -I../dependencies/debugbreak -I../dependencies/klib -I../dependencies/valgrind/include -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -Wno-unused-parameter -Wno-unused-value -fvisibility=hidden -fexceptions -DCRITERION_BUILDING_DLL=1 -DPB_ENABLE_MALLOC=1 -DPB_NO_PACKED_STRUCTS=1 -D_GNU_SOURCE '-DGETTEXT_PACKAGE="criterion"' -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -fPIC -DOPENSSL_LOAD_CONF -pthread -DBXF_STATIC_LIB=1 -D__USE_MINGW_ANSI_STDIO -MD -MQ src/libcriterion.so.3.2.0.p/core_runner.c.o -MF src/libcriterion.so.3.2.0.p/core_runner.c.o.d -o src/libcriterion.so.3.2.0.p/core_runner.c.o -c ../src/core/runner.c
[ 13s] In file included from ../src/core/runner.c:51:
[ 13s] ../src/core/client.h:27:10: fatal error: khash.h: No such file or directory
[ 13s] 27 | #include <khash.h>
[ 13s] | ^~~~~~~~~
[ 13s] compilation terminated.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 37
that feeling when everything works 😄 can confirm that Criterion now works fine on openSUSE Tumbleweed. Will test Leap too and then tomorrow I’ll start the official packaging process.
FYI, first test package is ready: https://build.opensuse.org/package/show/home:polslinux:tools/criterion
will test it this afternoon, let’s see how it goes 😄
I’m using boxfort = 0.1.4 taken from
https://github.com/Snaipe/BoxFort/archive/refs/tags/v%{version}.tar.gzFor both boxtrot and criterion the build and install cmds are:
but on criterion I also add
-Dtests=false.About those macros:
@MrAnno I think I’ll do the same. No point in having a separate pacakge for
klib.debugbreakseems trivial to package, let’s see how it goes 😃nice, thanks! BoxFort I already packaged it yesterday. Now I have to package those 2 submods.