# Compiling problems with Ubuntu: uuid-dev package missing

**URL:** <https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29>\
**Category:** Google Groups archive\
**Created:** [August 29, 2013, 5:22pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29 "2013-08-29T17:22:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Oswald](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Christian\_Oswald](https://discourse.orthanc-server.org/u/Christian_Oswald)\
**Post date:** [August 29, 2013, 5:22pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/1 "2013-08-29T17:22:30Z")

</div>

Hello,

I have problems with compiling orthanc under Ubuntu 13.04 (64bit). After installing cmake the execution of

cmake -DSTATIC\_BUILD=ON -DCMAKE\_BUILD\_TYPE=Debug ~/Orthanc

failed with

CMake Error at Resources/CMake/Compiler.cmake:87 (message):  
Please install the uuid-dev package  
Call Stack (most recent call first):  
CMakeLists.txt:41 (include)

– Configuring incomplete, errors occurred!

The installation (sudo apt-get install uuid-dev) don’t change anything, the error persists. I have also checked with ubuntu 12.04 with the same error.

Any suggestions?

Thanks,  
Christian

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [August 30, 2013, 11:52am UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/2 "2013-08-30T11:52:59Z")

</div>

Dear Christian,

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.

Finally, you can have a look at the list of dependencies that are required on Ubuntu 13.04 by checking the following page:  
[http://packages.ubuntu.com/raring/science/orthanc](http://packages.ubuntu.com/raring/science/orthanc)

HTH,  
Sébastien-

---

<div class="post-metadata">

**Author:** ![Peter\_Somlo](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/p/7ea924/32.png) [@Peter\_Somlo](https://discourse.orthanc-server.org/u/Peter_Somlo)\
**Post date:** [August 30, 2013, 12:13pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/3 "2013-08-30T12:13:13Z")

</div>

Hi,

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 🙂

---

<div class="post-metadata">

**Author:** ![Peter\_Somlo](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/p/7ea924/32.png) [@Peter\_Somlo](https://discourse.orthanc-server.org/u/Peter_Somlo)\
**Post date:** [August 30, 2013, 12:17pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/4 "2013-08-30T12:17:08Z")

</div>

I'll install the packages you linked on the minimal system and give it a try.

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [August 30, 2013, 12:23pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/5 "2013-08-30T12:23:33Z")

</div>

Hi,

> 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:

[http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/control?view=markup](http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/control?view=markup)

The logs probably contains useful information.

> P.S.: Sorry Sebastien, I mistakenly sent it as a reply to you, instead  
> of the group 🙂

No problem, you’re welcome 🙂

---

<div class="post-metadata">

**Author:** ![Peter\_Somlo](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/p/7ea924/32.png) [@Peter\_Somlo](https://discourse.orthanc-server.org/u/Peter_Somlo)\
**Post date:** [September 1, 2013, 12:36pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/6 "2013-09-01T12:36:06Z")

</div>

Hi Christian,

the following worked for me. I simply removed the build directory  
after a failed build without the uuid-dev package. Here are the exact  
steps:

1. Install a minimal Ubuntu 12.04 (either 32 or 64-bit)  
2. sudo apt-get install mercurial  
3. hg clone [https://code.google.com/p/orthanc/](https://code.google.com/p/orthanc/)  
4. mkdir orthancbuild  
5. cd orthancbuild  
6. sudo apt-get install cmake  
7. sudo apt-get install build-essential  
8. cmake -DSTATIC\_BUILD=ON -DCMAKE\_BUILD\_TYPE=Release ../orthanc  
9. the "install uuid-dev" package appears  
10. sudo apt-get install uuid-dev

11. cmake -DSTATIC\_BUILD=ON -DCMAKE\_BUILD\_TYPE=Release ../orthanc  
12. the "install uuid-dev" package appears again...

Rebooting the system did not help, however removing the orthancbuild  
directory did. So 11. and 12. should be.

11. cd ..  
12. rm -rf orthancbuild  
13. mkdir orthancbuild  
14. cd orthancbuild  
15. cmake -DSTATIC\_BUILD=ON -DCMAKE\_BUILD\_TYPE=Release ../orthanc  
16. install unzip error  
17. sudo apt-get install unzip  
18. cmake -DSTATIC\_BUILD=ON -DCMAKE\_BUILD\_TYPE=Release ../orthanc  
19. make  
20. ./Orthanc

Sebastien, is there a way for cmake to check for the unzip dependency?  
It is needed for the dcmtk archive during the static build.

peter

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [September 1, 2013, 1:06pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/7 "2013-09-01T13:06:36Z")

</div>

Hi Peter,

Thank you much for these detailed instructions! I have just added them to the FAQ:  
[https://code.google.com/p/orthanc/wiki/FAQ#Static\_linking](https://code.google.com/p/orthanc/wiki/FAQ#Static_linking)

I will have a look at how to detect the presence of “unzip” in CMake:  
[https://trello.com/c/waydbGXL](https://trello.com/c/waydbGXL)

Cheers,  
Sébastien-

---

<div class="post-metadata">

**Author:** ![Christian\_Oswald](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Christian\_Oswald](https://discourse.orthanc-server.org/u/Christian_Oswald)\
**Post date:** [September 5, 2013, 4:49pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/8 "2013-09-05T16:49:55Z")

</div>

Hello,

first thank you very much for the fast response. The process for building and making works. I don’t have an unzip error, only for missing doxygen.

But after the make with ./Orthanc I get the short error:

E0905 11:41:13.482972 29701 main.cpp:436] NATIVE EXCEPTION

After restarting the same.

Any ideas?

Thanks,  
Christian

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [September 5, 2013, 5:38pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/9 "2013-09-05T17:38:39Z")

</div>

Dear Christian,

To understand your problem, please could you try and follow the debugging instructions of the following post:  
[https://groups.google.com/d/msg/orthanc-users/sUeUNBTil0s/MccDqfS6CwAJ](https://groups.google.com/d/msg/orthanc-users/sUeUNBTil0s/MccDqfS6CwAJ)

HTH,  
Sébastien-

---

<div class="post-metadata">

**Author:** ![Christian\_Oswald](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Christian\_Oswald](https://discourse.orthanc-server.org/u/Christian_Oswald)\
**Post date:** [September 5, 2013, 7:31pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/10 "2013-09-05T19:31:56Z")

</div>

Dear Sebastien,

I have tested following:

# ./Orthanc --verbose  
E0905 14:28:46.049497 5547 main.cpp:436] NATIVE EXCEPTION

# ./Orthanc --trace  
E0905 14:29:00.901952 5549 main.cpp:436] NATIVE EXCEPTION

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?

# netstat -tulpn | grep :8042  
# netstat -tulpn | grep :4242  
gives nothing.

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  
&nbsp;&nbsp;=\> 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.

Thanks for spending your time

Christian

[strace.txt](https://discourse.orthanc-server.org/uploads/short-url/pjzQaZ62AUPokhQCT5mbhM2afaM.txt) (9.1 KB)

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [October 28, 2013, 9:01pm UTC](https://discourse.orthanc-server.org/t/compiling-problems-with-ubuntu-uuid-dev-package-missing/29/11 "2013-10-28T21:01:12Z")

</div>

Dear Christian,

Sorry for the long delay. A new version of Orthanc is now available (0.7.0). Is this release still causing trouble on your Ubuntu 13.04 installation?

If this is the case, please could you try and run “gdb” once again, this time without typing “catch t”:

# gdb --args ./Orthanc --verbose

=\> enter “run” then “bt” when the exception occurs to inspect the stack.

Regards,  
Sébastien-
