Thank you for the recent releases. I will given them a try and anxiously waiting for the Explorer 2.0 release. I have an Intel Mac for development and an UBUNTU AMD host for production, but I recently also got an M1 MacBook pro using Docker Desktop. I can build my Docker package on the M1 Mac as is, but the Orthanc containers look like they are ‘emulated’ AMD64.
In the notes for the recent release you have:
“you can use this repo to build linux/arm64 docker images but we are currently not able to build them on our build slaves because, with QEMU emulation, a build would take more than 12 hours which is the limit of github. Simply use ./local-build.sh platform=linux/arm64 to build these images.”
It isn’t clear to me how to do that. Do I need to check-out or download the orthanc-builder from the BitBucket Repo and then build locally on my M1 Mac ?
Yes, these instructions should do it:
brew install jq
brew install hg
git clone https://github.com/orthanc-server/orthanc-builder.git
cd orthanc-builder
./local-build.sh platform=linux/arm64
Note that this currently does not work because of some vcpkg packages not available for ARM64 (but I’m using an old version).
Today, I’m having access to a M1 so I’m trying to fix this … (this might delay Orthanc Explorer 2 BTW:-) )
Alain.
OK. Thanks. That gets me quite a bit further than before. It creates several orthanc-builder-base images (almost 11 GB), but then errors out at the end:
5 29.91 CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:146 (message):
#5 29.91 Command failed: /usr/bin/cmake --build . --config Debug --target install – -v -j9
#5 29.91 Working Directory: /vcpkg/buildtrees/crc32c/arm64-linux-dbg
#5 29.91 See logs for more information:
#5 29.91 /vcpkg/buildtrees/crc32c/install-arm64-linux-dbg-out.log
#5 29.91
#5 29.91 Call Stack (most recent call first):
#5 29.91 scripts/cmake/vcpkg_build_cmake.cmake:104 (vcpkg_execute_build_process)
#5 29.91 scripts/cmake/vcpkg_install_cmake.cmake:44 (vcpkg_build_cmake)
#5 29.91 ports/crc32c/portfile.cmake:20 (vcpkg_install_cmake)
#5 29.91 scripts/ports.cmake:142 (include)
#5 29.91
#5 29.91
#5 29.91 Error: Building package crc32c:arm64-linux failed with: BUILD_FAILED
#5 29.91 Please ensure you’re using the latest portfiles with ./vcpkg update
, then
#5 29.91 submit an issue at https://github.com/Microsoft/vcpkg/issues including:
#5 29.91 Package: crc32c:arm64-linux
#5 29.91 Vcpkg version: 2021-05-05-unknownhash
#5 29.91
#5 29.91 Additionally, attach any relevant sections from the log files above.
#5 ERROR: executor failed running [/bin/sh -c ./vcpkg install google-cloud-cpp]: exit code: 1
Hi,
I have finally been able to build an ARM64 Docker image on the Apple M1 I had today. Full instructions are available here:
https://github.com/orthanc-server/orthanc-builder/blob/master/README.md#building-arm-64-docker-images
building ARM 64 docker images
You can use this repo to build linux/arm64
docker images but we are currently not able to build them on our build slaves because, with QEMU emulation, a build would take more than 12 hours which is the limit of github actions.
Hereunder, you’ll find the full instructions to build ARM64 docker images on MacOS (note: this won’t build Azure & Google object-storage plugins). Note, the StoneViewer build can last very long (multiple hours) because it is using an emulated container to build the WebAssembly code:
brew install jq
brew install hg
git clone [https://github.com/orthanc-server/orthanc-builder.git](https://github.com/orthanc-server/orthanc-builder.git)
cd orthanc-builder
./local-build.sh platform=linux/arm64 skipVcpkg=1
This produces an image osimis/orthanc:current
.
HTH
Alain.
Alain,
Thank you again. I cloned the repo again and am rebuilding again. You must have made some adjustments because it looks like it is almost finished, including the Stone Viewer.
Thanks for the warning. It made it to the StoneViewer Build, but looks like it will take multiple hours. I’ll let you know if it works. I take it I could push the built image to my Docker Hub account when it is finished and just pull it from there in the future until I need to rebuild some new releases ?
/sds