Bug 208346 - sysutils/syslog-ng fails to build on FreeBSD 10.2
Summary: sysutils/syslog-ng fails to build on FreeBSD 10.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-28 06:04 UTC by Alexander
Modified: 2016-03-29 13:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
/usr/ports/net/libnet/Makefile (1.47 KB, text/plain)
2016-03-28 15:38 UTC, Andrei Coada
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2016-03-28 06:04:05 UTC
make showconfig
===> The following configuration options are available for syslog-ng-3.7.3:
     DOCS=on: Build and/or install documentation
     GEOIP=off: Build with GeoIP support
     IPV6=off: Build with IPV6 support
     JAVA=off: Build with Java support (and modules, like Elastic)
     JSON=off: Build with JSON-C support
     PYTHON=off: Build with Python 2.7 support
     REDIS=off: Build with Redis support
     SMTP=on: Build with SMTP support
     SPOOF=on: Build with spoof source support
     SQL=off: Build with database (libdbi) support
     TCP_WRAPPERS=off: Build with TCP Wrappers
#make install clean
===>  Building for syslog-ng-3.7.3
.....
gmake[2]: Entering directory '/usr/ports/sysutils/syslog-ng/work/syslog-ng-3.7.3'
gmake --no-print-directory all-recursive
  CC     modules/afsocket/modules_afsocket_libafsocket_la-afinet-dest.lo
modules/afsocket/afinet-dest.c:45:10: fatal error: 'libnet11/libnet.h' file not found
#include <libnet11/libnet.h>
         ^
1 error generated.
Makefile:8880: recipe for target 'modules/afsocket/modules_afsocket_libafsocket_la-afinet-dest.lo' failed
gmake[4]: *** [modules/afsocket/modules_afsocket_libafsocket_la-afinet-dest.lo] Error 1
Makefile:11313: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
Makefile:4318: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/sysutils/syslog-ng/work/syslog-ng-3.7.3'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/syslog-ng
*** Error code 1
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2016-03-28 06:23:21 UTC
Is net/libnet installed on your system?

The port depends on and drags in the above port as needed.
Comment 2 Alexander 2016-03-28 06:36:50 UTC
Yes. Libnet installed.
 % portmaster -L | grep libnet
===>>> libnet-1.1.6_4,1
Comment 3 Andrei Coada 2016-03-28 09:49:42 UTC
Bug CONFIRMED.
syslog-ng-devel throws the same make error.

Problem:
libnet.h is located under: /usr/local/include/libnet.h.

Workaround:
Point a symlink from /usr/local/include/libnet.h to /usr/local/include/libnet11/libnet.h.

Permanent solution:
Fix the paths in the makefile.


Thank you for your consideration !
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2016-03-28 14:51:11 UTC
The problem is with your libnet. Reinstall libnet and try again.

slippy$ ls /usr/local/include/libnet.h
ls: /usr/local/include/libnet.h: No such file or directory
slippy$ pkg info -l libnet | grep libnet.h
	/usr/local/include/libnet11/libnet.h   <--- here
	/usr/local/include/libnet11/libnet/libnet-headers.h
	/usr/local/man/man3/libnet.h.3.gz
slippy$
Comment 5 Andrei Coada 2016-03-28 15:38:58 UTC
Created attachment 168730 [details]
/usr/ports/net/libnet/Makefile
Comment 6 Andrei Coada 2016-03-28 15:43:21 UTC
I completely understand you, but on my side:

1. portsnap fetch update
2. cd /usr/ports/net/libnet
3. make deinstall
4. make rmconfig
5. make install clean
6. pkg info -l libnet | grep libnet.h
        /usr/local/include/libnet.h
        /usr/local/include/libnet/libnet-headers.h
        /usr/local/man/man3/libnet.h.3.gz
        /usr/local/share/examples/libnet/hsrp.c

My system:
freebsd-version -ku
10.2-RELEASE-p14
10.2-RELEASE-p14

I've attached libnet's Makefile from a fresh portsnap update.
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-03-28 15:56:49 UTC
A commit references this bug:

Author: cy
Date: Mon Mar 28 15:55:56 UTC 2016
New revision: 412058
URL: https://svnweb.freebsd.org/changeset/ports/412058

Log:
  Fix SPOOF build.

  PR:		208346

Changes:
  head/sysutils/syslog-ng-devel/files/patch-modules__afsocket__afinet-dest.c
  head/sysutils/syslog-ng37/files/patch-modules__afsocket__afinet-dest.c
Comment 8 Andrei Coada 2016-03-28 18:48:19 UTC
Please take a look at my attachment. :)

There you have the ports r411432 revision made by tijl just 8 days ago, where he changes the libnet.h path to /usr/local/include.

And please read the aforementioned revision's description:
"Install net/libnet headers and libraries back in the location where other
ports expect it.  The files were put in a different location to avoid a
conflict with net/libnet10 but this port has been removed a while ago now."

In conclusion, net/libnet port changed location to /usr/local/include, and sysutils/syslog-ng and sysutils/syslog-ng-devel points to the old "include" location of net/libnet.
Comment 9 Andrei Coada 2016-03-28 18:56:30 UTC
Your patches must be reverted to:

@@ -42,7 +42,7 @@
 	 #endif
 	 
 	 #if ENABLE_SPOOF_SOURCE
 	-#include <libnet11/libnet.h>
 	+#include <libnet.h>
 	 #endif
 	 
 	 #if _GNU_SOURCE_DEFINED
Comment 10 Cy Schubert freebsd_committer freebsd_triage 2016-03-29 13:44:10 UTC
Fixed by r412058.