Orthanc-webviewer fails to build for Tumbleweed

Hi,
in our rolling release we see a build error in he webviewer-plugin:

[   21s] /var/lib/build/ccache/bin/c++ -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_HAS_FILESYSTEM_V3=1 -DHAS_ORTHANC_EXCEPTION=1 -DJSONCPP_DEPRECATED_STACK_LIMIT=5000 -DORTHANC_API_VERSION=24 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0 -DORTHANC_DATABASE_VERSION=6 -DORTHANC_DEFAULT_DICOM_ENCODING=Encoding_Latin1 -DORTHANC_ENABLE_BASE64=1 -DORTHANC_ENABLE_CIVETWEB=0 -DORTHANC_ENABLE_CURL=0 -DORTHANC_ENABLE_DCMTK=0 -DORTHANC_ENABLE_DCMTK_JPEG=0 -DORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS=0 -DORTHANC_ENABLE_DCMTK_NETWORKING=0 -DORTHANC_ENABLE_DCMTK_TRANSCODING=0 -DORTHANC_ENABLE_JPEG=0 -DORTHANC_ENABLE_LOCALE=0 -DORTHANC_ENABLE_LOGGING=1 -DORTHANC_ENABLE_LOGGING_STDIO=0 -DORTHANC_ENABLE_LUA=0 -DORTHANC_ENABLE_MD5=1 -DORTHANC_ENABLE_MONGOOSE=0 -DORTHANC_ENABLE_PKCS11=0 -DORTHANC_ENABLE_PNG=0 -DORTHANC_ENABLE_PROTOBUF=0 -DORTHANC_ENABLE_PUGIXML=0 -DORTHANC_ENABLE_SQLITE=1 -DORTHANC_ENABLE_SSL=0 -DORTHANC_ENABLE_ZLIB=0 -DORTHANC_MAXIMUM_TAG_LENGTH=256 -DORTHANC_PLUGIN_VERSION=\"2.8\" -DORTHANC_SANDBOXED=0 -DORTHANC_SQLITE_VERSION=3046000 -DORTHANC_STANDALONE=1 -DORTHANC_VERSION=\"1.12.4\" -DORTHANC_VERSION_MAJOR=1 -DORTHANC_VERSION_MINOR=12 -DORTHANC_VERSION_REVISION=4 -DOrthancWebViewer_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -I/home/abuild/rpmbuild/BUILD/OrthancWebViewer-2.8/build/AUTOGENERATED -I/usr/src/orthanc/OrthancFramework/Sources -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -Wall -Wno-long-long -Wno-variadic-macros -O2 -g -DNDEBUG -fPIC -MD -MT CMakeFiles/OrthancWebViewer.dir/Plugin/Cache/CacheManager.cpp.o -MF CMakeFiles/OrthancWebViewer.dir/Plugin/Cache/CacheManager.cpp.o.d -o CMakeFiles/OrthancWebViewer.dir/Plugin/Cache/CacheManager.cpp.o -c /home/abuild/rpmbuild/BUILD/OrthancWebViewer-2.8/Plugin/Cache/CacheManager.cpp
[   21s] In file included from /home/abuild/rpmbuild/BUILD/OrthancWebViewer-2.8/Plugin/Cache/CacheManager.h:26,
[   21s]                  from /home/abuild/rpmbuild/BUILD/OrthancWebViewer-2.8/Plugin/Cache/CacheManager.cpp:23:
[   21s] /usr/src/orthanc/OrthancFramework/Sources/SQLite/Connection.h:54:6: warning: #warning Warning: Macro __ORTHANC_FILE__ is not defined, this will leak the full path of the source files in the binaries [-Wcpp]
[   21s]    54 | #    warning Warning: Macro __ORTHANC_FILE__ is not defined, this will leak the full path of the source files in the binaries
[   21s]       |      ^~~~~~~
[   21s] /home/abuild/rpmbuild/BUILD/OrthancWebViewer-2.8/Plugin/Cache/CacheManager.h:58:19: error: ‘std::list’ has not been declared
[   21s]    58 |                   std::list<std::string>& toRemove,
[   21s]       |                   ^~~

For the full log, see

https://build.opensuse.org/package/live_build_log/home:DocB:Orthanc/orthanc-webviewer/openSUSE_Tumbleweed/x86_64

Cheers
Axel

Maybe you can try this patch (to be applied to the contents of OrthancWebViewer-2.8). Indeed it seems the header relied on definitions made elsewhere instead of defining them explicitly.

Assuming the patch is saved to orthanc-webviewer_OrthancWebViewer-2.8-fix2024061101.patch, you can apply it with hg import orthanc-webviewer_OrthancWebViewer-2.8-fix2024061101.patch

diff -r af985076f647 Plugin/Cache/CacheManager.h
--- a/Plugin/Cache/CacheManager.h	Tue Feb 22 08:33:59 2022 +0100
+++ b/Plugin/Cache/CacheManager.h	Tue Jun 11 09:09:24 2024 +0200
@@ -29,6 +29,9 @@
 
 #include <boost/shared_ptr.hpp>
 
+#include <map>
+#include <list>
+
 namespace OrthancPlugins
 {
   enum CacheProperty

Thank you Benjamin, that fixed it!

1 Like

Hello,

FYI, this has been committed to the mainline: orthanc-webviewer: 705be6d59d9b

Best,
Sébastien-

1 Like