This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new fccd6d607 fix(docker): let the cross linker find libgit2's OpenSSL 
deps (#9292)
fccd6d607 is described below

commit fccd6d60753783a39fe5754dd05f0b3e2363c9c7
Author: AwEi <[email protected]>
AuthorDate: Sun Nov 1 11:27:56 2026 +0800

    fix(docker): let the cross linker find libgit2's OpenSSL deps (#9292)
    
    Since #9288 the server binary links libgit2 directly. When the image is
    cross-built (amd64 runner, arm64 target), ld must resolve libgit2's own
    dependencies (libssl, libcrypto) but only searches the build host's
    paths, so the link fails with undefined OPENSSL_3.0.0 symbols.
    
    Point ld at the target rootfs with -rpath-link. It only affects link
    time; nothing is embedded in the binary.
---
 backend/Dockerfile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/backend/Dockerfile b/backend/Dockerfile
index 2c31a3d53..877a1ac7b 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -97,11 +97,13 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
     if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
         ln -s /usr/local/deps/aarch64 /usr/local/deps/target && \
         export CC=aarch64-linux-gnu-gcc && \
-        export GOARCH=arm64 ; \
+        export GOARCH=arm64 && \
+        export 
CGO_LDFLAGS="-Wl,-rpath-link,/rootfs-arm64/usr/lib/aarch64-linux-gnu 
-Wl,-rpath-link,/rootfs-arm64/lib/aarch64-linux-gnu" ; \
     else \
         ln -s /usr/local/deps/x86_64 /usr/local/deps/target && \
         export CC=x86_64-linux-gnu-gcc && \
-        export GOARCH=amd64 ; \
+        export GOARCH=amd64 && \
+        export 
CGO_LDFLAGS="-Wl,-rpath-link,/rootfs-amd64/usr/lib/x86_64-linux-gnu 
-Wl,-rpath-link,/rootfs-amd64/lib/x86_64-linux-gnu" ; \
     fi && \
     export PKG_CONFIG_PATH=/usr/local/deps/target/lib/pkgconfig && \
     export CGO_ENABLED=1 &&\

Reply via email to