Bug 192113

Summary: Can't build databases/libmemcached - missing event.h
Product: Ports & Packages Reporter: Jordan Irwin <antumdeluge>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: adamw, antumdeluge, m.tsatsenko, riggs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Build output of libmemcached
none
Output of build after including missing header paths
none
Configure log for libmemcached build. none

Description Jordan Irwin 2014-07-25 15:08:40 UTC
Created attachment 144968 [details]
Build output of libmemcached

When trying to build libmemcached it fails with the error that it can't find event.h, which from the package libevent2 & is located in /usr/local/include/event2/.

Build output is attached.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-25 20:05:43 UTC
please include the category of the port in the title of the PR next time.
Comment 2 Jordan Irwin 2014-07-25 21:28:56 UTC
Ah, okay. Like "databases/libmemcached"?
Comment 3 Jordan Irwin 2014-07-25 22:04:06 UTC
(In reply to John Marino from comment #1)
> please include the category of the port in the title of the PR next time.

Okay, I see how others are adding the category.
Comment 4 Jordan Irwin 2014-07-26 03:13:05 UTC
Created attachment 144987 [details]
Output of build after including missing header paths

I've been trying to figure out how to fix the problem of not finding the libraries through the autotools files so I can make a patch. But, unfortunately, I am not very knowledgeable about GNU Autotools. I resigned to adding CPPFLAGS to the command line to just try and get it built. I had to use the following as it was having trouble finding three header files; event2/event.h, uuid/uuid.h, & event2/event-config.h.

Command:
make CPPFLAGS="-I/usr/local/include -I/usr/local/include/event -I/usr/local/include/uuid"

But now there are some problems with some "incomplete types". The output log is attached.
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2014-08-03 19:39:59 UTC
It builds fine for me as-is on 10-STABLE i386. Please note that libevent2 underwent some big changes recently, so please make sure that your ports tree and all your ports are up-to-date.

If you are still having this problem, we'll need more info such as which OS version, which ARCH, etc, and more of the build output than just the failure message.
Comment 6 Jordan Irwin 2014-08-05 22:52:10 UTC
Okay, I'll try updating ports again & building when I get an opportunity.

System:
FreeBSD 10.0 amd64

$ uname -a
FreeBSD FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 7 Jordan Irwin 2014-08-05 22:53:00 UTC
What info should I attach? config.log?
Comment 8 Thomas Zander freebsd_committer freebsd_triage 2014-08-15 18:02:47 UTC
Builds fine here on 10.0-RELEASE amd64. What does your config.log say about event.h?
Comment 9 Jordan Irwin 2014-08-16 20:03:27 UTC
Created attachment 145879 [details]
Configure log for libmemcached build.

Here is the config.log.

"fatal error: 'event.h' file not found."
"WARNING: unable to find libevent."
Comment 10 Jordan Irwin 2014-08-16 20:04:39 UTC
"event.h" is located in /usr/local/include/event2.
Comment 11 Jordan Irwin 2014-08-16 20:05:35 UTC
The configure script should be looking in "event2/event.h", I think.
Comment 12 Adam Weinberger freebsd_committer freebsd_triage 2014-08-16 20:08:44 UTC
Dude you need to update your ports tree.
Comment 13 Jordan Irwin 2014-08-16 20:26:10 UTC
Just updated ports tree "portsnap fetch update", problem persists. Do I need to manually rebuild libevent2?
Comment 14 Adam Weinberger freebsd_committer freebsd_triage 2014-08-16 20:28:39 UTC
Did you follow the instructions in /usr/ports/UPDATING from 2014/07/23? You may have missed a step.

20140723:
   AFFECTS: users of devel/libevent

   libevent1 has been replaced by libevent2 via the compatibility layer.
   All applications that used libevent1 must be rebuilt.

   Please remove libevent1 before upgrading, by running:

         pkg delete -f libevent

/usr/local/include/event.h is installed by libevent2 now. Be sure to remove libevent1, then rebuild libevent2 and try again.
Comment 15 Jordan Irwin 2014-08-16 23:27:42 UTC
libevent was not installed.

[console]
$ sudo pkg delete -f libevent
Password:
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Package(s) not found!
[/console]

Manually rebuilt libevent2 & upgraded from v2.0.21_1 to v2.0.21_2. libmemcached now builds.