orthanc-wsi fails to build against Orthanc 1.6.0

[  135s] /usr/bin/c++  -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_HAS_FILESYSTEM_V3=1 -DDCMTK_DICTIONARY_DIR=\"/usr/share/dcmtk\" -DDCMTK_USE_EMBEDDED_DICTIONARIES=0 -DDCMTK_VERSION_NUMBER=365 -DHAS_ORTHANC_EXCEPTION=1 -DHAVE_CONFIG_H=1 -DJSONCPP_DEPRECATED_STACK_LIMIT=5000 -DORTHANC_API_VERSION=5 -DORTHANC_DATABASE_VERSION=6 -DORTHANC_DEFAULT_DICOM_ENCODING=Encoding_Latin1 -DORTHANC_ENABLE_BASE64=1 -DORTHANC_ENABLE_CIVETWEB=0 -DORTHANC_ENABLE_CURL=1 -DORTHANC_ENABLE_DCMTK=1 -DORTHANC_ENABLE_DCMTK_JPEG=0 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=0 -DORTHANC_ENABLE_DCMTK_NETWORKING=0 -DORTHANC_ENABLE_DCMTK_TRANSCODING=0 -DORTHANC_ENABLE_JPEG=1 -DORTHANC_ENABLE_LOCALE=1 -DORTHANC_ENABLE_LOGGING=1 -DORTHANC_ENABLE_LOGGING_PLUGIN=0 -DORTHANC_ENABLE_LOGGING_STDIO=0 -DORTHANC_ENABLE_LUA=0 -DORTHANC_ENABLE_MD5=1 -DORTHANC_ENABLE_MONGOOSE=0 -DORTHANC_ENABLE_PKCS11=0 -DORTHANC_ENABLE_PNG=1 -DORTHANC_ENABLE_PUGIXML=0 -DORTHANC_ENABLE_SQLITE=0 -DORTHANC_ENABLE_SSL=1 -DORTHANC_ENABLE_ZLIB=1 -DORTHANC_HAS_EMBEDDED_RESOURCES=1 -DORTHANC_MAXIMUM_TAG_LENGTH=256 -DORTHANC_OPENJPEG_MAJOR_VERSION=2 -DORTHANC_SANDBOXED=0 -DORTHANC_STATIC=0 -DORTHANC_VERSION=\"1.6.0\" -DORTHANC_VERSION_MAJOR=1 -DORTHANC_VERSION_MINOR=6 -DORTHANC_VERSION_REVISION=0 -DORTHANC_WSI_VERSION=\"0.6\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -I/home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/build/AUTOGENERATED -I/usr/src/orthanc/Resources/CMake/../.. -I/usr/include/openjpeg-2.3  -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -DNDEBUG -Wall -Wno-long-long -Wno-variadic-macros -std=gnu++11 -Wno-deprecated-declarations -O2 -g -DNDEBUG   -o CMakeFiles/OrthancWSIDicomizer.dir/Dicomizer.cpp.o -c /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp
[  135s] /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp: In function 'DcmDataset* ParseDataset(const string&)':
[  135s] /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp:257:114: error: no matching function for call to 'Orthanc::FromDcmtkBridge::FromJson(Json::Value&, bool, bool, Orthanc::Encoding)'
[  135s]   257 |   std::auto_ptr<DcmDataset> dataset(Orthanc::FromDcmtkBridge::FromJson(json, true, true, Orthanc::Encoding_Latin1));
[  135s]       |                                                                                                                  ^
[  135s] In file included from /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp:36:
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:220:24: note: candidate: 'static DcmElement* Orthanc::FromDcmtkBridge::FromJson(const Orthanc::DicomTag&, const Json::Value&, bool, Orthanc::Encoding, const string&)'
[  135s]   220 |     static DcmElement* FromJson(const DicomTag& tag,
[  135s]       |                        ^~~~~~~~
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:220:24: note:   candidate expects 5 arguments, 4 provided
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:231:24: note: candidate: 'static DcmDataset* Orthanc::FromDcmtkBridge::FromJson(const Json::Value&, bool, bool, Orthanc::Encoding, const string&)'
[  135s]   231 |     static DcmDataset* FromJson(const Json::Value& json,  // Encoded using UTF-8
[  135s]       |                        ^~~~~~~~
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:231:24: note:   candidate expects 5 arguments, 4 provided
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:240:17: note: candidate: 'static void Orthanc::FromDcmtkBridge::FromJson(Orthanc::DicomMap&, const Json::Value&)'
[  135s]   240 |     static void FromJson(DicomMap& values,
[  135s]       |                 ^~~~~~~~
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:240:17: note:   candidate expects 2 arguments, 4 provided
[  135s] /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp: In function 'void EnrichDataset(DcmDataset&, const OrthancWSI::ITiledPyramid&, OrthancWSI::ImageCompression, const OrthancWSI::DicomizerParameters&, const OrthancWSI::ImagedVolumeParameters&)':
[  135s] /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp:448:62: error: no matching function for call to 'Orthanc::FromDcmtkBridge::FromJson(Orthanc::DicomTag, Json::Value&, bool, Orthanc::Encoding&)'
[  135s]   448 |                                         json, false, encoding));
[  135s]       |                                                              ^
[  135s] In file included from /home/abuild/rpmbuild/BUILD/OrthancWSI-0.6/Applications/Dicomizer.cpp:36:
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:220:24: note: candidate: 'static DcmElement* Orthanc::FromDcmtkBridge::FromJson(const Orthanc::DicomTag&, const Json::Value&, bool, Orthanc::Encoding, const string&)'
[  135s]   220 |     static DcmElement* FromJson(const DicomTag& tag,
[  135s]       |                        ^~~~~~~~
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:220:24: note:   candidate expects 5 arguments, 4 provided
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:231:24: note: candidate: 'static DcmDataset* Orthanc::FromDcmtkBridge::FromJson(const Json::Value&, bool, bool, Orthanc::Encoding, const string&)'
[  135s]   231 |     static DcmDataset* FromJson(const Json::Value& json,  // Encoded using UTF-8
[  135s]       |                        ^~~~~~~~
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:231:24: note:   candidate expects 5 arguments, 4 provided
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:240:17: note: candidate: 'static void Orthanc::FromDcmtkBridge::FromJson(Orthanc::DicomMap&, const Json::Value&)'
[  135s]   240 |     static void FromJson(DicomMap& values,
[  135s]       |                 ^~~~~~~~
[  135s] /usr/src/orthanc/Resources/CMake/../../Core/DicomParsing/FromDcmtkBridge.h:240:17: note:   candidate expects 2 arguments, 4 provided
[  135s] make[2]: *** [CMakeFiles/OrthancWSIDicomizer.dir/build.make:83: CMakeFiles/OrthancWSIDicomizer.dir/Dicomizer.cpp.o] Error 1

Full log at: https://build.open
suse.org/package/live_build_log/home:DocB:Orthanc/orthanc-wsi/openSUSE_Tumbleweed/x86_64

Hello,

Yes, that’s expected: This is an internal source-level dependency, not a link-time dependency.

You should simply stick to Orthanc <= 1.5.8 in the “ThirdPartyDownloads”, as in the Debian package:

https://salsa.debian.org/med-team/orthanc-wsi/-/tree/master/debian

Regards,
Sébastien-

Hi Sebastien,

Yes, that’s expected: This is an internal source-level dependency, not a link-time dependency.

You should simply stick to Orthanc <= 1.5.8 in the “ThirdPartyDownloads”, as in the Debian package:

https://salsa.debian.org/med-team/orthanc-wsi/-/tree/master/debian

No, I would net expect a new release that breaks all plugins (without a patch).
Any plans when WSI gets an update?

No plan on my side, no.

Too bad…so question…if the sources are put into Application/ThirdPartyDownloads, where does Orthanc place the sources afterwards, by default?

If ORTHANC_FRAMEWORK_ROOT is not set, it complains about a non-exisitng directory. It should take the default of the above

Thanks!

push…anyone an idea?

Axel,

Benjamin told me he answered the private mail you sent him.

If you need further instructions from this forum, please post the full CMake command line you are using.

As always, the best source of information about GNU/Linux package is the “rules” file from the official Debian packages. In the “WSI” case:
https://salsa.debian.org/med-team/orthanc-wsi/-/tree/master/debian

Sébastien-

Build is OK.

What I did, to build the plugin (application build uses the exact same flags) :

mkdir -p ViewerPlugin_build
cd ViewerPlugin_build
cmake …/OrthancWSI-0.6/ViewerPlugin
-DALLOW_DOWNLOADS=OFF
-DUSE_SYSTEM_ORTHANC_SDK=ON
-DORTHANC_FRAMEWORK_SOURCE=web
-DBoost_NO_BOOST_CMAKE=ON
-DLIB_INSTALL_DIR=…/installDir
make -j12

Basically, you need to (as usual) fool the build by telling it it will download the archives, but place them beforehand in the expected locations (you knew that)
You place [symlinks to] Orthanc-1.5.2.tar.gz (and openlayers-3.19.0-dist.zip) in Applications/ThirdPartyDownloads and ViewerPlugin/ThirdPartyDownloads.

You cannot use a version more recent than 1.5.2 because the MD5 of a newer archive is not known to the build system of OrthancWSI (that contains a small subset of Orthanc meant to bootstrap the build process by downloading things… it checks the MD5 and obviously doesn’t know the ones of future releases :grin:)

You have to depend on orthanc-devel (I see that you commented it out in the rpmspec file you sent me), but that’s just for the “Orthanc SDK” meant to build plugins and is unrelated to the Orthanc framework (that is in the .tar.gz)

Doing that, everything builds just fine.

Thanks Benjamin and Sebastien,

in the end it was a bit more complicated, as Open Build Service (OBS) is a bit more restricted, due to security certification and traceability requirements.

New spec and everything can be found at https://build.opensuse.org/package/show/home:DocB:Orthanc/orthanc-wsi

Have a good weekend
Axel

Glad to read that, Axel.

It is really strange that supplying the archives to the build system works for the Dicomizer applications and not for the plugin, though. Do you have a clue as to the reason for this difference?

Absolutely not…you are the specialis, I’m the beginner :wink: