Building Osimis web viewer 1.2.0 in Linux

Hi all,

I’m trying to manually (no docker) build the viewer on Ubuntu Linux 18.04. When building the backend part using the command I found in this user group:

cmake … -DCMAKE_BUILD_TYPE=Debug -DSTANDALONE_BUILD=ON -DVIEWER_VERSION_FULL=1.2.0

I get the following error:

CMake Error at Resources/CMake/DownloadOrthancFramework.cmake:54 (message):
The variable ORTHANC_FRAMEWORK_VERSION must be set

Setting this variable in shell, e.g. ORTHANC_FRAMEWORK_VERSION=1.4.1, doesn’t help the issue.

Any suggestions?

Thanks!

Hello,

Looking at the following file, the allowed value for “ORTHANC_FRAMEWORK_VERSION” is either “1.3.1”, or “1.3.2”:
https://bitbucket.org/osimis/osimis-webviewer-plugin/src/release-1.2.0/backend/Resources/CMake/DownloadOrthancFramework.cmake

HTH,
Sébastien-

Sebastien, thanks!

I have actually fixed the issue by editing these variables in backend\build\CMakeCache.txt file:

ORTHANC_FRAMEWORK_ROOT:STRING=~/Orthanc/Orthanc-1.4.1
ORTHANC_FRAMEWORK_SOURCE:STRING=path

Now I’m having troubles with the make command; it fails with the following error:

CMakeFiles/WebViewerLibrary.dir/build.make:3158: recipe for target ‘CMakeFiles/WebViewerLibrary.dir/WebViewerLibrary/Image/ImageContainer/RawImageContainer.cpp.o’ failed
make[2]: *** [CMakeFiles/WebViewerLibrary.dir/WebViewerLibrary/Image/ImageContainer/RawImageContainer.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target ‘CMakeFiles/WebViewerLibrary.dir/all’ failed
make[1]: *** [CMakeFiles/WebViewerLibrary.dir/all] Error 2
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2

Any idea what could be happening here?

Also, at this point, I’m ready to try running the viewer with Docker. Could you point me to the right installation instructions? There seems to be many links at different places to different resources. Just to clarify, I’m trying to have Basic Osimis viewer running.

Much appreciated!

If trying to compile the viewer by yourself, I think you should mimic what we’re doing in our CIS:
https://bitbucket.org/osimis/osimis-webviewer-plugin/src/master/backend/Dockerfile.lsb.builder

You can probably repeat all these steps on your own computer.

To enable the Osimis viewer on Docker, simply define the WVB_ENABLED environment variable to true as shown here:
https://osimis.atlassian.net/wiki/spaces/OKB/pages/26738689/How+to+use+osimis+orthanc+Docker+images#Howtouseosimis/orthancDockerimages?-Quickstart

Alain, thank you. Now, when running the cmake command exactly as shown in the file you pointed me to, I get this error:

CMake Error at Resources/CMake/LinuxStandardBaseToolchain.cmake:21 (MESSAGE):

Unable to detect the target processor architecture. Check the LSB_PATH

environment variable.

Call Stack (most recent call first):

/usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:91 (include)

CMakeLists.txt:21 (project)

CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

– Configuring incomplete, errors occurred!

Does this mean I need to install lsb-sdk-5.0.0-3.x86_64.tar.gz file and run all those alien -ick commands as prescribed in the file? Or is there an easier way? :slight_smile:

Alain, thank you. Now, when running the cmake command exactly as shown in the file you pointed me to, I get this error:

CMake Error at Resources/CMake/LinuxStandardBaseToolchain.cmake:21 (MESSAGE):

Unable to detect the target processor architecture. Check the LSB_PATH

environment variable.

Call Stack (most recent call first):

/usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:91 (include)

CMakeLists.txt:21 (project)

CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

– Configuring incomplete, errors occurred!

Does this mean I need to install lsb-sdk-5.0.0-3.x86_64.tar.gz file and run all those alien -ick commands as prescribed in the file? Or is there an easier way? :slight_smile:

Oh yes, sorry, We have archived these steps in our lsb-builder image. That’s why they are commented out in this file.

Actually, you don’t HAVE TO build with LSB. You may also build with standard GCC by using this cmake command:

cmake …/src -DCMAKE_BUILD_TYPE=Release -DVIEWER_VERSION_FULL=$VIEWER_VERSION_FULL -DJS_CLIENT_PATH=/frontend/frontend-build -DORTHANC_FRAMEWORK_ROOT=/orthanc -DORTHANC_FRAMEWORK_SOURCE=path -DUSE_LEGACY_JSONCPP=ON

Alain,

I’ve actually tried this as well. Here’s what I ran given I’m in the backend/build directory:

cmake … -DCMAKE_BUILD_TYPE=Release -DVIEWER_VERSION_FULL=1.2.0 -DJS_CLIENT_PATH=…/…/frontend/frontend-build -DORTHANC_FRAMEWORK_ROOT=…/…/Orthanc-1.4.1 -DORTHANC_FRAMEWORK_SOURCE=path -DUSE_LEGACY_JSONCPP=ON

As you see, VIEWER_VERSION_FULL is set to the version of the viewer I cloned from the repo. Is that ok?

In the end, I get the same error when running make as in my first message:

CMakeFiles/WebViewerLibrary.dir/build.make:3158: recipe for target ‘CMakeFiles/WebViewerLibrary.dir/WebViewerLibrary/Image/ImageContainer/RawImageContainer.cpp.o’ failed
make[2]: *** [CMakeFiles/WebViewerLibrary.dir/WebViewerLibrary/Image/ImageContainer/RawImageContainer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…
CMakeFiles/Makefile2:104: recipe for target ‘CMakeFiles/WebViewerLibrary.dir/all’ failed
make[1]: *** [CMakeFiles/WebViewerLibrary.dir/all] Error 2
Makefile:129: recipe for target ‘all’ failed
make: *** [all] Error 2

Hi Vlad,

I’ve just added a sample Dockerfile that builds the viewer from scratch:
https://bitbucket.org/osimis/osimis-webviewer-plugin/commits/3b68a0d4f11f1e2be5326cdc2d29e3b52bb17c07

You should be able to reproduce that on your machine.

Best regards