Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem installing zmq on amazon linux (unable to find uuid)

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.

like image 740
Ben Avatar asked Aug 04 '11 20:08

Ben


2 Answers

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.

like image 186
Bilal Husain Avatar answered Sep 21 '22 15:09

Bilal Husain


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)

like image 24
Ben Avatar answered Sep 18 '22 15:09

Ben