7

I'm trying to put together an AMI on EC2, and am currently stalled on building 0mq.

initially, I got this error while running ./configure

checking for uuid_generate in -luuid... no
configure: error: cannot link with -luuid, install uuid-dev.

I installed e2fsprogs-devel and linux-utils via yum, which I believe contained the required library, but still got the error above. I subsequently installed uuid-devel with yum and got no further.

Then, I created a link as below:

sudo ln -s /lib64/libuuid.so.1.3.0 /lib64/libuuid.so

and now ./configure completes happily, but I get an error when I run make

[...]
CXX    libzmq_la-signaler.lo
CXX    libzmq_la-socket_base.lo
In file included from socket_base.cpp:50:
uuid.hpp:31:23: error: uuid/uuid.h: No such file or directory
In file included from socket_base.cpp:50:
uuid.hpp:92: error: 'uuid_t' in namespace '::' does not name a type
make[2]: *** [libzmq_la-socket_base.lo] Error 1
make[2]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/this/infrastructure/zeromq2-2/src'
make: *** [all-recursive] Error 1

The following is the beginning of /usr/include/uuid.h, if that's useful.

#ifndef __UUID_H__
#define __UUID_H__

/* workaround conflicts with system headers */
#define uuid_t       __vendor_uuid_t
#define uuid_create  __vendor_uuid_create
#define uuid_compare __vendor_uuid_compare
#include <sys/types.h>
#include <unistd.h>
#undef  uuid_t
#undef  uuid_create
#undef  uuid_compare

I'm pretty well stumped at this point.

Wooble
  • 87,717
  • 12
  • 108
  • 131
Ben
  • 4,980
  • 3
  • 43
  • 84

3 Answers3

19

As pointed out on https://bugzilla.redhat.com/show_bug.cgi?id=576296#c0, use libuuid-devel instead of uuid-devel,

$ sudo yum install libuuid-devel

This resolved the missing /usr/include/uuid/uuid.h file for me.

Bilal Husain
  • 1,730
  • 1
  • 12
  • 11
7

ultimately, I satisfied the dependency by running

$ yum install uuid-devel

also worth noting is that to get libzmq to link into the other programs that needed it down the line (Mongrel2, for example), I had to add the line

/usr/local/lib

to /etc/ldconfig.so.conf and run

$ ldconfig -v | grep zmq

(if you don't see an entry for libzmq.so in the output, something's off)

Ben
  • 4,980
  • 3
  • 43
  • 84
  • 2
    It is common to need the -devel (or -dev on Debian systems) package when you are building something, as opposed to just installing binaries. These packages are almost always named the same as the binary package with -devel or -dev added onto the name. – Michael Dillon Aug 10 '11 at 03:13
0

Alternatively, read the documentation on installing zeromq! :)

i.e.

Make sure that libtool, autoconf, automake are installed. Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed. Unpack the .tar.gz source archive. Run ./configure, followed by make. To install ØMQ system-wide run sudo make install. On Linux, run sudo ldconfig after installing ØMQ.

As mentioned, on Amazon Linux, you'd install deps by doing:

sudo yum install uuid uuid-devel

N.B. the instructions also mention the requirement to do:

sudo ldconfig

after install too.

fancyPants
  • 50,732
  • 33
  • 89
  • 96
snarkyboojum
  • 324
  • 2
  • 3