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

NetBSD build failure #78

Closed
0-wiz-0 opened this issue May 5, 2022 · 1 comment
Closed

NetBSD build failure #78

0-wiz-0 opened this issue May 5, 2022 · 1 comment

Comments

@0-wiz-0
Copy link

0-wiz-0 commented May 5, 2022

The build of d5bfccf from the git checkout fails on NetBSD:

mimalloc_rust> cargo build
    Updating crates.io index
   Compiling cc v1.0.73
   Compiling libmimalloc-sys v0.1.25 (.../mimalloc_rust/libmimalloc-sys)
The following warnings were emitted during compilation:

warning: cc: error: c_src/mimalloc/src/static.c: No such file or directory
warning: cc: fatal error: no input files
warning: compilation terminated.

error: failed to run custom build command for `libmimalloc-sys v0.1.25 (.../mimalloc_rust/libmimalloc-sys)`

Caused by:
  process didn't exit successfully: `.../mimalloc_rust/target/debug/build/libmimalloc-sys-e59021f0191df012/build-script-build` (exit status: 1)
  --- stdout
  OPT_LEVEL = Some("0")
  TARGET = Some("x86_64-unknown-netbsd")
  HOST = Some("x86_64-unknown-netbsd")
  CC_x86_64-unknown-netbsd = None
  CC_x86_64_unknown_netbsd = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-netbsd = None
  CFLAGS_x86_64_unknown_netbsd = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  CC_x86_64-unknown-netbsd = None
  CC_x86_64_unknown_netbsd = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-netbsd = None
  CFLAGS_x86_64_unknown_netbsd = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_SECURE=4" "-DMI_DEBUG=0" "-o" ".../mimalloc_rust/target/debug/build/libmimalloc-sys-e908aa27d8713004/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c"
  cargo:warning=cc: error: c_src/mimalloc/src/static.c: No such file or directory
  cargo:warning=cc: fatal error: no input files
  cargo:warning=compilation terminated.
  exit status: 1

  --- stderr


  error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_SECURE=4" "-DMI_DEBUG=0" "-o" ".../mimalloc_rust/target/debug/build/libmimalloc-sys-e908aa27d8713004/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c" with args "cc" did not execute successfully (status code exit status: 1).


I tried building libmimalloc (the C source, from https://github.com/ErnyTech/libmimalloc-sys.git, git commit 1d89dc49dcd0a081d631b12fa423382f29343781, and this worked fine, including the tests:

Running tests...
Test project /archive/foreign/libmimalloc-sys/build
    Start 1: test_api,
1/2 Test #1: test_api, ........................   Passed    0.00 sec
    Start 2: test_stress,
2/2 Test #2: test_stress, .....................   Passed    2.22 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   2.23 sec

so I suspect something is wrong in how this code is included in the crate.

@0-wiz-0 0-wiz-0 changed the title NetBSDBuild NetBSD build failure May 5, 2022
@0-wiz-0
Copy link
Author

0-wiz-0 commented May 5, 2022

Oops. PEBKAC, I didn't do the 'git submodule'

@0-wiz-0 0-wiz-0 closed this as completed May 5, 2022
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

1 participant