-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Use Debian Bookworm as base #67
Comments
@gsora you have to use sysroot for that |
@troian I tried to create a new image derived from your (bullseye) image but copying a sysroot from a newer (bookworm) debian: FROM debian:bookworm as debian-latest
RUN \
set -x; \
echo "Starting image build for Debian" \
&& apt-get update \
&& apt-get install --no-install-recommends -y -q \
wget \
xz-utils \
cmake \
openssl \
autoconf \
automake \
build-essential \
gcc \
g++
FROM ghcr.io/goreleaser/goreleaser-cross:v1.21.5
ENV CGO_ENABLED=1
RUN mkdir -p /sysroot/linux/amd64-latest
COPY --from=debian-latest /lib /sysroot/linux/amd64-latest/lib
COPY --from=debian-latest /lib64 /sysroot/linux/amd64-latest/lib64
COPY --from=debian-latest /usr /sysroot/linux/amd64-latest/usr
COPY --from=debian-latest /bin /sysroot/linux/amd64-latest/bin here's the goreleaser environment I'm using: builds:
- env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/amd64-latest
- PKG_CONFIG_PATH=/sysroot/linux/amd64-latest/usr/local/lib/pkgconfig
- CC=/sysroot/linux/amd64-latest/usr/bin/gcc
- CXX=/sysroot/linux/amd64-latest/usr/bin/g++ still something's off, I need to figure out why
EDIT: the mistake was to use gcc from the other install. As @troian says below, there's no need to install the compiler into the sysroot. is this the general direction you were suggesting? |
My suggestion would be to keep sysroot lets say as git repo and mount it during build process. Also, there is no need to install compiler into sysroot. Tho you can, it's main purpose here to provide libraries and headers. Take a look at https://github.com/goreleaser/goreleaser-cross-example |
@troian the README says several platforms (darwin x86/arm, linux x86, etc) were verified. Can you share the repos used for verification? The example sysroot repo goreleaser/goreleaser-cross-example-sysroot is missing arm Darwin, Windows, etc. Then I could just mount that repo/those repos, correct? EDIT: actually I don't think the sysroot is necessary for Darwin builds; |
Hi!
Due to a third-party dependency, a software I work on needs at least Debian Bookworm to compile correctly (C++ stdlib fails to link otherwise).
Is there a way I could run
goreleaser-cross
on Bookworm?Thanks!
The text was updated successfully, but these errors were encountered: