Orthanc 1.5.1 - Compilation error

Hello,

we started building Orthanc on openSUSE Build Service, making use of civetweb instead of mongoose (cmake option -DENABLE_CIVETWEB=ON )

During compilation I get an error:

[   86s] /home/abuild/rpmbuild/BUILD/Orthanc-1.5.1/Core/HttpServer/MongooseServer.cpp: In function 'void Orthanc::InternalCallback(Orthanc::HttpOutput&, Orthanc::HttpMethod&, Orthanc::MongooseServer&, mg_connection*, const mg_request_info*)':
[   86s] /home/abuild/rpmbuild/BUILD/Orthanc-1.5.1/Core/HttpServer/MongooseServer.cpp:683:47: error: 'const struct mg_request_info' has no member named 'uri'
[   86s]        if (!filter->IsAllowed(method, request->uri, remoteIp,
[   86s]                                                ^~~
[   87s] /home/abuild/rpmbuild/BUILD/Orthanc-1.5.1/Core/HttpServer/MongooseServer.cpp:747:49: error: 'const struct mg_request_info' has no member named 'uri'
[   87s]        Toolbox::SplitUriComponents(uri, request->uri);
[   87s]                                                  ^~~
[   87s] /home/abuild/rpmbuild/BUILD/Orthanc-1.5.1/Core/HttpServer/MongooseServer.cpp: In function 'void Orthanc::ProtectedCallback(mg_connection*, const mg_request_info*)':
[   87s] /home/abuild/rpmbuild/BUILD/Orthanc-1.5.1/Core/HttpServer/MongooseServer.cpp:849:81: error: 'const struct mg_request_info' has no member named 'uri'
[   87s]              server->GetExceptionFormatter()->Format(output, e, method, request->uri);
[   87s]                                                                                  ^~~

Can anyone comment on this? Is this due to use of civetweb?

Thanks
Axel

Dear Axel,

Thanks for your work on openSUSE!

I have just implemented a patch for compatibility with civetweb 1.11 in the Orthanc mainline (check out the modifications in file "Core/HttpServer/MongooseServer.cpp):
https://bitbucket.org/sjodogne/orthanc/commits/ad37c21ec4db20fe2a61202a755332d0134c740a

The same patch can be used on Orthanc 1.5.1.

HTH,
Sébastien-

Hello Sebastien,

thanks for the patch, that helped!

After adding some more devel-packages to the build environment, I ran into the following error:

[  126s] /usr/bin/c++  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -Wall -Wno-long-long -Wno-variadic-macros -std=c++11 -Wno-deprecated-declarations -O3 -DNDEBUG  -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -Wl,--as-needed CMakeFiles/Orthanc.dir/OrthancServer/main.cpp.o  -o Orthanc -lpthread -lrt -ldl -lsqlite3 -lssl -lcrypto -lcurl -lcivetweb -ljpeg -lz -lpng -lz -llua5.1 -lm -lpugixml -ljsoncpp -luuid -lboost_locale -lboost_filesystem -lboost_thread -lboost_system -lboost_date_time -lboost_regex -lboost_chrono libServerLibrary.a libCoreLibrary.a /usr/lib64/libi2d.so.3.6.2 /usr/lib64/libdcmjpeg.so.3.6.2 /usr/lib64/libijg8.so.3.6.2 /usr/lib64/libijg12.so.3.6.2 /usr/lib64/libijg16.so.3.6.2 /usr/lib64/libdcmjpls.so.3.6.2 /usr/lib64/libcharls.so.3.6.2 /usr/lib64/libcmr.so.3.6.2 /usr/lib64/libdcmwlm.so.3.6.2 /usr/lib64/libdcmpstat.so.3.6.2 /usr/lib64/libdcmrt.so.3.6.2 /usr/lib64/libdcmseg.so.3.6.2 /usr/lib64/libdcmtract.so.3.6.2 /usr/lib64/libdcmpmap.so.3.6.2 -lCharLS -lrt -ldl -lsqlite3 -lcurl -lcivetweb -llua5.1 -lm -lpugixml -ljsoncpp -luuid -lboost_locale -lboost_filesystem -lboost_thread -lboost_system -lboost_date_time -lboost_regex -lboost_chrono /usr/lib64/libdcmtls.so.3.6.2 /usr/lib64/libdcmsr.so.3.6.2 /usr/lib64/libdcmimage.so.3.6.2 -ltiff -ljpeg -lpng -lxml2 /usr/lib64/libdcmdsig.so.3.6.2 -lssl -lcrypto /usr/lib64/libdcmqrdb.so.3.6.2 /usr/lib64/libdcmnet.so.3.6.2 -lwrap /usr/lib64/libdcmimgle.so.3.6.2 /usr/lib64/libdcmfg.so.3.6.2 /usr/lib64/libdcmiod.so.3.6.2 /usr/lib64/libdcmdata.so.3.6.2 -lz /usr/lib64/liboflog.so.3.6.2 /usr/lib64/libofstd.so.3.6.2 -lpthread 
[  126s] /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lCharLS

I could not find anything about lCharLS , do you have an idea?

Thanks
Axel

This is a consequence of the “-DDCMTK_LIBRARIES=CharLS” option to CMake I see in the following spec file:
https://build.opensuse.org/package/view_file/home:DocB:Orthanc/orthanc/orthanc.spec

This line is needed in Fedora because of the DCMTK package, but maybe not in openSUSE. Could you give a try simply removing it?

Sébastien-

Happy new year, Sebastien!

This is a consequence of the “-DDCMTK_LIBRARIES=CharLS” option to CMake I see in the following spec file:
https://build.opensuse.org/package/view_file/home:DocB:Orthanc/orthanc/orthanc.spec

This line is needed in Fedora because of the DCMTK package, but maybe not in openSUSE. Could you give a try simply removing it?

I thought I had checked the spec file, obviously not good enough.

After removing this and some other changes I got now a first version building. Now testing can start :slight_smile:
For anyone interested in helping to test, packages can be downloaded here:

https://download.opensuse.org/repositories/home:/DocB:/Orthanc/openSUSE_Leap_15.0

The first issue I came around after installation was the error message
Jan 03 17:54:39 linux-q6gm Orthanc[17052]: E: DcmDataDictionary: Cannot open file: /usr/share/dcmtk/dicom.dic
The file is not in the source tarball, correct?
Where can I get it from?

Thanks
Axel

Happy new year too, Axel!

Awesome! This is so great to read that Orthanc is almost ported to openSUSE :slight_smile:

From what I see in the build logs, the unit tests properly locate the “/usr/share/dcmtk/dicom.dic” [1]:

[ 245s] W0103 14:23:45.418989 FromDcmtkBridge.cpp:144] Loading the external DICOM dictionary “/usr/share/dcmtk/dicom.dic”
[ 245s] W0103 14:23:45.431311 FromDcmtkBridge.cpp:144] Loading the external DICOM dictionary “/usr/share/dcmtk/private.dic”

These files are apparently part of the “dcmtk” package, which is visibly not installed once you run Orthanc. Please could give a try replacing the following line in the specfile:

BuildRequires: dcmtk

by:

Requires: dcmtk

Thanks again for all this great work!
Sébastien-

[1] https://build.opensuse.org/public/build/home:DocB:Orthanc/openSUSE_Leap_15.0/x86_64/orthanc/_log

Hey Sebastien,

From what I see in the build logs, the unit tests properly locate the “/usr/share/dcmtk/dicom.dic” [1]:

[ 245s] W0103 14:23:45.418989 FromDcmtkBridge.cpp:144] Loading the external DICOM dictionary “/usr/share/dcmtk/dicom.dic”
[ 245s] W0103 14:23:45.431311 FromDcmtkBridge.cpp:144] Loading the external DICOM dictionary “/usr/share/dcmtk/private.dic”

