Error compiling orthanc-ohif

Hey,
I’m currently packaging the new plugin for openSUSE (Tumbleweed - Factory first) and run into the following error:

[ 8s] -- Build files have been written to: /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build [ 8s] + /usr/bin/make -O VERBOSE=1 -j12 -j12 [ 8s] /usr/bin/cmake -S/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0 -B/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build --check-build-system CMakeFiles/Makefile.cmake 0 [ 8s] /usr/bin/cmake -E cmake_progress_start /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build/CMakeFiles /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build//CMakeFiles/progress.marks [ 8s] /usr/bin/make -f CMakeFiles/Makefile2 all [ 8s] /usr/bin/make -f CMakeFiles/AutogeneratedTarget.dir/build.make CMakeFiles/AutogeneratedTarget.dir/depend [ 8s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build' [ 8s] cd /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0 /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0 /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build/CMakeFiles/AutogeneratedTarget.dir/DependInfo.cmake [ 8s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build' [ 8s] /usr/bin/make -f CMakeFiles/AutogeneratedTarget.dir/build.make CMakeFiles/AutogeneratedTarget.dir/build [ 8s] make[2]: *** No rule to make target '/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/OHIF/dist', needed by 'AUTOGENERATED/StaticAssets.cpp'. Stop. [ 8s] make[2]: *** Waiting for unfinished jobs.... [ 8s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build' [ 8s] [ 1%] Generating AUTOGENERATED/EmbeddedResources.h, AUTOGENERATED/EmbeddedResources.cpp [ 8s] /usr/bin/python3.11 /usr/src/orthanc/OrthancFramework/Resources/CMake/../EmbedResources.py /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build/AUTOGENERATED/EmbeddedResources APP_CONFIG_SYSTEM /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/Sources/app-config-system.js APP_CONFIG_USER /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/Sources/app-config-user.js ORTHANC_EXPLORER /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/Sources/OrthancExplorer.js [ 8s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/build' [ 8s] make[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/AutogeneratedTarget.dir/all] Error 2 [ 8s] make: *** [Makefile:139: all] Error 2 [ 8s] error: Bad exit status from /var/tmp/rpm-tmp.XSS8D0 (%build)

The issue is probably in
make[2]: *** No rule to make target ‘/home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/OHIF/dist’, needed by ‘AUTOGENERATED/StaticAssets.cpp’. Stop.

Are there additional compiler options or something needed?

Thanks!

Hi,

Thanks for your work on packaging this new plugin! The build instructions can be found in the Orthanc Book. You have visibly not run the ../Resources/CreateOHIFDist.sh script.

Kind Regards,
Sébastien-

Ah, missed that, sorry.
So, downloading the viewer file in advance, and the the script tries to build a container, correct?

[ 9s] + cd /home/abuild/rpmbuild/BUILD/OrthancOHIF-1.0/Resources/…/Resources/CreateOHIFDist
[ 9s] + docker build --no-cache -t orthanc-ohif-node .
[ 9s] DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
[ 9s] Install the buildx component to build images with BuildKit:
[ 9s] Docker Build architecture | Docker Documentation

Not sure how that works in Buildservice. Need to investigate…

Yes, the Resources/CreateOHIFDist.sh script will download file https://orthanc.uclouvain.be/third-party-downloads/OHIF/Viewers-3.6.0.tar.gz, which corresponds to tag 3.6.0 of OHIF, and will store it as OHIF/Viewers-3.6.0.tar.gz.

If the file OHIF/Viewers-3.6.0.tar.gz is already present, it will not be downloaded again.

Yes, I noticed that from the script and placed the download in OHIF folder.
If I interpret the script right it builds a container and runs it afterwards.

2 things come into my mind:

  • why not using a compiled version of the OHIF viewer (.deb/.rpm)?
  • why not using an existing container with OHF viewer?

To answer your two questions:

  • The OHIF plugin recompiles the static assets of OHIF for a fully reproducible build.
  • We don’t use an existing container, as the goal is precisely to provide a shared library (DLL or .so) that can even run on “standard” computers without Docker.

Thank you for your support.
OHIF and VolView plugin will show up in the next snapshot of openSUSE Tumbleweed (and a bit later in Leap 15.5 as well)

1 Like