Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed #110

Open
takakawa opened this issue Jul 1, 2023 · 5 comments
Open

Build failed #110

takakawa opened this issue Jul 1, 2023 · 5 comments

Comments

@takakawa
Copy link

takakawa commented Jul 1, 2023

build failed

error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-DDISABLE_X64" "-Wno-unused-function" "-o" "/workspace/rust/roarningbitmap/target/debug/build/croaring-sys-7cd393670621a907/out/CRoaring/roaring.o" "-c" "CRoaring/roaring.c" with args "cc" did not execute successfully (status code exit status: 1).

@saulius
Copy link
Member

saulius commented Jul 11, 2023

Hello! Can you please run this command manually and show the output? From croaring-rs root:

cc -O0 -ffunction-sections -fdata-sections -fPIC -gdwarf-4 -fno-omit-frame-pointer -m64 -DDISABLE_X64 -Wno-unused-function -o "/workspace/rust/roarningbitmap/target/debug/build/croaring-sys-7cd393670621a907/out/CRoaring/roaring.o" -c croaring-sys/CRoaring/roaring.c

@chenrui333
Copy link

seeing the same thing in grin-wallet build, Homebrew/homebrew-core#137857

  error: failed to run custom build command for `croaring-sys v0.4.6`
  
  Caused by:
    process didn't exit successfully: `/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target/release/build/croaring-sys-7351c0e74761bdeb/build-script-build` (exit status: 101)
    --- stdout
    TARGET = Some("x86_64-unknown-linux-gnu")
    OPT_LEVEL = Some("3")
    HOST = Some("x86_64-unknown-linux-gnu")
    CC_x86_64-unknown-linux-gnu = None
    CC_x86_64_unknown_linux_gnu = None
    HOST_CC = None
    CC = Some("gcc-11")
    CFLAGS_x86_64-unknown-linux-gnu = None
    CFLAGS_x86_64_unknown_linux_gnu = None
    HOST_CFLAGS = None
    CFLAGS = None
    CRATE_CC_NO_DEFAULTS = None
    DEBUG = Some("false")
    CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,sse,sse2,sse3,ssse3")
    CC_x86_64-unknown-linux-gnu = None
    CC_x86_64_unknown_linux_gnu = None
    HOST_CC = None
    CC = Some("gcc-11")
    CFLAGS_x86_64-unknown-linux-gnu = None
    CFLAGS_x86_64_unknown_linux_gnu = None
    HOST_CFLAGS = None
    CFLAGS = None
    CRATE_CC_NO_DEFAULTS = None
    CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,sse,sse2,sse3,ssse3")
    running: "gcc-11" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-Wall" "-Wextra" "-march=native" "-o" "/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target/release/build/croaring-sys-58c8c27055f13489/out/CRoaring/roaring.o" "-c" "CRoaring/roaring.c"
    exit status: 0
    AR_x86_64-unknown-linux-gnu = None
    AR_x86_64_unknown_linux_gnu = None
    HOST_AR = None
    AR = None
    running: ZERO_AR_DATE="1" "ar" "cq" "/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target/release/build/croaring-sys-58c8c27055f13489/out/libroaring.a" "/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target/release/build/croaring-sys-58c8c27055f13489/out/CRoaring/roaring.o"
    exit status: 0
    running: "ar" "s" "/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target/release/build/croaring-sys-58c8c27055f13489/out/libroaring.a"
    exit status: 0
    cargo:rustc-link-lib=static=roaring
    cargo:rustc-link-search=native=/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target/release/build/croaring-sys-58c8c27055f13489/out
  
    --- stderr
    thread 'main' panicked at 'Non floating-type complex? Type(_Complex _Float16, kind: Complex, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Type(_Float16, kind: Float16, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None))', /github/home/.cache/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.56.0/src/ir/context.rs:1957:26
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  warning: build failed, waiting for other jobs to finish...
  error: failed to compile `grin_wallet v5.1.0 (/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0)`, intermediate artifacts can be found at `/tmp/grin-wallet-20230728-9846-10uyqpj/grin-wallet-5.1.0/target`

let me know if I need to provide more details.

@saulius
Copy link
Member

saulius commented Aug 4, 2023

Does this also happen with the latest version of croaring-rs?

@Dr-Emann
Copy link
Member

Dr-Emann commented Aug 4, 2023

These appear to be two separate issues:

@takakawa's issue

This appears to be an error to compile the C source code. I don't have much info, though I will say the combination "-m64" "-DDISABLE_X64" looks suspicious to me, but I don't see anything that uses a define called DISABLE_X64, I see one called ROARING_DISABLE_X64. CRoaring's build script doesn't look like it would ever add a flag like -DDISABLE_X64, so I'm guessing it came from e.g. CFLAGS.

@chenrui333's issue

This appears to be rust-lang/rust-bindgen#2500. An easy workaround would be to use the pre-built bindgen option (don't enable the buildtime_bindgen feature)

@chenrui333
Copy link

This appears to be rust-lang/rust-bindgen#2500. An easy workaround would be to use the pre-built bindgen option (don't enable the buildtime_bindgen feature)

that might be difficult for us to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants