kamalasv / orthanc

Automatically exported from code.google.com/p/orthanc
GNU General Public License v3.0
0 stars 0 forks source link

Help with Arch Linux Compile #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello and thanks for orthanc.

All but one dependent packages are present in Arch Linux repositories.
##  Core Repos
zlib lua libpng gtest curl google-glog sqlite jsoncpp
##  AUR Repo (User)
plustache mongoose libiconv dcmtk 

The missing dep is pugixml

What would be the command to dynamic compile all except pugixml?
With all deps installed except pugixml, the following command

cmake -DSTATIC_BUILD:BOOL=OFF -DCMAKE_BUILD_TYPE=Release

generates an error:

"Determining if the function mg_start exists in the mongoose failed."

Is this in conection to systemd? Under Arch, mongoose is launched by 
/usr/lib/systemd/system/mongoose.service

Logs are here:
http://codepad.org/oWM0pPR7

Summary
1.What would be the command to dynamic compile all except pugixml?
2.How to fix the mg_start problem.

best wishes

Original issue reported on code.google.com by no.bicy...@gmail.com on 20 Oct 2014 at 7:11

GoogleCodeExporter commented 9 years ago
Hello,

You should try to compile with the following command:

# cmake -DSTATIC_BUILD:BOOL=OFF -DCMAKE_BUILD_TYPE=Release 
-DUSE_SYSTEM_PUGIXML=OFF -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF

Note that I haven't tested it. Please tell us whether it helps you.

Original comment by s.jodo...@gmail.com on 20 Oct 2014 at 7:28

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion.
The result is:
...
Autodetected path to the DICOM dictionaries: /usr/share/dcmtk
-- Found DCMTK: /usr/include/dcmtk/config  
DCMTK version: 360
-- Looking for C++ include mongoose.h
-- Looking for C++ include mongoose.h - found
-- Looking for mg_start in mongoose
-- Looking for mg_start in mongoose - not found
CMake Error at Resources/CMake/MongooseConfiguration.cmake:73 (message):
  Please install the mongoose-devel package

Logs:
http://codepad.org/LbAVOJu9

Original comment by no.bicy...@gmail.com on 20 Oct 2014 at 2:19

GoogleCodeExporter commented 9 years ago
This log seems to indicate that Arch is not shipped with the right version of 
the Mongoose development library. You should use:

# cmake -DSTATIC_BUILD:BOOL=OFF -DCMAKE_BUILD_TYPE=Release 
-DUSE_SYSTEM_PUGIXML=OFF -DUSE_SYSTEM_MONGOOSE=OFF

Note that Orthanc is not allowed to link against Mongoose above version 3.8, 
because of a change in the licensing policy of Mongoose (Mongoose is now 
licensed under GPLv2, that is incompatible with Orthanc's GPLv3+):
https://groups.google.com/d/msg/mongoose-users/aafbOnHonkI/09MXDIy4ZcoJ

Original comment by s.jodo...@gmail.com on 20 Oct 2014 at 2:24

GoogleCodeExporter commented 9 years ago
Nearly there.

Linking CXX static library libServerLibrary.a
[ 79%] Built target ServerLibrary
Scanning dependencies of target Orthanc
[ 80%] Building CXX object CMakeFiles/Orthanc.dir/OrthancServer/main.cpp.o
Linking CXX executable Orthanc
...
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/libdcmdata.so: 
undefined reference to 
`log4cplus::Logger::addAppender(log4cplus::helpers::SharedObjectPtr<log4cplus::A
ppender>)'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/libdcmdata.so: 
undefined reference to `log4cplus::Logger::getAppender(OFString const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/Orthanc.dir/build.make:161: recipe for target 'Orthanc' failed
make[2]: *** [Orthanc] Error 1

Output from make:
http://codepad.org/xwld9qyL

Original comment by no.bicy...@gmail.com on 20 Oct 2014 at 4:24

GoogleCodeExporter commented 9 years ago
Looks like the same dcmtk packaging problem as in Ubuntu:
https://code.google.com/p/orthanc/source/browse/LinuxCompilation.txt#123

Try this (after clearing your build directory):

# cmake -DSTATIC_BUILD:BOOL=OFF -DCMAKE_BUILD_TYPE=Release 
-DUSE_SYSTEM_PUGIXML=OFF -DUSE_SYSTEM_MONGOOSE=OFF 
"-DDCMTK_LIBRARIES=wrap;oflog" 

Original comment by s.jodo...@gmail.com on 20 Oct 2014 at 4:44

GoogleCodeExporter commented 9 years ago
$ make
[ 50%] Built target CoreLibrary
[ 79%] Built target ServerLibrary
Linking CXX executable Orthanc
/usr/bin/ld: cannot find -lwrap
/usr/bin/ld: cannot find -lwrap

I installed tcp_wrappers package and ran make again:

http://codepad.org/A88r4zij

Original comment by no.bicy...@gmail.com on 21 Oct 2014 at 8:01

GoogleCodeExporter commented 9 years ago
Well, next iteration, as CMake does not seem to properly detect the Lua 
libraries:

# cmake -DSTATIC_BUILD:BOOL=OFF -DCMAKE_BUILD_TYPE=Release 
-DUSE_SYSTEM_PUGIXML:BOOL=OFF -DUSE_SYSTEM_MONGOOSE:BOOL=OFF 
-DUSE_SYSTEM_LUA:BOOL=OFF "-DDCMTK_LIBRARIES=CharLS;dcmjpls;wrap;oflog" 

Original comment by s.jodo...@gmail.com on 21 Oct 2014 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by s.jodo...@gmail.com on 3 Nov 2014 at 2:46

GoogleCodeExporter commented 9 years ago
Any news on this issue? Has the last CMake command solved your problem?

In the absence of answer, I will soon close the issue.

Original comment by s.jodo...@gmail.com on 20 Jan 2015 at 8:35

GoogleCodeExporter commented 9 years ago
No news. I close the issue.

Original comment by s.jodo...@gmail.com on 23 Jan 2015 at 8:32