EV fails to install on OS X 10.7

Marc Lehmann schmorp at schmorp.de
Thu Feb 2 21:20:58 CET 2012

On Thu, Feb 02, 2012 at 11:08:39PM +0400, Alexey Borzenkov <snaury at gmail.com> wrote:
> Thank you very much for this reference. I was finally able to find and
> read http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf (which
> is the latest C99 draft). Although the section is 6.9.2 (maybe I found
> the wrong standard?) and it says:

There is at least n1570, which is newer, and maybe there is an even newer

However, it's 6.9.2 in the final standard as well, I just included the
section before it because both deal with "extern".

> I was thinking that by reading standard I would maybe find basis for a
> good bug report to clang, but now I am totally confused. :-/ Do you

Well, I would start taking the declarations from libev and see if they
compile. If yes, then the problem is somewhere else.

I tried it out, and came up with this minimal example:

   static struct ev_loop *ev_default_loop_ptr;
   void f() {
     extern struct ev_loop *ev_default_loop_ptr;
   static struct ev_loop *ev_default_loop_ptr = 0;

Removing any declaration makes it go away.

The extern inside f() just means it refers to the outside scope.

> think maybe clang follows standard here (by giving an error for an
> undefined behavior) after all, or is there a bug after all? (in which

Ok - what is the undefined behaviour?

> P.S. Also, reading your reply, I once again feel like I inadvertently
> offended you somehow (by my lack of proper knowledge perhaps?)

No, it is clear that you really want to help, but the problem is that I
kepe having these discussions, they take time, and it doesn't seem clang
is, at the moment, relevant.

I am sorry if I worded my concerns in a way that made you feel I
personally had a problem with you. I hae a problem with the extra
discussions which do not seem to be relevant.

> especially for an OS that I love. (for me it doesn't matter if a
> corporation behind Mac OS X is evil or not, it makes a beautiful
> unix-based operating system, and for that I am grateful)

The unix part is, of course, broken beyond recognition, which makes it
very hard to port software from posix systems to os x. That and apple's
hatefulness for free software doesn't make me super happy to spend my time
on helping apple.

I use EV myself in some os x project, and I ma very happy if it
compiles, but I don't have special requirements such as following apples

Other platforms (gnu/linux, bsd, even cygwin) don't suffer from these
continual breakage problems, so the effect is that an undue percentage
of my time is spent on helping apple, something which I am getting
increasingly annoyed at. The breakage is not just something obvious, such
as the program not compiling, the breakage is often a system interface
(locales, kqueue...) that requires special workarounds in libev, and
apple rarely fixes bugs, but happily breaks interfaces (i think 10.6 or
10.7 broke poll in the name of performance - apple based it on kqueue
internally but didn't fix the kqueue bugs).

So the patches to make it work need to be very minimal, and safe for other
systems, the ones that do count, I really need to reduce the amount of
maintainance for os x to a similar level as for other platforms, or drop

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list