These files are apparently part of the “dcmtk” package, which is visibly not installed once you run Orthanc. Please could give a try replacing the following line in the specfile:

BuildRequires: dcmtk

by:

Requires: dcmtk

Yes, that did the trick, thanks! Orthanc is now up and running, and I get the Query page on the Webbroser.
Some small issues regarding the documentation need to be fixed (links in file:///usr/share/doc/packages/Orthanc/index.html do not work)

Is there some demo data available that can be used for testing?
Thanks for your support!
Axel

Hi Axel,

This is great news!

There is a small set of sample images on our demo server, which has the advantage of running 100% free software:
http://demo.orthanc-server.com/

The largest database of open-access DICOM images is most probably TCIA (The Cancer Imaging Archive), that literally contains thousands of imaging studies:
https://www.cancerimagingarchive.net/nbia-search/

Search for “CR” or “DX” image modality: They should be typical 2D images. Unfortunately, downloading from TCIA requires installing the closed-source “NBIA Data Retriever”, and I’m not sure whether their RPM binaries are compatible with openSUSE.

Finally, a query regarding “sample DICOM images” on your favorite Web search engine will lead to many results. Here are 3 starting points:

http://gdcm.sourceforge.net/wiki/index.php/Sample_DataSet
ftp://medical.nema.org/MEDICAL/Dicom/
https://www.dclunie.com/ (section “images”)

HTH,
Sébastien-

Hey Sebastiene,

One last thing…for the moment: I had a look at https://koji.fedoraproject.org/koji/buildinfo?buildID=1146108 and found in the orthanc.doc package, that the index.html files are missing in all subdirectories. So the documentation is not really working…any plan to fix this?

To be fair, my work is currently entirely dedicated to the upstream project. As far as Linux packaging is concerned, given our limited resources, I have made the choice to only focus on providing cutting-edge Debian unstable packages. This implies I don’t have plan to work on improving the Fedora package by myself in the mid-term.

Please would you kindly report an issue on the Fedora bug tracker regarding the broken documentation?

In the same line of ideas, it would also be important to package at least the Orthanc Web viewer for Fedora/openSUSE (Orthanc - DICOM Server). I am looking forward to find a maintainer for Fedora: Any volunteer is welcome.

Regards,
Sébastien-

One last thing…for the moment: I had a look at https://koji.fedoraproject.org/koji/buildinfo?buildID=1146108 and found in the orthanc.doc package, that the index.html files are missing in all subdirectories. So the documentation is not really working…any plan to fix this?

To be fair, my work is currently entirely dedicated to the upstream project. As far as Linux packaging is concerned, given our limited resources, I have made the choice to only focus on providing cutting-edge Debian unstable packages. This implies I don’t have plan to work on improving the Fedora package by myself in the mid-term.

OK, I will have a look into these packages

Please would you kindly report an issue on the Fedora bug tracker regarding the broken documentation.

Will do :slight_smile:

In the same line of ideas, it would also be important to package at least the Orthanc Web viewer for Fedora/openSUSE (https://www.orthanc-server.com/static.php?page=web-viewer). I am looking forward to find a maintainer for Fedora: Any volunteer is welcome.

Plugins was the next thing I wanted to look into. Thanks for the guidance on which one to start!
Cheers
Axel

Great, thanks again for your contributions!