vinodkone
vinodkone

Reputation: 2871

libev-4.15 doesn't compile on OSX 10.8

I'm trying to upgrade from libev-3.8 (which compiles fine on OSX 10.8) to libev-4.15 and getting the following error.

third_party/libev-4.15/ev.h:234: error: expected identifier before numeric constant
third_party/libev-4.15/ev.h:234: error: expected `}' before numeric constant
third_party/libev-4.15/ev.h:234: error: expected unqualified-id before numeric constant
third_party/libev-4.15/ev.h:842: error: expected declaration before ‘}’ token

Link to ev.h: http://cvs.schmorp.de/libev/ev.h?revision=1.171&view=markup

My system config:

checking host system type... i386-apple-darwin12.3.0
checking target system type... i386-apple-darwin12.3.0
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking how to convert i386-apple-darwin12.3.0 file names to i386-apple-darwin12.3.0 format... func_convert_file_noop
checking how to convert i386-apple-darwin12.3.0 file names to toolchain format... func_convert_file_noop
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r

FWIW, the same config compiles fine on CentOS5.6.

Upvotes: 0

Views: 536

Answers (1)

vinodkone
vinodkone

Reputation: 2871

Turns out the issue was that on OSX "EV_ERROR" declared in "ev.h" conflicts with that declared in "/usr/include/sys/event.h".

As a fix, I had to forward declare the ev variables that I used instead of including ev.h directly in one of my source files. That did the trick.

Upvotes: 1

Related Questions