Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autogen.sh fails to find libpcap even though it is installed #58

Open
milti opened this issue Sep 24, 2020 · 6 comments
Open

autogen.sh fails to find libpcap even though it is installed #58

milti opened this issue Sep 24, 2020 · 6 comments

Comments

@milti
Copy link

milti commented Sep 24, 2020

im running macOS catalina: autogen.sh is failing on finding libpcap:

,,,:libcrafter ...$ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
....
hecking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for u_int16_t... yes
checking for u_int8_t... yes
checking for size_t... yes
checking for libpcap... no
configure: error: libpcap not found

any suggestions on correcting?

@oliviertilmans
Copy link
Collaborator

Hi @milti ,

Could you check:

  • Where exactly are the libpcap headers residing?
  • Where are the libpcap binaries to use at linktime?

You can then compare against the paths listed there: https://github.com/pellegre/libcrafter/blob/master/libcrafter/configure.ac#L49
and see what needs to be changed/added in that detection script.

I suspect this might also be linked to tracebox/tracebox#65 (comment)

@milti
Copy link
Author

milti commented Sep 29, 2020

Hi @milti ,

Could you check:

* Where exactly are the libpcap headers residing?

* Where are the libpcap binaries to use at linktime?

You can then compare against the paths listed there: https://github.com/pellegre/libcrafter/blob/master/libcrafter/configure.ac#L49
and see what needs to be changed/added in that detection script.

I suspect this might also be linked to tracebox/tracebox#65 (comment)

thnx for the advice and link. ill be sure to check that out

@milti
Copy link
Author

milti commented Oct 17, 2020

Hi @milti ,

Could you check:

* Where exactly are the libpcap headers residing?

* Where are the libpcap binaries to use at linktime?

You can then compare against the paths listed there: https://github.com/pellegre/libcrafter/blob/master/libcrafter/configure.ac#L49
and see what needs to be changed/added in that detection script.

I suspect this might also be linked to tracebox/tracebox#65 (comment)

ive been able to make some progress, but am now facing this issue:

....
checking dynamic linker characteristics... darwin19.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for u_int16_t... yes
checking for u_int8_t... yes
checking for size_t... yes
checking for libpcap... /usr/local/Cellar/libpcap/1.9.1
./configure: line 421: test: net/bpf.h: integer expression expected
configure: error: pcap.h
./configure: line 310: return: net/bpf.h: numeric argument required
./configure: line 320: exit: net/bpf.h: numeric argument required
$

it does look to be the same issue as your reference. any suggestions so that i can install libcrafter?

@milti
Copy link
Author

milti commented Oct 30, 2020

question: is libcrafter restricted to libpcap0.8 libpcap0.8-dev ????
how to get it to work w later versions of the library?

my installation version is libpcap1.9.1

@oliviertilmans
Copy link
Collaborator

Hi @milti ,

This should not be the case.
Could you collapse lines 37-39 of libcrafter/configure.ac, i.e., replacing

     elif test -f $withval/include/pcap.h -a \
	       -f $withval/include/net/bpf.h -a \
	       -f $withval/lib/libpcap.a; then

by

     elif test -f $withval/include/pcap.h -a -f $withval/include/net/bpf.h -a -f $withval/lib/libpcap.a; then

There seems to be an issue with the linebreak escape in that script which prevents the --with-libpcap argument from working.

@milti
Copy link
Author

milti commented Nov 4, 2020

made the edit, but still the same issue, here is the output:

libcrafter $ ./autogen.sh --with-libpcap=/System/Volumes/Data/usr/local/Cellar/libpcap/1.9.1/include/
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force ${ACLOCAL_FLAGS} autoreconf: configure.ac: tracing autoreconf: running: glibtoolize --copy --force glibtoolize: putting auxiliary files in '.'. glibtoolize: copying file './ltmain.sh' glibtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, glibtoolize: and rerunning glibtoolize and aclocal. glibtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:13: installing './compile' configure.ac:6: installing './missing' /usr/local/Cellar/automake/1.16.2_1/share/automake-1.16/am/ltlibrary.am: warning: 'libcrafter.la': linking libtool libraries using a non-POSIX /usr/local/Cellar/automake/1.16.2_1/share/automake-1.16/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' Makefile.am:16: while processing Libtool library 'libcrafter.la' Makefile.am: installing './depcomp' autoreconf: Leaving directory .'
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... x86_64-apple-darwin19.6.0
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin19.6.0 file names to x86_64-apple-darwin19.6.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin19.6.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for u_int16_t... yes
checking for u_int8_t... yes
checking for size_t... yes
checking for libpcap... /System/Volumes/Data/usr/local/Cellar/libpcap/1.9.1/include/
./configure: line 421: test: net/bpf.h: integer expression expected
configure: error: pcap.h
./configure: line 310: return: net/bpf.h: numeric argument required
./configure: line 320: exit: net/bpf.h: numeric argument required
libcrafter $

now im seeing the issue reported on tracebox issues page that you referenced earlier. pls know, if i could use libtins i would, as esteban suggested in an email, but there are R pkgs that have the dependency on the crafter library and i think there is something in apache drill that is the same :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants