[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Linking with -levent

On Tue, May 22, 2012 at 2:40 AM, Ross Lagerwall <rosslagerwall@xxxxxxxxx> wrote:
> Hi,
> Linking with '-levent' is deprecated. Perhaps with libevent 2.1, it's time
> for it to be removed? (the pkgconfig stuff will have to be updated as per
> http://sourceforge.net/tracker/?func=detail&atid=461325&aid=3435107&group_id=50884)

I'd like to do it, but I'm worried about the hundreds of projects that
it would break -- namely, the ones that don't use pkgconfig.  One of
my guiding principles with Libevent is not to break existing
well-formed code, and I'd like to stick to that as far as I can.

Is there any way to build the libevent library so that people linking
it get a useful warning at link time?  I know it's possible to do with
some unixy systems at least, looking at the __warn_references trickery
that OpenBSD uses to call me out whenever I strcpy().

(Also, in retrospect, I wish I had factored things differently, so
that libevent_base contained only the event_base and event functions,
so that libevent_buffers contained evbuffers and bufferevents, and so
that libevent_http and libevent_rpc and libevent_dns were their own
libraries. But that probably is not worth changing at this point.)

> Also, before the final release of 2.1, we should probably deal with the
> library overlinking & underlinking issues mentioned here:
> http://www.mail-archive.com/libevent-users@xxxxxxxxxx/msg01737.html
> i.e. make sure that each libevent library links to all libraries that it
> needs and only the libraries that it needs.

Agreed; that would be pretty good to deal with.

I'd also like to explicitly set the set of exported identifiers to the
real libevent APIs (the ones in include/event2/*.h), and none of the
internal functions (the ones in *-internal.h), on shared library
systems that support that.

To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.