Closed kimono-koans closed 1 year ago
The issue you seem to be having is musl
uses a different value than glibc
for its setpriority
function (which you have ask "Why?").
FIX/MITIGATION: httm
's pub fn nice_thread
and pub enum PriorityType
in mod crate::library::utility
are actually dead code in the latest version, so you can just remove/comment out both, if you want.
Policy wise, this is a WONTFIX issue (because old compilers, old/different libc
s, etc., I won't support), but I may just excise pub fn nice_thread
, et. al., or comment out to avoid in the future.
Good luck getting it to build! Happy to try to help, but, as indicated, this config is unsupported and I reserve the right to say "Oops, sorry can't help."
The issue you seem to be having is
musl
uses a different value thanglibc
for itssetpriority
function (which you have ask "Why?").FIX/MITIGATION:
httm
'spub fn nice_thread
andpub enum PriorityType
in modcrate::library::utility
are actually dead code in the latest version, so you can just remove/comment out both, if you want.Policy wise, this is a WONTFIX issue (because old compilers, old/different
libc
s, etc., I won't support), but I may just excisepub fn nice_thread
, et. al., or comment out to avoid in the future.Good luck getting it to build! Happy to try to help, but, as indicated, this config is unsupported and I reserve the right to say "Oops, sorry can't help."
Thanks for the explanation and guidance! Fully understand not wanting to support a million build variants.
I commented both nice_thread
and PriorityType
, built it inside a rust:slim-buster container, then copied them to my host and all seems to be working fine.
The image is available on docker hub as prplhaz4/httm:v0.18.2-buster
for anyone looking...
Dockerfile
FROM rust:1-slim-buster as builder
#WORKDIR /usr/src/myapp
COPY ./httm-0.18.2 .
RUN apt update && apt upgrade -y
RUN rustup target add x86_64-unknown-linux-musl
RUN rustup toolchain install stable-x86_64-unknown-linux-musl
#RUN cargo install --git https://github.com/kimono-koans/httm.git --tag "0.18.2" --target x86_64-unknown-linux-musl
RUN cargo install --path . --target x86_64-unknown-linux-musl
FROM debian:buster-slim
RUN apt-get update && apt-get install -y nano && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/httm /usr/local/bin/httm
CMD ["httm"]
#> docker cp httm:/usr/local/bin/httm ./httm
Originally posted by @PrplHaz4 in https://github.com/kimono-koans/httm/issues/17#issuecomment-1355513447