orthecreedence / cl-async

Asynchronous IO library for Common Lisp.
MIT License
273 stars 40 forks source link

[uv] The alien function "uv_loop_size" is undefined #97

Closed fukamachi closed 10 years ago

fukamachi commented 10 years ago

I may be doing something wrong, but I'm sending a feedback anyway.

When I run Woo with cl-libuv2 and uv branch, the following error raised.

(ql:quickload :woo)
(woo:run (lambda (env) (declare (ignore env)) '(200 () ("Hello"))) :use-thread nil)

NOTE: You need to git clone Woo and the latest fast-http before testing.

The alien function "uv_loop_size" is undefined.
   [Condition of type SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR]

Backtrace:
0: ("undefined function")
1: (LIBUV:UV-LOOP_SIZE)
2: (WOO:RUN #<FUNCTION (LAMBDA (ENV)) {100795A9EB}> :DEBUG T :PORT 5000 :ADDRESS "0.0.0.0" :USE-THREAD NIL :WORKER-NUM NIL)

It works with cl-libevent2 and master branch of cl-async. (It uses cl-libevent2 directly in multi-worker, but it won't hurt unless you specify :worker-num option, I think).

I installed libuv-0.10.21 via Homebrew, and I checked /usr/local/lib/libuv.dylib exists. CL implementation is SBCL 1.2.5.

orthecreedence commented 10 years ago

I build cl-libuv against v1.0.0-rc2 (https://github.com/joyent/libuv/tree/v1.0.0-rc2) because I don't want to have to rewrite the whole thing when v1 releases (there are a fair amount of upgrades I'd have to do and there are a number of utilities in the v1.x branch to aid in writing bindings, uv_loop_size being one of them).

Try compiling 1.0.0-rc2 from source and let me know if you have any problems.

fukamachi commented 10 years ago

I installed libuv v1.0.0-rc2 via Homebrew with --devel option, and it work properly! Thank you for the quick reply.