Open EKTehtris opened 2 years ago
It seems cargo is what's crashing? That's not a very useful stack either, it'd be nice if there were debug symbols.
It seems cargo is what's crashing? That's not a very useful stack either, it'd be nice if there were debug symbols.
I don't know why the symbols are not shipped for musl target, they should be as per https://github.com/rust-lang/rust/pull/90733
Could you re-try after doing
$ export RUSTFLAGS=-Ctarget-feature=-crt-static
?
This does work but I would get lot of poisoned instance on my tests (even with -- --test-threads=1
.
Could you re-try after doing
$ export RUSTFLAGS=-Ctarget-feature=-crt-static
?
My "solution" to this is to replace the symlink from rustc
to /usr/bin/rustup-init
with this:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
static char *rustc = "rustc";
static char *fix_linking = "-Ctarget-feature=-crt-static";
char **args = calloc(sizeof(char *), argc + 1);
if (!args) {
puts("calloc() failed");
return EXIT_FAILURE;
}
args[0] = rustc;
args[1] = fix_linking;
int pos = 1;
while (argv[pos] != NULL) {
args[pos + 1] = argv[pos];
pos++;
}
int retval = execv("/usr/bin/rustup-init", args);
printf("execv() failed with: %d\n", retval);
return EXIT_FAILURE;
}
I have the same issue and the above RUSTFLAGS
doesn't fix it for me.
I tried installing bindgen-cli
to see if that would work and it does, so now I'm confused.
I guess at worst I can invoke it instead of using the library directly...
EDIT: I now realized that when ran without actually analyzing headers, the application doesn't attempt to open the shared library, thus no error seem to occur, but once used to actually analyze headers the library fails to link dynamically
When building bindgen with clang static and gcc 11.2, it will fail with sigsev invalid memory reference, this is a conflict with clang-sys likely and newer gcc.
Error
What was run
Note : I had to remove the default-features because features are not exclusive in that setup so adding static will conflict with runtime
Setup
How to reproduce
Install alpine 3.16 64bits (you can also use docker:
docker run -it --rm alpine:3.16 sh
)Then follow the previous paragraph (What was run)
Other information
commit tested : 9c32b460481903d90c6ac5df277bfa853a0558d8
Tested back until ^0.50, confirmed still a bug and related to new g++
GDB