Adam Monsen
2007-06-21 22:40:16 UTC
I'm having trouble creating RPMs for conntrack (see
http://netfilter.org) for CentOS 4.3. The dependencies for conntrack
are libnfnetlink and libnetfilter_conntrack; I'd like to make RPMs for
these, too.
First I tried manually compiling and installing all three on the
CentOS box. This seemed to work fine. The only change I had to make to
the source was to comment out the line beginning with "URL" in the
pkgconfig ".pc" files (must be a feature of a newer version of
pkgconfig). Here's how I built the sources:
mkdir /tmp/c && cd /tmp/c
tar -xvjf /tmp/libnfnetlink-0.0.25.tar.bz2
pushd libnfnetlink-0.0.25
# manually comment out "URL" line in libnfnetlink.pc.in, then...
./configure --prefix=$HOME/tmp/ctk && make -j4 && make install
popd
tar -xvjf /tmp/libnetfilter_conntrack-0.0.50.tar.bz2
pushd libnetfilter_conntrack-0.0.50
# manually comment out "URL" line in libnetfilter_conntrack.pc.in, then...
PKG_CONFIG_PATH=$HOME/tmp/ctk/lib/pkgconfig \
./configure --prefix=$HOME/tmp/ctk && make -j4 && make install
popd
tar -xvjf /tmp/conntrack-1.00beta2.tar.bz2
pushd conntrack-1.00beta2/
PKG_CONFIG_PATH=$HOME/tmp/ctk/lib/pkgconfig \
./configure --prefix=$HOME/tmp/ctk && make -j4 && make install
popd
Some information about this CentOS 4.3 build system, in case that helps:
Linux kernel 2.6.14.3 (SMP)
glibc-2.3.4-2.19
gcc-3.4.5-2
rpm-4.3.3-13_nonptl
Note that, according to
http://people.netfilter.org/pablo/conntrackd/install.html, 2.6.14 is
NOT considered recent enough to _run_ conntrack, so perhaps I should
not be trying to build conntrack with this old kernel, either. I can't
imagine why that would matter for the build, though.
And now for my attempt at packaging these in RPMs. As a starting point
I used the source RPMs available for Fedora 7.
First I tried building and installing the libnfnetlink dependency.
With the exception of modifying the pkgconfig .pc files by hand,
libnfnetlink builds ok, and libnfnetlink and libnfnetlink-devel both
install ok.
Next I went for libnetfilter_conntrack. This build fails with some
strange errors:
...
callback.c: In function `__callback':
callback.c:12: error: `NFNL_CB_STOP' undeclared (first use in this function)
callback.c:12: error: (Each undeclared identifier is reported only once
callback.c:12: error: for each function it appears in.)
callback.c:20: error: `NFNL_CB_CONTINUE' undeclared (first use in this function)
callback.c:30: warning: passing arg 2 of `__parse_conntrack' from
incompatible pointer type
callback.c:38: error: `NFNL_CB_FAILURE' undeclared (first use in this function)
...
I say strange because (a)this doesn't happen during the "manual"
source build, and (b)these constants are indeed defined in an enum in
/usr/include/libnfnetlink/libnfnetlink.h, which is included of course
included by the libnetfilter_conntrack source code. This error also
only happens when trying to build from RPM on CentOS 4.3. Ugh. Any
ideas?
http://netfilter.org) for CentOS 4.3. The dependencies for conntrack
are libnfnetlink and libnetfilter_conntrack; I'd like to make RPMs for
these, too.
First I tried manually compiling and installing all three on the
CentOS box. This seemed to work fine. The only change I had to make to
the source was to comment out the line beginning with "URL" in the
pkgconfig ".pc" files (must be a feature of a newer version of
pkgconfig). Here's how I built the sources:
mkdir /tmp/c && cd /tmp/c
tar -xvjf /tmp/libnfnetlink-0.0.25.tar.bz2
pushd libnfnetlink-0.0.25
# manually comment out "URL" line in libnfnetlink.pc.in, then...
./configure --prefix=$HOME/tmp/ctk && make -j4 && make install
popd
tar -xvjf /tmp/libnetfilter_conntrack-0.0.50.tar.bz2
pushd libnetfilter_conntrack-0.0.50
# manually comment out "URL" line in libnetfilter_conntrack.pc.in, then...
PKG_CONFIG_PATH=$HOME/tmp/ctk/lib/pkgconfig \
./configure --prefix=$HOME/tmp/ctk && make -j4 && make install
popd
tar -xvjf /tmp/conntrack-1.00beta2.tar.bz2
pushd conntrack-1.00beta2/
PKG_CONFIG_PATH=$HOME/tmp/ctk/lib/pkgconfig \
./configure --prefix=$HOME/tmp/ctk && make -j4 && make install
popd
Some information about this CentOS 4.3 build system, in case that helps:
Linux kernel 2.6.14.3 (SMP)
glibc-2.3.4-2.19
gcc-3.4.5-2
rpm-4.3.3-13_nonptl
Note that, according to
http://people.netfilter.org/pablo/conntrackd/install.html, 2.6.14 is
NOT considered recent enough to _run_ conntrack, so perhaps I should
not be trying to build conntrack with this old kernel, either. I can't
imagine why that would matter for the build, though.
And now for my attempt at packaging these in RPMs. As a starting point
I used the source RPMs available for Fedora 7.
First I tried building and installing the libnfnetlink dependency.
With the exception of modifying the pkgconfig .pc files by hand,
libnfnetlink builds ok, and libnfnetlink and libnfnetlink-devel both
install ok.
Next I went for libnetfilter_conntrack. This build fails with some
strange errors:
...
callback.c: In function `__callback':
callback.c:12: error: `NFNL_CB_STOP' undeclared (first use in this function)
callback.c:12: error: (Each undeclared identifier is reported only once
callback.c:12: error: for each function it appears in.)
callback.c:20: error: `NFNL_CB_CONTINUE' undeclared (first use in this function)
callback.c:30: warning: passing arg 2 of `__parse_conntrack' from
incompatible pointer type
callback.c:38: error: `NFNL_CB_FAILURE' undeclared (first use in this function)
...
I say strange because (a)this doesn't happen during the "manual"
source build, and (b)these constants are indeed defined in an enum in
/usr/include/libnfnetlink/libnfnetlink.h, which is included of course
included by the libnetfilter_conntrack source code. This error also
only happens when trying to build from RPM on CentOS 4.3. Ugh. Any
ideas?
--
Adam Monsen
Adam Monsen