Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

ABI tests are failing #54

Closed
ignatenkobrain opened this issue Nov 9, 2020 · 6 comments
Closed

ABI tests are failing #54

ignatenkobrain opened this issue Nov 9, 2020 · 6 comments
Labels

Comments

@ignatenkobrain
Copy link

Mock Version: 1.3.4
Mock Version: 1.3.4
ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/rust-glib-sys.spec'], chrootPath='/var/lib/mock/f30-build-13706180-992465/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f650d7f4fd0>timeout=172800uid=1000gid=425user='mockbuild'nspawn_args=[]printOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/rust-glib-sys.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/rust-glib-sys-0.7.0-1.fc30.src.rpm
Child return code was: 0
ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/rust-glib-sys.spec'], chrootPath='/var/lib/mock/f30-build-13706180-992465/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f650d7f4fd0>timeout=172800uid=1000gid=425user='mockbuild'nspawn_args=[]printOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/rust-glib-sys.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.tarysN
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf glib-sys-0.7.0
+ /usr/bin/gzip -dc /builddir/build/SOURCES/glib-sys-0.7.0.crate
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd glib-sys-0.7.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ set -eu
+ /usr/bin/mkdir -p .cargo
+ cat
+ /usr/bin/rm -f Cargo.lock
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.9WsEIk
+ umask 022
+ cd /builddir/build/BUILD
+ cd glib-sys-0.7.0
+ /usr/bin/cargo build -j6 --release
   Compiling pkg-config v0.3.14
   Compiling libc v0.2.43
     Running `/usr/bin/rustc --crate-name pkg_config /usr/share/cargo/registry/pkg-config-0.3.14/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=788d45e7f9a539bb -C extra-filename=-788d45e7f9a539bb --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --cap-lints allow -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
     Running `/usr/bin/rustc --crate-name libc /usr/share/cargo/registry/libc-0.2.43/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=3afbfc9721f331b1 -C extra-filename=-3afbfc9721f331b1 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --cap-lints allow -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
   Compiling glib-sys v0.7.0 (file:///builddir/build/BUILD/glib-sys-0.7.0)
     Running `/usr/bin/rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=c4d094274da0474e -C extra-filename=-c4d094274da0474e --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/build/glib-sys-c4d094274da0474e -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern pkg_config=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libpkg_config-788d45e7f9a539bb.rlib -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
     Running `/builddir/build/BUILD/glib-sys-0.7.0/target/release/build/glib-sys-c4d094274da0474e/build-script-build`
     Running `/usr/bin/rustc --crate-name glib_sys src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=29b91956bde5d700 -C extra-filename=-29b91956bde5d700 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern libc=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/liblibc-3afbfc9721f331b1.rlib -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now -l glib-2.0`
    Finished release [optimized] target(s) in 6.25s
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.bT5EI7
+ umask 022
+ cd /builddir/build/BUILD
+ '[' /builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64 '!=' / ']'
+ rm -rf /builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64
++ dirname /builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64
+ mkdir -p /builddir/build/BUILDROOT
+ mkdir /builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64
+ cd glib-sys-0.7.0
+ set -eu
+ /usr/bin/cargo-inspector --target-kinds Cargo.toml
++ printf 'lib\nrlib\nproc-macro'
+ grep -q -F -x 'lib
rlib
proc-macro'
++ /usr/bin/cargo-inspector --name Cargo.toml
+ CRATE_NAME=glib-sys
++ /usr/bin/cargo-inspector --version Cargo.toml
+ CRATE_VERSION=0.7.0
+ REG_DIR=/builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64/usr/share/cargo/registry/glib-sys-0.7.0
+ /usr/bin/mkdir -p /builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64/usr/share/cargo/registry/glib-sys-0.7.0
+ /usr/bin/cargo package -l
+ xargs /usr/bin/cp --parents -a -t /builddir/build/BUILDROOT/rust-glib-sys-0.7.0-1.fc30.x86_64/usr/share/cargo/registry/glib-sys-0.7.0
+ echo '{"files":{},"package":""}'
+ /usr/bin/cargo-inspector --target-kinds Cargo.toml
+ grep -q -F -x bin
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 1
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.U4Z8jX
+ umask 022
+ cd /builddir/build/BUILD
+ cd glib-sys-0.7.0
+ /usr/bin/cargo test -j6 --release --no-fail-fast
       Fresh pkg-config v0.3.14
       Fresh libc v0.2.43
   Compiling remove_dir_all v0.5.1
   Compiling shell-words v0.1.0
   Compiling rand v0.4.3
     Running `/usr/bin/rustc --crate-name remove_dir_all /usr/share/cargo/registry/remove_dir_all-0.5.1/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=4ae85082c63c3dc9 -C extra-filename=-4ae85082c63c3dc9 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --cap-lints allow -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
     Running `/usr/bin/rustc --crate-name shell_words /usr/share/cargo/registry/shell-words-0.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=c0b37f57af14f37e -C extra-filename=-c0b37f57af14f37e --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --cap-lints allow -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
     Running `/usr/bin/rustc --crate-name rand /usr/share/cargo/registry/rand-0.4.3/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="libc"' --cfg 'feature="std"' -C metadata=41c6e2799de0ba83 -C extra-filename=-41c6e2799de0ba83 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern libc=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/liblibc-3afbfc9721f331b1.rlib --cap-lints allow -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
   Compiling tempdir v0.3.7
     Running `/usr/bin/rustc --crate-name tempdir /usr/share/cargo/registry/tempdir-0.3.7/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=c2faa45844cd0186 -C extra-filename=-c2faa45844cd0186 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern rand=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/librand-41c6e2799de0ba83.rlib --extern remove_dir_all=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libremove_dir_all-4ae85082c63c3dc9.rlib --cap-lints allow -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
   Compiling glib-sys v0.7.0 (file:///builddir/build/BUILD/glib-sys-0.7.0)
     Running `/usr/bin/rustc --crate-name glib_sys src/lib.rs --emit=dep-info,link -C opt-level=3 --test -C metadata=15f0e834c4041288 -C extra-filename=-15f0e834c4041288 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern libc=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/liblibc-3afbfc9721f331b1.rlib --extern shell_words=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libshell_words-c0b37f57af14f37e.rlib --extern tempdir=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libtempdir-c2faa45844cd0186.rlib -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now -l glib-2.0`
     Running `/usr/bin/rustc --crate-name abi tests/abi.rs --emit=dep-info,link -C opt-level=3 --test -C metadata=97a50eb65f5f2746 -C extra-filename=-97a50eb65f5f2746 --out-dir /builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern glib_sys=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libglib_sys-29b91956bde5d700.rlib --extern libc=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/liblibc-3afbfc9721f331b1.rlib --extern shell_words=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libshell_words-c0b37f57af14f37e.rlib --extern tempdir=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libtempdir-c2faa45844cd0186.rlib -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now`
    Finished release [optimized] target(s) in 4.52s
     Running `/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/glib_sys-15f0e834c4041288`
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
     Running `/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/abi-97a50eb65f5f2746`
running 2 tests
tests/layout.c: In function 'main':
<command-line>: error: 'GType' undeclared (first use in this function); did you mean 'GTree'?
tests/layout.c:10:31: note: in expansion of macro 'ABI_TYPE_NAME'
     printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME));
                               ^~~~~~~~~~~~~
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
tests/layout.c:10:31: note: in expansion of macro 'ABI_TYPE_NAME'
     printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME));
                               ^~~~~~~~~~~~~
test cross_validate_layout_with_c ... FAILED
tests/constant.c: In function 'main':
<command-line>: error: 'G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX' undeclared (first use in this function); did you mean 'G_KEY_FILE_DESKTOP_GROUP'?
<command-line>: note: in definition of macro 'ABI_CONSTANT_NAME'
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
<command-line>: note: in definition of macro 'ABI_CONSTANT_NAME'
tests/constant.c: In function 'main':
<command-line>: error: 'G_KEY_FILE_DESKTOP_KEY_FULLNAME' undeclared (first use in this function); did you mean 'G_KEY_FILE_DESKTOP_KEY_NAME'?
tests/constant.c:9:22: note: in expansion of macro 'ABI_CONSTANT_NAME'
     printf(_Generic((ABI_CONSTANT_NAME),
                      ^~~~~~~~~~~~~~~~~
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
tests/constant.c:9:22: note: in expansion of macro 'ABI_CONSTANT_NAME'
     printf(_Generic((ABI_CONSTANT_NAME),
                      ^~~~~~~~~~~~~~~~~
tests/constant.c: In function 'main':
<command-line>: error: 'G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN' undeclared (first use in this function); did you mean 'G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN'?
<command-line>: note: in definition of macro 'ABI_CONSTANT_NAME'
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
<command-line>: note: in definition of macro 'ABI_CONSTANT_NAME'
tests/constant.c: In function 'main':
<command-line>: error: 'G_KEY_FILE_DESKTOP_KEY_KEYWORDS' undeclared (first use in this function); did you mean 'G_KEY_FILE_DESKTOP_KEY_ACTIONS'?
tests/constant.c:9:22: note: in expansion of macro 'ABI_CONSTANT_NAME'
     printf(_Generic((ABI_CONSTANT_NAME),
                      ^~~~~~~~~~~~~~~~~
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
tests/constant.c:9:22: note: in expansion of macro 'ABI_CONSTANT_NAME'
     printf(_Generic((ABI_CONSTANT_NAME),
                      ^~~~~~~~~~~~~~~~~
tests/constant.c: In function 'main':
<command-line>: error: 'G_WIN32_MSG_HANDLE' undeclared (first use in this function); did you mean 'G_VARIANT_CLASS_HANDLE'?
tests/constant.c:9:22: note: in expansion of macro 'ABI_CONSTANT_NAME'
     printf(_Generic((ABI_CONSTANT_NAME),
                      ^~~~~~~~~~~~~~~~~
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
tests/constant.c:9:22: note: in expansion of macro 'ABI_CONSTANT_NAME'
     printf(_Generic((ABI_CONSTANT_NAME),
                      ^~~~~~~~~~~~~~~~~
test cross_validate_constants_with_c ... FAILED
failures:
---- cross_validate_layout_with_c stdout ----
layout    ... 25 passed; 0 failed (compilation errors: 0)
layout    ... 50 passed; 0 failed (compilation errors: 0)
layout    ... 75 passed; 0 failed (compilation errors: 0)
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-DABI_TYPE_NAME=GType" "tests/layout.c" "-o" "/tmp/abi.9q1WVTnZpwZm/layout" failed, exit code: 1
layout    ... 99 passed; 1 failed (compilation errors: 1)
thread 'cross_validate_layout_with_c' panicked at 'FAILED: 101 passed; 1 failed (compilation errors: 1)', tests/abi.rs:126:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- cross_validate_constants_with_c stdout ----
constants ... 25 passed; 0 failed (compilation errors: 0)
constants ... 50 passed; 0 failed (compilation errors: 0)
constants ... 75 passed; 0 failed (compilation errors: 0)
constants ... 100 passed; 0 failed (compilation errors: 0)
constants ... 125 passed; 0 failed (compilation errors: 0)
constants ... 150 passed; 0 failed (compilation errors: 0)
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-DABI_CONSTANT_NAME=G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX" "tests/constant.c" "-o" "/tmp/abi.ZIkfIOk0WcTK/constant" failed, exit code: 1
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-DABI_CONSTANT_NAME=G_KEY_FILE_DESKTOP_KEY_FULLNAME" "tests/constant.c" "-o" "/tmp/abi.ZIkfIOk0WcTK/constant" failed, exit code: 1
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-DABI_CONSTANT_NAME=G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN" "tests/constant.c" "-o" "/tmp/abi.ZIkfIOk0WcTK/constant" failed, exit code: 1
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-DABI_CONSTANT_NAME=G_KEY_FILE_DESKTOP_KEY_KEYWORDS" "tests/constant.c" "-o" "/tmp/abi.ZIkfIOk0WcTK/constant" failed, exit code: 1
constants ... 171 passed; 4 failed (compilation errors: 4)
Constant value mismatch for G_LOG_DOMAIN
Rust: "0"
C:    "(null)"
constants ... 195 passed; 5 failed (compilation errors: 4)
constants ... 220 passed; 5 failed (compilation errors: 4)
constants ... 245 passed; 5 failed (compilation errors: 4)
constants ... 270 passed; 5 failed (compilation errors: 4)
constants ... 295 passed; 5 failed (compilation errors: 4)
constants ... 320 passed; 5 failed (compilation errors: 4)
constants ... 345 passed; 5 failed (compilation errors: 4)
constants ... 370 passed; 5 failed (compilation errors: 4)
constants ... 395 passed; 5 failed (compilation errors: 4)
constants ... 420 passed; 5 failed (compilation errors: 4)
constants ... 445 passed; 5 failed (compilation errors: 4)
constants ... 470 passed; 5 failed (compilation errors: 4)
constants ... 495 passed; 5 failed (compilation errors: 4)
constants ... 520 passed; 5 failed (compilation errors: 4)
constants ... 545 passed; 5 failed (compilation errors: 4)
constants ... 570 passed; 5 failed (compilation errors: 4)
constants ... 595 passed; 5 failed (compilation errors: 4)
constants ... 620 passed; 5 failed (compilation errors: 4)
constants ... 645 passed; 5 failed (compilation errors: 4)
constants ... 670 passed; 5 failed (compilation errors: 4)
constants ... 695 passed; 5 failed (compilation errors: 4)
constants ... 720 passed; 5 failed (compilation errors: 4)
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-I/usr/include/glib-2.0" "-I/usr/lib64/glib-2.0/include" "-DABI_CONSTANT_NAME=G_WIN32_MSG_HANDLE" "tests/constant.c" "-o" "/tmp/abi.ZIkfIOk0WcTK/constant" failed, exit code: 1
thread 'cross_validate_constants_with_c' panicked at 'FAILED: 731 passed; 6 failed (compilation errors: 5)', tests/abi.rs:126:13
failures:
    cross_validate_constants_with_c
    cross_validate_layout_with_c
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
   Doc-tests glib_sys
     Running `/usr/bin/rustdoc --test /builddir/build/BUILD/glib-sys-0.7.0/src/lib.rs --crate-name glib_sys -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps -L dependency=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps --extern glib_sys=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libglib_sys-29b91956bde5d700.rlib --extern libc=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/liblibc-3afbfc9721f331b1.rlib --extern shell_words=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libshell_words-c0b37f57af14f37e.rlib --extern tempdir=/builddir/build/BUILD/glib-sys-0.7.0/target/release/deps/libtempdir-c2faa45844cd0186.rlib`
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--test abi'
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.U4Z8jX (%check)
    Bad exit status from /var/tmp/rpm-tmp.U4Z8jX (%check)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 582, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/rust-glib-sys.spec
@pbor
Copy link
Contributor

pbor commented Jan 31, 2021

The abi checks also fail on Windows. I disabled the sys tests for all crates except cairo in #256

@sdroege
Copy link
Member

sdroege commented Jan 31, 2021

@pbor Can you add the failures here?

@pbor
Copy link
Contributor

pbor commented Jan 31, 2021

You can see the output in this run: https://github.com/pbor/gtk-rs/runs/1801152489?check_suite_focus=true

Now that I check it, we might be running in something simpler since it is just not finding a file...

@sdroege
Copy link
Member

sdroege commented Jan 31, 2021

Maybe that's not finding the C compiler?

@sdroege
Copy link
Member

sdroege commented Feb 2, 2021

What fails here must be

fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
    let exe = dir.join("constant");
    let mut cc = cc.clone();
    cc.define("ABI_CONSTANT_NAME", name);
    cc.compile(Path::new("tests/constant.c"), &exe)?;  <------

and then leading to

    pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
        let mut cmd = self.to_command();
        cmd.arg(src);
        cmd.arg("-o");
        cmd.arg(out);
        let status = cmd.spawn()?.wait()?; <------

One of the ? operators there fails. Should really use a richer error type for this kind of stuff so we get backtraces...

But in the end this means that CC is not set to the C compiler, and cc is not in the PATH either. Setting CC to MSVC's cl.exe will probably still not work as the commandline arguments are different than what is used here. That code needs to be changed a bit to also handle MSVC. MINGW should work fine though.

gstreamer-github pushed a commit to sdroege/gstreamer-rs that referenced this issue May 19, 2022
There are a couple things going on here.

First, we need to avoid building egl/wayalnd/x11 crates on windows
as they can't be built.

Then we need to avoid running -sys tests as they don't succeed
currently. See [1]

Finally use a matrix:parallel job to tests multiple build
configurations.

[1] gtk-rs/gtk3-rs#54

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/701>
@bilelmoussaoui
Copy link
Member

I am not sure why this issue is open on gtk3-rs when it is about glib (gtk-rs-core) stuff. Anyway, those tests are enabled & fixed now

This issue is being transferred. Timeline may not be complete until it finishes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants