tailhook / zerogw

A fast HTTP/WebSocket to zeromq gateway (UNMAINTAINED, take a look at swindon web server instead)
http://zerogw.com
MIT License
250 stars 27 forks source link

Compile Fails On Missing libev But Is Installed #9

Closed xevix closed 13 years ago

xevix commented 13 years ago

I have tried with libev 4.0.4 installed in /usr and in /usr/local but neither seem to work, i keep getting this:

$ python3 ./waf build
Waf: Entering directory `/home/xevix/zerogw/build'
[ 1/23] cprogram: build/src/main.c.0.o build/src/log.c.0.o build/src/websocket.c.0.o build/src/sieve.c.0.o build/src/zutils.c.0.o build/src/http.c.0.o build/src/resolve.c.0.o build/src/uidgen.c.0.o build/src/request.c.0.o build/src/polling.c.0.o build/src/disk.c.0.o build/src/commands.c.0.o build/src/pool.c.0.o build/src/msgqueue.c.0.o build/src/config.c.0.o -> build/zerogw                            
/usr/lib/libwebsite.a(core.c.0.o): In function `ev_default_loop':                                                                                                                                         
core.c:(.text+0x25): undefined reference to `ev_default_loop_init'
collect2: ld returned 1 exit status
Waf: Leaving directory `/home/xevix/zerogw/build'
Build failed
 -> task failed (exit status 1):                                                                                                                                                                          
        {task 155695436: cprogram main.c.0.o,log.c.0.o,websocket.c.0.o,sieve.c.0.o,zutils.c.0.o,http.c.0.o,resolve.c.0.o,uidgen.c.0.o,request.c.0.o,polling.c.0.o,disk.c.0.o,commands.c.0.o,pool.c.0.o,msgqueue.c.0.o,config.c.0.o -> zerogw}                                                                                                                                                                       
['/usr/lib/ccache/gcc', '', 'src/main.c.0.o', 'src/log.c.0.o', 'src/websocket.c.0.o', 'src/sieve.c.0.o', 'src/zutils.c.0.o', 'src/http.c.0.o', 'src/resolve.c.0.o', 'src/uidgen.c.0.o', 'src/request.c.0.o', 'src/polling.c.0.o', 'src/disk.c.0.o', 'src/commands.c.0.o', 'src/pool.c.0.o', 'src/msgqueue.c.0.o', 'src/config.c.0.o', '-o', '', '/home/xevix/zerogw/build/zerogw', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lyaml', '-lzmq', '-lev', '-lcoyaml', '-lwebsite', '-lssl']

I compiled/installed myself, since my version of Kubuntu only has libev3 and zerogw seems to require libev4.

xevix commented 13 years ago

I guess the real question is which version of libev should I be using? I just compiled libev-examples (https://github.com/coolaj86/libev-examples) using libev4 and had no problems, I checked ldd and we're good.

$ ldd unix-echo-client 
        linux-gate.so.1 =>  (0x00a2e000)
        libev.so.4 => /usr/lib/libev.so.4 (0x00f61000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x00851000)
        libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0x00c14000)
        /lib/ld-linux.so.2 (0x00e3e000)
tailhook commented 13 years ago

You need to recompile libwebsite, it has been compiled against old version of libev.

Frankly I need to add a check in libwebsite, because it is very frequent mistake (on ubuntu :) )

xevix commented 13 years ago

Yep, that did the trick, thanks!