Are you sure that you have installed the “build-essential” package from the Ubuntu distribution?
Could you also send the content of the “CMakeFiles/CMakeError.log” and “CMakeFiles/CMakeOutput.log” files that should be present inside your build directory? They should give information about the missing dependency.
I can confirm that I had a similar issue. It is a weird problem with
some Ubuntu/Debian packages. I observed it on minimal Ubuntu 12.04 and
Debian systems (both 64 and 32-bit). On the full Ubuntu desktop the
problem was resolved by simply installing the uuid-dev package.
The confusing part is that the cmake file checks for
CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
the uuid.h header file (I think it includes it in a source file and
tries to compile it), and it fails. However, when the same procedure
of including the uuid.h is done manually on a test file, it compiles
and works. The uuid-dev package and the header files are in the
correct directory.
There must be some other package that interacts with the build
process, or some environment setting. Any ideas what could be causing
it?
peter
P.S.: Sorry Sebastien, I mistakenly sent it as a reply to you, instead
of the group
The confusing part is that the cmake file checks for
CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
the uuid.h header file (I think it includes it in a source file and
tries to compile it), and it fails. However, when the same procedure
of including the uuid.h is done manually on a test file, it compiles
and works. The uuid-dev package and the header files are in the
correct directory.
There must be some other package that interacts with the build
process, or some environment setting. Any ideas what could be causing
it?
Thanks for the update! I do not think that it is related to environment variables, as the Orthanc CMake script a priori uses none of them. I would rather suspect a missing package, perhaps an incomplete gcc installation.
The solution would probably consist in first checking that “build-essential” is installed, then in installing all the dependencies from the official package one by one, until finding the missing package:
Make sure your configuration file (if any) is well-formatted: Just try
to start Orthanc without any configuration file.
Where can I find the configuration file? I'm a little bit confused with
the folders. The only executable Orthanc is in the folder orthancbuild.
But there is no systemwide Orthanc, "which Orthanc" gives no result - a
path problem?
If this does not help, maybe you have moved the Orthanc binary from the
build directory to another place in your filesystem (e.g. "/usr/bin").
If this is the case, you have to compile Orthanc with the
STANDALONE_BUILD option:
# cmake -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug
Runs but gives the same error.
# gdb --args ./Orthanc --verbose
=> enter "catch t", then "run", and finally "bt" when the exception
occurs to inspect the stack.
gives:
Reading symbols from /home/sistemas/orthancbuild/Orthanc...(no debugging
symbols found)...done.
(gdb) catch t
Catchpoint 1 (throw)
(gdb) run
Starting program: /home/sistemas/orthancbuild/Orthanc --verbose
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Catchpoint 1 (exception thrown), 0x00007ffff776d910 in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt #0 0x00007ffff776d910 in __cxa_throw () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 #1 0x0000000000441986 in void
boost::throw_exception<boost::bad_lexical_cast>(boost::bad_lexical_cast
const&) () #2 0x000000000045708d in
Orthanc::EnumerationDictionary<Orthanc::MetadataType>::Add(Orthanc::MetadataType,
std::string const&) [clone .constprop.243] () #3 0x00000000004575ea in Orthanc::InitializeServerEnumerations() () #4 0x000000000042f911 in Orthanc::OrthancInitialize(char const*) () #5 0x0000000000410b76 in main ()
(gdb)
# valgrind ./Orthanc --verbose
I don't have valgrind, must I install first
# strace ./Orthanc
is very long, see attached file. A lot of "no such file or directory"
but it's too difficult for me.