Skip to content

Instantly share code, notes, and snippets.

@archey
Created May 10, 2017 01:03
Show Gist options
  • Save archey/a059c58be2b37e66f5db589b198770bb to your computer and use it in GitHub Desktop.
Save archey/a059c58be2b37e66f5db589b198770bb to your computer and use it in GitHub Desktop.
build() {
cd "$_builddir"
# forces use of newer libsodium library for curvetun
export NACL_LIB=sodium
export NACL_INC_DIR=$(pkg-config --variable=includedir libsodium )/sodium
./configure --prefix=/usr
make PREFIX=/usr
}
>>> netsniff-ng: Analyzing dependencies...
>>> netsniff-ng: Installing for build: build-base bash perl gzip linux-headers libpcap-dev libnet-dev libnl3-dev zlib-dev ncurses-dev libnetfilter_conntrack-dev coreutils pkgconf
(1/15) Installing perl (5.24.1-r2)
(2/15) Installing gzip (1.8-r0)
(3/15) Installing linux-headers (4.4.6-r2)
(4/15) Installing libnet (1.1.6-r2)
(5/15) Installing libnet-dev (1.1.6-r2)
(6/15) Installing libnl3 (3.2.28-r0)
(7/15) Installing libnl3-cli (3.2.28-r0)
(8/15) Installing libnl3-dev (3.2.28-r0)
(9/15) Installing zlib-dev (1.2.11-r0)
(10/15) Installing ncurses-dev (6.0-r7)
(11/15) Installing libmnl (1.0.4-r0)
(12/15) Installing libnfnetlink (1.0.1-r1)
(13/15) Installing libnetfilter_conntrack (1.0.6-r0)
(14/15) Installing libnetfilter_conntrack-dev (1.0.6-r0)
(15/15) Installing .makedepends-netsniff-ng (0)
Executing busybox-1.26.2-r2.trigger
OK: 1247 MiB in 365 packages
>>> netsniff-ng: Cleaning temporary build dirs...
>>> netsniff-ng: Checking sha512sums...
netsniff-ng-0.6.3.tar.gz: OK
>>> netsniff-ng: Unpacking /var/cache/distfiles/netsniff-ng-0.6.3.tar.gz...
[*] Checking compiler gcc ... [YES]
[*] Checking linker gcc ... [YES]
[*] Checking pkg-config ... [YES]
[*] Checking flex ... [YES]
[*] Checking bison ... [YES]
[*] Checking nacl ... [NO]
[*] Checking libnl ... [YES]
[*] Checking libnl-route ... [YES]
[*] Checking tpacket_v2 ... [YES]
[*] Checking tpacket_v3 ... [YES]
[*] Checking libnetfilter-conntrack ... [NO]
[*] Checking ncurses ... [YES]
[*] Checking libGeoIP ... [NO]
[*] Checking libz ... [YES]
[*] Checking liburcu ... [YES]
[*] Checking libpcap ... [YES]
[*] Checking hw timestamping ... [YES]
[*] Checking libcli ... [YES]
[*] Checking libnet ... [YES]
[*] Generating config.h ...
[!] Some libraries or header definitions are missing or too old. Thus
certain tools will not be built (see below) or they will be built
with reduced functionality. Please refer to the INSTALL file for
the libraries needed to build the complete netsniff-ng toolkit
[!] The NaCl crypto library is currently not present on your system or
could not be found. Either install it from your distro or build it
manually using 'make nacl' and make sure that the NACL_INC_DIR and
NACL_LIB_DIR environment variables are set appropriately.
[!] The following tools will *not* be built: curvetun flowtop
[*] The following tools will be built: netsniff-ng trafgen astraceroute ifpps bpfc mausezahn
[!] There were errors in the configure script. Please check the file
config.log for details.
Building netsniff-ng toolkit (0.6.3+) for x86_64-alpine-linux-musl:
Building netsniff-ng:
CC dissector.c
In file included from /usr/include/fortify/stdlib.h:28:0,
from dissector.c:8:
/usr/include/fortify/string.h:37:1: error: 'memcpy' undeclared here (not in a function)
_FORTIFY_FN(memcpy) void *memcpy(void *__od, const void *__os, size_t __n)
^
In file included from die.h:8:0,
from xmalloc.h:7,
from pkt_buff.h:13,
from dissector.c:13:
/usr/include/fortify/string.h: In function 'memcpy':
/usr/include/fortify/string.h:51:9: error: called object '__orig_memcpy' is not a function or function pointer
return __orig_memcpy(__od, __os, __n);
^~~~~~~~~~~~~
In file included from /usr/include/fortify/stdlib.h:28:0,
from dissector.c:8:
/usr/include/fortify/string.h:37:1: note: declared here
_FORTIFY_FN(memcpy) void *memcpy(void *__od, const void *__os, size_t __n)
^
/usr/include/fortify/string.h: At top level:
/usr/include/fortify/string.h:64:1: error: 'memset' undeclared here (not in a function)
_FORTIFY_FN(memset) void *memset(void *__d, int __c, size_t __n)
^
In file included from die.h:8:0,
from xmalloc.h:7,
from pkt_buff.h:13,
from dissector.c:13:
/usr/include/fortify/string.h: In function 'memset':
/usr/include/fortify/string.h:70:9: error: called object '__orig_memset' is not a function or function pointer
return __orig_memset(__d, __c, __n);
^~~~~~~~~~~~~
In file included from /usr/include/fortify/stdlib.h:28:0,
from dissector.c:8:
/usr/include/fortify/string.h:64:1: note: declared here
_FORTIFY_FN(memset) void *memset(void *__d, int __c, size_t __n)
^
make: *** [Makefile:185: netsniff-ng/dissector.o] Error 1
>>> ERROR: netsniff-ng: all failed
>>> netsniff-ng: Uninstalling dependencies...
(1/15) Purging .makedepends-netsniff-ng (0)
(2/15) Purging perl (5.24.1-r2)
(3/15) Purging gzip (1.8-r0)
(4/15) Purging linux-headers (4.4.6-r2)
(5/15) Purging libnet-dev (1.1.6-r2)
(6/15) Purging libnet (1.1.6-r2)
(7/15) Purging libnl3-dev (3.2.28-r0)
(8/15) Purging libnl3-cli (3.2.28-r0)
(9/15) Purging libnl3 (3.2.28-r0)
(10/15) Purging zlib-dev (1.2.11-r0)
(11/15) Purging ncurses-dev (6.0-r7)
(12/15) Purging libnetfilter_conntrack-dev (1.0.6-r0)
(13/15) Purging libnetfilter_conntrack (1.0.6-r0)
(14/15) Purging libmnl (1.0.4-r0)
(15/15) Purging libnfnetlink (1.0.1-r1)
Executing busybox-1.26.2-r2.trigger
OK: 1203 MiB in 350 packages
This seems to be why its failing:
Package libnfnetlink was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnfnetlink.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libnfnetlink', required by 'libnetfilter_conntrack', not found
Package libnfnetlink was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnfnetlink.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libnfnetlink', required by 'libnetfilter_conntrack', not found
In file included from config.Dvj7K2/nfcttest.c:1:0:
/usr/include/libnetfilter_conntrack/libnetfilter_conntrack.h:15:42: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
#include <libnfnetlink/linux_nfnetlink.h>
^
compilation terminated.
config.Dvj7K2/geoiptest.c:1:19: fatal error: GeoIP.h: No such file or directory
#include <GeoIP.h>
^
compilation terminated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment