All of lore.kernel.org
 help / color / mirror / Atom feed
From: KOVACS Krisztian <hidden@sch.bme.hu>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Netfilter Development Mailing List <netfilter-devel@lists.netfilter.org>
Subject: [PATCH] conntrack-tools compilation problem
Date: Sun, 5 Aug 2007 17:30:15 +0200	[thread overview]
Message-ID: <20070805153015.GA27598@sch.bme.hu> (raw)

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

Hi Pablo,

I've just tried to build conntrack-tools and all the required netfilter
libraries from scratch. The libs were built and installed without
problems, but then conntrack-tools failed to compile with a missing
include problem.

Looks like conntrack-tools' autoconf/automake templates do not properly
use pkg-config information. configure.in detects the presence of
libnfnetlink and libnetfilter_conntrack using pkg-config, but then fails
to add the necessary flags to the compile and linker flags. For me, this
is a problem because all those libraries live under /opt/netfilter, and
thus compilation fails because of missing headers.

The attached patch fixes this problem for me, although I'm quite sure that
it does not break compilation for someone else. (Should not, but I'm not
much of an autoconf expert...)

--
KOVACS Krisztian

[-- Attachment #2: conntrack-tools-autoconf-dependencies.patch --]
[-- Type: text/x-diff, Size: 1696 bytes --]

Index: conntrack-tools/configure.in
===================================================================
--- conntrack-tools/configure.in	(revision 6998)
+++ conntrack-tools/configure.in	(working copy)
@@ -104,4 +104,8 @@
 dnl                  extensions/Makefile
 dnl                  src/Makefile])
 
+CFLAGS="$CFLAGS $LIBNETFILTER_CONNTRACK_CFLAGS"
+
+AC_SUBST(LIBNETFILTER_CONNTRACK_LIBS)
+
 AC_OUTPUT(Makefile src/Makefile include/Makefile extensions/Makefile)
Index: conntrack-tools/src/Makefile.am
===================================================================
--- conntrack-tools/src/Makefile.am	(revision 6998)
+++ conntrack-tools/src/Makefile.am	(working copy)
@@ -8,6 +8,7 @@
 
 conntrack_SOURCES = conntrack.c
 conntrack_LDADD = ../extensions/libct_proto_tcp.la ../extensions/libct_proto_udp.la ../extensions/libct_proto_icmp.la
+conntrack_LDFLAGS = $(all_libraries) @LIBNETFILTER_CONNTRACK_LIBS@
 
 conntrackd_SOURCES = alarm.c main.c run.c hash.c buffer.c \
 		    local.c log.c mcast.c netlink.c \
@@ -22,6 +23,6 @@
 		    build.c parse.c \
 		    read_config_yy.y read_config_lex.l
 
-conntrackd_LDFLAGS = $(all_libraries) -lnfnetlink -lnetfilter_conntrack
+conntrackd_LDFLAGS = $(all_libraries) @LIBNETFILTER_CONNTRACK_LIBS@
 
 EXTRA_DIST = read_config_yy.h
Index: conntrack-tools/Makefile.am
===================================================================
--- conntrack-tools/Makefile.am	(revision 6998)
+++ conntrack-tools/Makefile.am	(working copy)
@@ -9,7 +9,7 @@
 
 SUBDIRS   = extensions src
 DIST_SUBDIRS = include src extensions
-LINKOPTS  = -lnfnetlink -lnetfilter_conntrack -lpthread
+LIBS = @LIBNETFILTER_CONNTRACK_LIBS@
 AM_CFLAGS = -g
 
 $(OBJECTS): libtool

             reply	other threads:[~2007-08-05 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-05 15:30 KOVACS Krisztian [this message]
2007-08-05 15:36 ` [PATCH] conntrack-tools compilation problem Jan Engelhardt
2007-08-05 16:03   ` KOVACS Krisztian
2007-08-06  8:34 ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070805153015.GA27598@sch.bme.hu \
    --to=hidden@sch.bme.hu \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.