./configure --with-libevent-dir=/usr/local/lib/event2 ends with
checking for libevent directory... configure: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package.
In freebsd libevent2 .so files are in /usr/local/lib/event2 and headers are in /usr/local/include/event2
There needs to be command line switch for setting libevent2 include path as well.
Trac: Username: hsn
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Ah, that's fine. Those headers are supposed to be in an "event2" subdirectory of their include path, so that you can get them with "#include <event2/event.h>" and so on.
Is there also another event.h in /user/local/include or /usr/include or elsewhere?
Hm. But <event.h> is a libevent2 header; it is supposed to be there. I am increasingly suspicious that the FreeBSD installation is doing something wrong. Does it work any better if you uninstall libevent2 and then reinstall it?
Yawning reports that this "still happens with a clean install of libevent2 from ports (9.2-RELEASE)" and confirms that event2/event.h is installed, but event.h is not.
Hm. So, Libevent ships with two headers called event.h. One of them is the preferred Libevent 2 header, and goes somewhere where it can be included with "#include <event2/event.h>". The other header exists for backward compatibility with Libevent 1, and you are supposed to be able to include it with "#include <event.h>".
Because all Libevent versions install the "<event.h>" header, but only Libevent 2 installs the "<event2/event.h>" header, Tor searches for "<event.h>" in order to find out where the Libevent headers might be.
But in FreeBSD 9.2, apparently, the compatibility headers are installed in a subdirectory called "compat", so searching for "<event.h>" won't find them.
Here are our (non-exclusive) options as I see them:
Let the FreeBSD ports maintainers continue to patch this situation in their Makefile. (Their nonstandard libevent installation: their problem.)
Do a FreeBSD-specific workaround, where if we detect that you're running FreeBSD and you don't have a --with-libevent-dir option set, manually set the includes correctly.
Tweak our search to look for event2/event.h in addition to event.h , or to try adding foo/event2/compat to our search path whenever we're trying foo/. (This would require some tweaking in the middle of the hairiest bit of acinclude.m4.)
Finally start transitioning towards pkg-config. (Tweaking acinclude.m4 would also be required in this case too.)
For 0.2.5, the easiest options seems like 1 or 2. For 0.2.6 or maybe 0.2.???, I think 4 is our best option, and 3 is best avoided.
Both the short and long term options suggested seems good to me.
1 is slightly less preferable to 2 for the "user building tor themselves instead of using the port" use case (I note that the port will build/install 0.2.4.21 which is old, but not 0.2.3.x old), but "look at /usr/ports/security/tor/Makefile for the options to pass to autoconf" may be sufficient.