You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cuprate: init branch (last commit is ed822eb as of testing this)
Bug
When building for musl, rust will default to make the executable static.
Or at least try to here, (according to ldd it is not fully static, but it lack a .INTERP header, so buggy stuff).
running the static cuprated will result in a basicaly instant segfault.
While building with RUSTFLAGS="-Ctarget-feature=-crt-static" (which actively tell rust to not build the target as static) will make the executable work.
Expected behavior
There are case where building fully static is not possible, this is to be researched here. If that the case here, make so cargo build use the appropriate feature to disable static build.
Imo the best case is being able to build a full static executable, as it would make distributing the executable even easier (it can run anywhere :D)
Also, at least according to the backrace, it appear to be linked to randomx (?), or I was able to build and run fully static benchmark ,codegen and test randomx executable.
messing around with https://github.com/Cuprate/randomx-rs 's build.rs, in particular just trying to static link stdc++ for the case linux, I was able to make cuprated fully static run. And confirmed I was able to run it on a glibc distro after moving what I built on it.
I just have to make proper check to only link stdc++ statically for the case musl (as its harcoded for my tests) and I could make a pr.
Environment
Bug
When building for musl, rust will default to make the executable static.
Or at least try to here, (according to ldd it is not fully static, but it lack a .INTERP header, so buggy stuff).
running the static cuprated will result in a basicaly instant segfault.
While building with
RUSTFLAGS="-Ctarget-feature=-crt-static"
(which actively tell rust to not build the target as static) will make the executable work.Expected behavior
There are case where building fully static is not possible, this is to be researched here. If that the case here, make so cargo build use the appropriate feature to disable static build.
Imo the best case is being able to build a full static executable, as it would make distributing the executable even easier (it can run anywhere :D)
Also, at least according to the backrace, it appear to be linked to randomx (?), or I was able to build and run fully static benchmark ,codegen and test randomx executable.
Steps to reproduce
Log
backtrace on said core give
The text was updated successfully, but these errors were encountered: