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

Error when building memchr with custom rustflags -static #97

Closed
AsafFisher opened this issue Nov 10, 2021 · 2 comments
Closed

Error when building memchr with custom rustflags -static #97

AsafFisher opened this issue Nov 10, 2021 · 2 comments
Labels

Comments

@AsafFisher
Copy link

AsafFisher commented Nov 10, 2021

error: failed to run custom build command for `memchr v2.4.1`

Caused by:
  could not execute process `/mnt/c/Users/asaff/Documents/Dev/Github/tool/target/debug/build/memchr-b9330b1f01949571/build-script-build` (never executed)

Caused by:
  No such file or directory (os error 2)

config:

[build]
rustflags = ["-C", "link-arg=-nostdlib", "-C", "link-arg=-static", "-C", "relocation-model=pic"]

When compiling only with link-arg=-nostdlib I get the follwoing crash:

error: failed to run custom build command for `memchr v2.4.1`

Caused by:
  process didn't exit successfully: `/mnt/c/Users/asaff/Documents/Dev/Github/tool/target/debug/build/memchr-b9330b1f01949571/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: build failed
@AsafFisher AsafFisher changed the title Error when building memchr with custom rustflags Error when building memchr with custom rustflags -static Nov 10, 2021
@BurntSushi
Copy link
Owner

This doesn't look like an issue with memchr specifically? I don't really know what you're doing, nor do I understand the flags you're passing, so I think you're on your own. But like, it's not clear to me that this isn't an environment issue or a rustc issue. If there's a fix that you find that can be applied to memchr, then we can consider that.

@BurntSushi
Copy link
Owner

Closing due to inactivity. And it's not clear that this is a problem with memchr specifically. (It probably isn't.)

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

No branches or pull requests

2 participants