incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Bug][backend] Can't build docker image

Open Tonkonozhenko opened this issue 11 months ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

Trying to build the backend image on MacBook M1

What do you expect to happen

Image is built

How to reproduce

Commands:

git checkout v0.21.0-beta7
cd backend
# add flag  `--platform linux/x86_64` or ` --platform linux/amd64` to make task `build-server-image`
IMAGE_REPO=xxx TAG=v0.21.7-beta7-p1 make build-server-image

Error:

#32 22.98 [ 31%] Linking C shared library ../libgit2.so
#32 22.98 [ 32%] Generating clar.suite
#32 23.04 /usr/lib/gcc-cross/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/bin/ld: /rootfs-amd64/usr/lib/x86_64-linux-gnu/libz.a(zutil.o): warning: relocation against `z_errmsg' in read-only section `.text'
#32 23.06 /usr/lib/gcc-cross/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/bin/ld: /rootfs-amd64/usr/lib/x86_64-linux-gnu/libz.a(deflate.o): relocation R_X86_64_PC32 against symbol `z_errmsg' can not be used when making a shared object; recompile with -fPIC
#32 23.06 /usr/lib/gcc-cross/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/bin/ld: final link failed: bad value
#32 23.06 collect2: error: ld returned 1 exit status
#32 23.07 make[2]: *** [src/CMakeFiles/git2.dir/build.make:476: libgit2.so.1.3.2] Error 1
#32 23.07 make[1]: *** [CMakeFiles/Makefile2:201: src/CMakeFiles/git2.dir/all] Error 2

Anything else

No response

Version

v0.21.0-beta7

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

Tonkonozhenko avatar Mar 12 '24 12:03 Tonkonozhenko