I've just uploaded iftop 0.16. You can get it from:
http://ex-parrot.com/~pdw/iftop/download/iftop-0.16.tar.gz
Changes are:
0.16 28/02/04 * Added support for DLT_NULL * Fix for pthread.c behaviour on Solaris.
* Build fixes for gcc 3.4+ Henne Vogelsang hvogel@suse.de
* Fixed behaviour of -n and -N options Klaus Sperner klaus@heaven.escape.de
Paul
On Sat, 28 Feb 2004 19:15:43 +0000 Paul Warren pdw@ex-parrot.com wrote:
I've just uploaded iftop 0.16. You can get it from:
http://ex-parrot.com/~pdw/iftop/download/iftop-0.16.tar.gz
Changes are:
0.16 28/02/04
- Added support for DLT_NULL
- Fix for pthread.c behaviour on Solaris.
Thanks. Unfortunately, Posix thread support is still broken in NetBSD:
bash-2.05b# ./configure checking build system type... i386-unknown-netbsdelf1.6.1 checking host system type... i386-unknown-netbsdelf1.6.1 checking target system type... i386-unknown-netbsdelf1.6.1 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets ${MAKE}... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc 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 sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/sockio.h usability... yes checking sys/sockio.h presence... yes checking for sys/sockio.h... yes checking for unistd.h... (cached) yes checking for gcc option to accept ANSI C... none needed checking for an ANSI C-conforming const... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking sys/dlpi.h usability... no checking sys/dlpi.h presence... no checking for sys/dlpi.h... no checking for regcomp... yes checking for select... yes checking for strdup... yes checking for strerror... yes checking for strspn... yes checking for library containing socket... none required checking for library containing log... -lm checking for gethostbyname... yes checking for library containing inet_aton... none required checking for library containing inet_pton... none required checking for inet_aton... yes checking for inet_pton... yes checking size of u_int8_t... 1 checking size of u_int16_t... 2 checking size of u_int32_t... 4 checking for library containing getnameinfo... none required checking for library containing gethostbyaddr_r... no checking for library containing gethostbyaddr... none required checking where to find pcap.h... /include checking for pcap_open_live in -lpcap... yes checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... no idea configure: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
Hi John,
Can you post us the (last bit of) output from your config.log?
thanks,
Paul
On Sat, Feb 28, 2004 at 02:31:41PM -0600, John Thompson wrote:
On Sat, 28 Feb 2004 19:15:43 +0000 Paul Warren pdw@ex-parrot.com wrote:
I've just uploaded iftop 0.16. You can get it from:
http://ex-parrot.com/~pdw/iftop/download/iftop-0.16.tar.gz
Changes are:
0.16 28/02/04
- Added support for DLT_NULL
- Fix for pthread.c behaviour on Solaris.
Thanks. Unfortunately, Posix thread support is still broken in NetBSD:
bash-2.05b# ./configure checking build system type... i386-unknown-netbsdelf1.6.1 checking host system type... i386-unknown-netbsdelf1.6.1 checking target system type... i386-unknown-netbsdelf1.6.1 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets ${MAKE}... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc 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 sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/sockio.h usability... yes checking sys/sockio.h presence... yes checking for sys/sockio.h... yes checking for unistd.h... (cached) yes checking for gcc option to accept ANSI C... none needed checking for an ANSI C-conforming const... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking sys/dlpi.h usability... no checking sys/dlpi.h presence... no checking for sys/dlpi.h... no checking for regcomp... yes checking for select... yes checking for strdup... yes checking for strerror... yes checking for strspn... yes checking for library containing socket... none required checking for library containing log... -lm checking for gethostbyname... yes checking for library containing inet_aton... none required checking for library containing inet_pton... none required checking for inet_aton... yes checking for inet_pton... yes checking size of u_int8_t... 1 checking size of u_int16_t... 2 checking size of u_int32_t... 4 checking for library containing getnameinfo... none required checking for library containing gethostbyaddr_r... no checking for library containing gethostbyaddr... none required checking where to find pcap.h... /include checking for pcap_open_live in -lpcap... yes checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... no idea configure: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
--
-John (JohnThompson@new.rr.com)
iftop-users mailing list iftop-users@lists.beasts.org http://lists.beasts.org/mailman/listinfo/iftop-users
On Mon, 01 Mar 2004 09:48:22 +0000 Paul Warren pdw@ex-parrot.com wrote:
Hi John,
Can you post us the (last bit of) output from your config.log?
Sure; thanks:
configure:6504: checking how to compile a working program with POSIX threads configure:6524: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -ln curses >&5 /var/tmp/cccO6llL.o: In function`worker_thread': /var/tmp/cccO6llL.o(.text+0x19): undefined reference to`pthread_mutex_lock' /var/tmp/cccO6llL.o(.text+0x29): undefined reference to `pthread_cond_signal' /var/tmp/cccO6llL.o(.text+0x39): undefined reference to `pthread_mutex_unlock' /var/tmp/cccO6llL.o(.text+0x52): undefined reference to `pthread_testcancel' /var/tmp/cccO6llL.o: In function `main': /var/tmp/cccO6llL.o(.text+0x79): undefined reference to `pthread_mutex_lock' /var/tmp/cccO6llL.o(.text+0x99): undefined reference to `pthread_create' /var/tmp/cccO6llL.o(.text+0x10f): undefined reference to `pthread_cond_timedwait' /var/tmp/cccO6llL.o(.text+0x164): undefined reference to `pthread_cancel' /var/tmp/cccO6llL.o(.text+0x180): undefined reference to `pthread_join' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure"
[...]
configure:6554: result: no idea configure:6557: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
## ---------------- ## ## Cache variables. ## ## ---------------- ##
ac_cv_build=i386-unknown-netbsdelf1.6.1 ac_cv_build_alias=i386-unknown-netbsdelf1.6.1 ac_cv_c_compiler_gnu=yes ac_cv_c_const=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value=-I/usr/pkg/include ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_exeext= ac_cv_func_gethostbyname=yes ac_cv_func_inet_aton=yes ac_cv_func_inet_pton=yes ac_cv_func_regcomp=yes ac_cv_func_select=yes ac_cv_func_strdup=yes ac_cv_func_strerror=yes ac_cv_func_strspn=yes ac_cv_header_inttypes_h=yes ac_cv_header_pcap_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_dlpi_h=no ac_cv_header_sys_ioctl_h=yes ac_cv_header_sys_sockio_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_time_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_time=yes ac_cv_header_unistd_h=yes ac_cv_host=i386-unknown-netbsdelf1.6.1 ac_cv_host_alias=i386-unknown-netbsdelf1.6.1 ac_cv_lib_pcap_pcap_open_live=yes ac_cv_objext=o ac_cv_path_install='/usr/bin/install -c' ac_cv_prog_AWK=awk ac_cv_prog_CPP='gcc -E' ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_cc_g=yes ac_cv_prog_cc_stdc= ac_cv_prog_make_make_set=yes ac_cv_search_gethostbyaddr='none required' ac_cv_search_gethostbyaddr_r=no ac_cv_search_getnameinfo='none required' ac_cv_search_inet_aton='none required' ac_cv_search_inet_pton='none required' ac_cv_search_log=-lm ac_cv_search_socket='none required' ac_cv_target=i386-unknown-netbsdelf1.6.1 ac_cv_target_alias=i386-unknown-netbsdelf1.6.1 ac_cv_type_size_t=yes am_cv_CC_dependencies_compiler_type=gcc
[...]
Hi John,
Sorry for the delay in repling, I've only just had a chance to look at this. I think I need to see more of your config.log. configure should attempt to compile a test program in 12 different ways. I suspect that at least one of those is actually compiling and it's the test program that's failing. Can you post the rest of the file?
thanks,
Paul
On Mon, Mar 01, 2004 at 07:26:53AM -0600, John Thompson wrote:
On Mon, 01 Mar 2004 09:48:22 +0000 Paul Warren pdw@ex-parrot.com wrote:
Hi John,
Can you post us the (last bit of) output from your config.log?
Sure; thanks:
configure:6504: checking how to compile a working program with POSIX threads configure:6524: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -ln curses >&5 /var/tmp/cccO6llL.o: In function`worker_thread': /var/tmp/cccO6llL.o(.text+0x19): undefined reference to`pthread_mutex_lock' /var/tmp/cccO6llL.o(.text+0x29): undefined reference to `pthread_cond_signal' /var/tmp/cccO6llL.o(.text+0x39): undefined reference to `pthread_mutex_unlock' /var/tmp/cccO6llL.o(.text+0x52): undefined reference to `pthread_testcancel' /var/tmp/cccO6llL.o: In function `main': /var/tmp/cccO6llL.o(.text+0x79): undefined reference to `pthread_mutex_lock' /var/tmp/cccO6llL.o(.text+0x99): undefined reference to `pthread_create' /var/tmp/cccO6llL.o(.text+0x10f): undefined reference to `pthread_cond_timedwait' /var/tmp/cccO6llL.o(.text+0x164): undefined reference to `pthread_cancel' /var/tmp/cccO6llL.o(.text+0x180): undefined reference to `pthread_join' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure"
[...]
configure:6554: result: no idea configure:6557: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
## ---------------- ## ## Cache variables. ## ## ---------------- ##
ac_cv_build=i386-unknown-netbsdelf1.6.1 ac_cv_build_alias=i386-unknown-netbsdelf1.6.1 ac_cv_c_compiler_gnu=yes ac_cv_c_const=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value=-I/usr/pkg/include ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_exeext= ac_cv_func_gethostbyname=yes ac_cv_func_inet_aton=yes ac_cv_func_inet_pton=yes ac_cv_func_regcomp=yes ac_cv_func_select=yes ac_cv_func_strdup=yes ac_cv_func_strerror=yes ac_cv_func_strspn=yes ac_cv_header_inttypes_h=yes ac_cv_header_pcap_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_dlpi_h=no ac_cv_header_sys_ioctl_h=yes ac_cv_header_sys_sockio_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_time_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_time=yes ac_cv_header_unistd_h=yes ac_cv_host=i386-unknown-netbsdelf1.6.1 ac_cv_host_alias=i386-unknown-netbsdelf1.6.1 ac_cv_lib_pcap_pcap_open_live=yes ac_cv_objext=o ac_cv_path_install='/usr/bin/install -c' ac_cv_prog_AWK=awk ac_cv_prog_CPP='gcc -E' ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_cc_g=yes ac_cv_prog_cc_stdc= ac_cv_prog_make_make_set=yes ac_cv_search_gethostbyaddr='none required' ac_cv_search_gethostbyaddr_r=no ac_cv_search_getnameinfo='none required' ac_cv_search_inet_aton='none required' ac_cv_search_inet_pton='none required' ac_cv_search_log=-lm ac_cv_search_socket='none required' ac_cv_target=i386-unknown-netbsdelf1.6.1 ac_cv_target_alias=i386-unknown-netbsdelf1.6.1 ac_cv_type_size_t=yes am_cv_CC_dependencies_compiler_type=gcc
[...]
--
-John (JohnThompson@new.rr.com)
iftop-users mailing list iftop-users@lists.beasts.org http://lists.beasts.org/mailman/listinfo/iftop-users
On Sun, 07 Mar 2004 15:38:29 +0000 Paul Warren pdw@ex-parrot.com wrote:
Sorry for the delay in repling, I've only just had a chance to look at this. I think I need to see more of your config.log. configure should attempt to compile a test program in 12 different ways. I suspect that at least one of those is actually compiling and it's the test program that's failing. Can you post the rest of the file?
Certainly:
This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was generated by GNU Autoconf 2.53. Invocation command line was
$ ./configure
## --------- ## ## Platform. ## ## --------- ##
hostname = shire uname -m = i386 uname -r = 1.6.1 uname -s = NetBSD uname -v = NetBSD 1.6.1 (shire) #1: Thu Jul 17 17:16:47 CDT 2003 skylar@shire:/usr/exports/src/syssrc/NetBSD/1.6.1/arch/i386/compile/shire
/usr/bin/uname -p = i386 /bin/uname -X = unknown
/bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown
PATH: /usr/bin PATH: /bin PATH: /usr/pkg/bin PATH: /usr/local/bin PATH: /home/john/OpenOffice PATH: /home/john/sdm PATH: /usr/java/j2re1.4.2_01/bin
## ----------- ## ## Core tests. ## ## ----------- ##
configure:1245: checking build system type configure:1263: result: i386-unknown-netbsdelf1.6.1 configure:1271: checking host system type configure:1285: result: i386-unknown-netbsdelf1.6.1 configure:1293: checking target system type configure:1307: result: i386-unknown-netbsdelf1.6.1 configure:1341: checking for a BSD-compatible install configure:1395: result: /usr/bin/install -c configure:1406: checking whether build environment is sane configure:1449: result: yes configure:1482: checking for gawk configure:1511: result: no configure:1482: checking for mawk configure:1511: result: no configure:1482: checking for nawk configure:1511: result: no configure:1482: checking for awk configure:1498: found /usr/bin/awk configure:1508: result: awk configure:1518: checking whether make sets ${MAKE} configure:1538: result: yes configure:1736: checking for gcc configure:1752: found /usr/bin/gcc configure:1762: result: gcc configure:2006: checking for C compiler version configure:2009: gcc --version </dev/null >&5 2.95.3 configure:2012: $? = 0 configure:2014: gcc -v </dev/null >&5 Using builtin specs. gcc version 2.95.3 20010315 (release) (NetBSD nb3) configure:2017: $? = 0 configure:2019: gcc -V </dev/null >&5 gcc: argument to `-V' is missing configure:2022: $? = 1 configure:2048: checking for C compiler default output configure:2051: gcc -I/usr/pkg/include conftest.c >&5 configure:2054: $? = 0 configure:2087: result: a.out configure:2092: checking whether the C compiler works configure:2098: ./a.out configure:2101: $? = 0 configure:2116: result: yes configure:2123: checking whether we are cross compiling configure:2125: result: no configure:2128: checking for suffix of executables configure:2130: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:2133: $? = 0 configure:2155: result: configure:2161: checking for suffix of object files configure:2185: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2188: $? = 0 configure:2207: result: o configure:2211: checking whether we are using the GNU C compiler configure:2238: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2241: $? = 0 configure:2244: test -s conftest.o configure:2247: $? = 0 configure:2259: result: yes configure:2265: checking whether gcc accepts -g configure:2289: gcc -c -g conftest.c >&5 configure:2292: $? = 0 configure:2295: test -s conftest.o configure:2298: $? = 0 configure:2308: result: yes configure:2335: gcc -c -I/usr/pkg/include conftest.c >&5 conftest.c:2: parse error before `me' configure:2338: $? = 1 configure: failed program was: #ifndef __cplusplus choke me #endif configure:2467: checking for style of include used by make configure:2495: result: GNU configure:2523: checking dependency style of gcc configure:2585: result: gcc configure:2596: checking how to run the C preprocessor configure:2622: gcc -E conftest.c configure:2628: $? = 0 configure:2655: gcc -E conftest.c configure:2651: ac_nonexistent.h: No such file or directory configure:2661: $? = 1 configure: failed program was: #line 2650 "configure" #include "confdefs.h" #include <ac_nonexistent.h> configure:2698: result: gcc -E configure:2713: gcc -E conftest.c configure:2719: $? = 0 configure:2746: gcc -E conftest.c configure:2742: ac_nonexistent.h: No such file or directory configure:2752: $? = 1 configure: failed program was: #line 2741 "configure" #include "confdefs.h" #include <ac_nonexistent.h> configure:2792: checking for ANSI C header files configure:2806: gcc -E conftest.c configure:2812: $? = 0 configure:2897: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:2900: $? = 0 configure:2902: ./conftest configure:2905: $? = 0 configure:2919: result: yes configure:2964: checking for sys/types.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for sys/stat.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for stdlib.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for string.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for memory.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for strings.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for inttypes.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for stdint.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:2964: checking for unistd.h configure:2977: gcc -c -I/usr/pkg/include conftest.c >&5 configure:2980: $? = 0 configure:2983: test -s conftest.o configure:2986: $? = 0 configure:2996: result: yes configure:3025: checking sys/ioctl.h usability configure:3034: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3037: $? = 0 configure:3040: test -s conftest.o configure:3043: $? = 0 configure:3052: result: yes configure:3056: checking sys/ioctl.h presence configure:3063: gcc -E conftest.c configure:3069: $? = 0 configure:3087: result: yes configure:3105: checking for sys/ioctl.h configure:3112: result: yes configure:3025: checking sys/time.h usability configure:3034: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3037: $? = 0 configure:3040: test -s conftest.o configure:3043: $? = 0 configure:3052: result: yes configure:3056: checking sys/time.h presence configure:3063: gcc -E conftest.c configure:3069: $? = 0 configure:3087: result: yes configure:3105: checking for sys/time.h configure:3112: result: yes configure:3025: checking sys/sockio.h usability configure:3034: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3037: $? = 0 configure:3040: test -s conftest.o configure:3043: $? = 0 configure:3052: result: yes configure:3056: checking sys/sockio.h presence configure:3063: gcc -E conftest.c configure:3069: $? = 0 configure:3087: result: yes configure:3105: checking for sys/sockio.h configure:3112: result: yes configure:3016: checking for unistd.h configure:3021: result: yes configure:3126: checking for gcc option to accept ANSI C configure:3189: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3192: $? = 0 configure:3195: test -s conftest.o configure:3198: $? = 0 configure:3215: result: none needed configure:3223: checking for an ANSI C-conforming const configure:3293: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3296: $? = 0 configure:3299: test -s conftest.o configure:3302: $? = 0 configure:3312: result: yes configure:3322: checking for size_t configure:3349: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3352: $? = 0 configure:3355: test -s conftest.o configure:3358: $? = 0 configure:3368: result: yes configure:3380: checking whether time.h and sys/time.h may both be included configure:3408: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3411: $? = 0 configure:3414: test -s conftest.o configure:3417: $? = 0 configure:3427: result: yes configure:3449: checking sys/dlpi.h usability configure:3458: gcc -c -I/usr/pkg/include conftest.c >&5 configure:3486: sys/dlpi.h: No such file or directory configure:3461: $? = 1 configure: failed program was: #line 3451 "configure" #include "confdefs.h" #include <stdio.h> #if HAVE_SYS_TYPES_H # include <sys/types.h> #endif #if HAVE_SYS_STAT_H # include <sys/stat.h> #endif #if STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else # if HAVE_STDLIB_H # include <stdlib.h> # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif #if HAVE_STRINGS_H # include <strings.h> #endif #if HAVE_INTTYPES_H # include <inttypes.h> #else # if HAVE_STDINT_H # include <stdint.h> # endif #endif #if HAVE_UNISTD_H # include <unistd.h> #endif #include <sys/dlpi.h> configure:3476: result: no configure:3480: checking sys/dlpi.h presence configure:3487: gcc -E conftest.c configure:3483: sys/dlpi.h: No such file or directory configure:3493: $? = 1 configure: failed program was: #line 3482 "configure" #include "confdefs.h" #include <sys/dlpi.h> configure:3511: result: no configure:3529: checking for sys/dlpi.h configure:3536: result: no configure:3558: checking for regcomp configure:3601: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:3604: $? = 0 configure:3607: test -s conftest configure:3610: $? = 0 configure:3620: result: yes configure:3558: checking for select configure:3601: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:3604: $? = 0 configure:3607: test -s conftest configure:3610: $? = 0 configure:3620: result: yes configure:3558: checking for strdup configure:3601: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:3604: $? = 0 configure:3607: test -s conftest configure:3610: $? = 0 configure:3620: result: yes configure:3558: checking for strerror configure:3601: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:3604: $? = 0 configure:3607: test -s conftest configure:3610: $? = 0 configure:3620: result: yes configure:3558: checking for strspn configure:3601: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:3604: $? = 0 configure:3607: test -s conftest configure:3610: $? = 0 configure:3620: result: yes configure:3631: checking for library containing socket configure:3664: gcc -o conftest -I/usr/pkg/include conftest.c >&5 configure:3667: $? = 0 configure:3670: test -s conftest configure:3673: $? = 0 configure:3732: result: none required configure:3739: checking for library containing log configure:3772: gcc -o conftest -I/usr/pkg/include conftest.c >&5 /var/tmp/ccXBbjZz.o: In function `main': /var/tmp/ccXBbjZz.o(.text+0x7): undefined reference to `log' configure:3775: $? = 1 configure: failed program was: #line 3746 "configure" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char log (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { log (); ; return 0; } configure:3818: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:3821: $? = 0 configure:3824: test -s conftest configure:3827: $? = 0 configure:3840: result: -lm configure:3847: checking for gethostbyname configure:3890: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:3893: $? = 0 configure:3896: test -s conftest configure:3899: $? = 0 configure:3909: result: yes configure:3982: checking for library containing inet_aton configure:4015: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4018: $? = 0 configure:4021: test -s conftest configure:4024: $? = 0 configure:4083: result: none required configure:4090: checking for library containing inet_pton configure:4123: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4126: $? = 0 configure:4129: test -s conftest configure:4132: $? = 0 configure:4191: result: none required configure:4203: checking for inet_aton configure:4246: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4249: $? = 0 configure:4252: test -s conftest configure:4255: $? = 0 configure:4265: result: yes configure:4203: checking for inet_pton configure:4246: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4249: $? = 0 configure:4252: test -s conftest configure:4255: $? = 0 configure:4265: result: yes configure:4278: checking size of u_int8_t configure:4301: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4304: $? = 0 configure:4306: ./conftest configure:4309: $? = 0 configure:4314: result: 1 configure:4278: checking size of u_int16_t configure:4301: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4304: $? = 0 configure:4306: ./conftest configure:4309: $? = 0 configure:4314: result: 2 configure:4278: checking size of u_int32_t configure:4301: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:4304: $? = 0 configure:4306: ./conftest configure:4309: $? = 0 configure:4314: result: 4 configure:5566: checking for library containing getnameinfo configure:5599: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:5602: $? = 0 configure:5605: test -s conftest configure:5608: $? = 0 configure:5667: result: none required configure:5684: checking for library containing gethostbyaddr_r configure:5717: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 /var/tmp/ccyEL3wM.o: In function `main': /var/tmp/ccyEL3wM.o(.text+0x7): undefined reference to `gethostbyaddr_r' configure:5720: $? = 1 configure: failed program was: #line 5691 "configure" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { gethostbyaddr_r (); ; return 0; } configure:5763: gcc -o conftest -I/usr/pkg/include conftest.c -lnsl -lm >&5 ld: cannot find -lnsl configure:5766: $? = 1 configure: failed program was: #line 5737 "configure" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyaddr_r (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { gethostbyaddr_r (); ; return 0; } configure:5785: result: no configure:6018: checking for library containing gethostbyaddr configure:6051: gcc -o conftest -I/usr/pkg/include conftest.c -lm >&5 configure:6054: $? = 0 configure:6057: test -s conftest configure:6060: $? = 0 configure:6119: result: none required configure:6170: checking where to find pcap.h configure:6186: gcc -E conftest.c configure:6192: $? = 0 configure:6204: result: /include configure:6234: checking for pcap_open_live in -lpcap configure:6267: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm >&5 configure:6270: $? = 0 configure:6273: test -s conftest configure:6276: $? = 0 configure:6287: result: yes configure:6324: checking pcap.h usability configure:6333: gcc -c -I/usr/pkg/include conftest.c >&5 configure:6336: $? = 0 configure:6339: test -s conftest.o configure:6342: $? = 0 configure:6351: result: yes configure:6355: checking pcap.h presence configure:6362: gcc -E conftest.c configure:6368: $? = 0 configure:6386: result: yes configure:6404: checking for pcap.h configure:6411: result: yes configure:6437: checking for a curses library containing mvchgat configure:6465: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -lcurses >&5 /var/tmp/ccj5gfIz.o: In function `main': /var/tmp/ccj5gfIz.o(.text+0x19): undefined reference to `mvchgat' configure:6468: $? = 1 configure: failed program was: #line 6442 "configure" #include "confdefs.h"
#include <curses.h>
#ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () {
mvchgat(0, 0, 1, A_REVERSE, 0, NULL)
; return 0; } configure:6465: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -lncurses >&5 configure:6468: $? = 0 configure:6471: test -s conftest configure:6474: $? = 0 configure:6498: result: -lncurses configure:6504: checking how to compile a working program with POSIX threads configure:6524: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -lncurses >&5 /var/tmp/cccO6llL.o: In function `worker_thread': /var/tmp/cccO6llL.o(.text+0x19): undefined reference to `pthread_mutex_lock' /var/tmp/cccO6llL.o(.text+0x29): undefined reference to `pthread_cond_signal' /var/tmp/cccO6llL.o(.text+0x39): undefined reference to `pthread_mutex_unlock' /var/tmp/cccO6llL.o(.text+0x52): undefined reference to `pthread_testcancel' /var/tmp/cccO6llL.o: In function `main': /var/tmp/cccO6llL.o(.text+0x79): undefined reference to `pthread_mutex_lock' /var/tmp/cccO6llL.o(.text+0x99): undefined reference to `pthread_create' /var/tmp/cccO6llL.o(.text+0x10f): undefined reference to `pthread_cond_timedwait' /var/tmp/cccO6llL.o(.text+0x164): undefined reference to `pthread_cancel' /var/tmp/cccO6llL.o(.text+0x180): undefined reference to `pthread_join' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -lncurses -lpthread >&5 ld: cannot find -lpthread configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include conftest.c -lpcap -lm -lncurses -lpthread -lposix4 >&5 ld: cannot find -lpthread configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -mt conftest.c -lpcap -lm -lncurses >&5 cc1: Invalid option `t' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -mt conftest.c -lpcap -lm -lncurses -lpthread >&5 cc1: Invalid option `t' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -mt conftest.c -lpcap -lm -lncurses -lpthread -lposix4 >&5 cc1: Invalid option `t' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -pthread conftest.c -lpcap -lm -lncurses >&5 gcc: unrecognized option `-pthread' /var/tmp/ccs18JIT.o: In function `worker_thread': /var/tmp/ccs18JIT.o(.text+0x19): undefined reference to `pthread_mutex_lock' /var/tmp/ccs18JIT.o(.text+0x29): undefined reference to `pthread_cond_signal' /var/tmp/ccs18JIT.o(.text+0x39): undefined reference to `pthread_mutex_unlock' /var/tmp/ccs18JIT.o(.text+0x52): undefined reference to `pthread_testcancel' /var/tmp/ccs18JIT.o: In function `main': /var/tmp/ccs18JIT.o(.text+0x79): undefined reference to `pthread_mutex_lock' /var/tmp/ccs18JIT.o(.text+0x99): undefined reference to `pthread_create' /var/tmp/ccs18JIT.o(.text+0x10f): undefined reference to `pthread_cond_timedwait' /var/tmp/ccs18JIT.o(.text+0x164): undefined reference to `pthread_cancel' /var/tmp/ccs18JIT.o(.text+0x180): undefined reference to `pthread_join' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -pthread conftest.c -lpcap -lm -lncurses -lpthread >&5 gcc: unrecognized option `-pthread' ld: cannot find -lpthread configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -pthread conftest.c -lpcap -lm -lncurses -lpthread -lposix4 >&5 gcc: unrecognized option `-pthread' ld: cannot find -lpthread configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -thread conftest.c -lpcap -lm -lncurses >&5 gcc: unrecognized option `-thread' /var/tmp/cc93sgnv.o: In function `worker_thread': /var/tmp/cc93sgnv.o(.text+0x19): undefined reference to `pthread_mutex_lock' /var/tmp/cc93sgnv.o(.text+0x29): undefined reference to `pthread_cond_signal' /var/tmp/cc93sgnv.o(.text+0x39): undefined reference to `pthread_mutex_unlock' /var/tmp/cc93sgnv.o(.text+0x52): undefined reference to `pthread_testcancel' /var/tmp/cc93sgnv.o: In function `main': /var/tmp/cc93sgnv.o(.text+0x79): undefined reference to `pthread_mutex_lock' /var/tmp/cc93sgnv.o(.text+0x99): undefined reference to `pthread_create' /var/tmp/cc93sgnv.o(.text+0x10f): undefined reference to `pthread_cond_timedwait' /var/tmp/cc93sgnv.o(.text+0x164): undefined reference to `pthread_cancel' /var/tmp/cc93sgnv.o(.text+0x180): undefined reference to `pthread_join' configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -thread conftest.c -lpcap -lm -lncurses -lpthread >&5 gcc: unrecognized option `-thread' ld: cannot find -lpthread configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6524: gcc -o conftest -I/usr/pkg/include -thread conftest.c -lpcap -lm -lncurses -lpthread -lposix4 >&5 gcc: unrecognized option `-thread' ld: cannot find -lpthread configure:6527: $? = 1 configure: program exited with status 1 configure: failed program was: #line 6518 "configure" #include "confdefs.h" /* * pthread.c: * Tiny test program to see whether POSIX threads work. */
static const char rcsid[] = "$Id: pthread.c,v 1.3 2004/01/20 09:51:48 pdw Exp $";
#include <sys/types.h>
#include <errno.h> #include <pthread.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h>
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; static int return_value = -1;
void *worker_thread(void *v) { /* Record successful return and signal parent to wake up. */ return_value = 0; pthread_mutex_lock(&mtx); pthread_cond_signal(&cond); pthread_mutex_unlock(&mtx); while (1) { sleep(1); pthread_testcancel(); } }
/* Start a thread, and have it set a variable to some other value, then signal * a condition variable. If this doesn't happen within some set time, we assume * that something's gone badly wrong and abort (for instance, the thread never * got started). */ int main(void) { pthread_t thr; int res; struct timespec deadline = {0}; if ((res = pthread_mutex_lock(&mtx)) != 0 || (res = pthread_create(&thr, NULL, worker_thread, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
/* Thread should now be running; we should wait on the condition * variable. */ do deadline.tv_sec = 2 + time(NULL); while ((res = pthread_cond_timedwait(&cond, &mtx, &deadline)) == EINTR);
if (res != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
if ((res = pthread_cancel(thr)) != 0 || (res = pthread_join(thr, NULL)) != 0) { fprintf(stderr, "%s\n", strerror(res)); return -1; }
return return_value; } configure:6554: result: no idea configure:6557: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
## ---------------- ## ## Cache variables. ## ## ---------------- ##
ac_cv_build=i386-unknown-netbsdelf1.6.1 ac_cv_build_alias=i386-unknown-netbsdelf1.6.1 ac_cv_c_compiler_gnu=yes ac_cv_c_const=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value=-I/usr/pkg/include ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_exeext= ac_cv_func_gethostbyname=yes ac_cv_func_inet_aton=yes ac_cv_func_inet_pton=yes ac_cv_func_regcomp=yes ac_cv_func_select=yes ac_cv_func_strdup=yes ac_cv_func_strerror=yes ac_cv_func_strspn=yes ac_cv_header_inttypes_h=yes ac_cv_header_memory_h=yes ac_cv_header_pcap_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_dlpi_h=no ac_cv_header_sys_ioctl_h=yes ac_cv_header_sys_sockio_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_time_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_time=yes ac_cv_header_unistd_h=yes ac_cv_host=i386-unknown-netbsdelf1.6.1 ac_cv_host_alias=i386-unknown-netbsdelf1.6.1 ac_cv_lib_pcap_pcap_open_live=yes ac_cv_objext=o ac_cv_path_install='/usr/bin/install -c' ac_cv_prog_AWK=awk ac_cv_prog_CPP='gcc -E' ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_cc_g=yes ac_cv_prog_cc_stdc= ac_cv_prog_make_make_set=yes ac_cv_search_gethostbyaddr='none required' ac_cv_search_gethostbyaddr_r=no ac_cv_search_getnameinfo='none required' ac_cv_search_inet_aton='none required' ac_cv_search_inet_pton='none required' ac_cv_search_log=-lm ac_cv_search_socket='none required' ac_cv_target=i386-unknown-netbsdelf1.6.1 ac_cv_target_alias=i386-unknown-netbsdelf1.6.1 ac_cv_type_size_t=yes am_cv_CC_dependencies_compiler_type=gcc
## ----------- ## ## confdefs.h. ## ## ----------- ##
#define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define PACKAGE "iftop" #define VERSION "0.16" #define IFTOP_VERSION "0.16" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_STDINT_H 1 #define HAVE_UNISTD_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_SOCKIO_H 1 #define HAVE_UNISTD_H 1 #define TIME_WITH_SYS_TIME 1 #define HAVE_REGCOMP 1 #define HAVE_SELECT 1 #define HAVE_STRDUP 1 #define HAVE_STRERROR 1 #define HAVE_STRSPN 1 #define HAVE_INET_ATON 1 #define HAVE_INET_PTON 1 #define SIZEOF_U_INT8_T 1 #define SIZEOF_U_INT16_T 2 #define SIZEOF_U_INT32_T 4 #define USE_FORKING_RESOLVER 1 #define HAVE_LIBPCAP 1 #define HAVE_PCAP_H 1
configure: exit 1
On Sun, Mar 07, 2004 at 12:04:45PM -0600, John Thompson wrote:
On Sun, 07 Mar 2004 15:38:29 +0000 Paul Warren pdw@ex-parrot.com wrote:
Sorry for the delay in repling, I've only just had a chance to look at this. I think I need to see more of your config.log. configure should attempt to compile a test program in 12 different ways. I suspect that at least one of those is actually compiling and it's the test program that's failing. Can you post the rest of the file?
Certainly:
OK, so it doesn't like the -pthread option, and it can't find libpthread. What does:
locate libpthread
tell you? If that reveals libpthread to be in a non-standard location, try doing:
export CPPFLAGS=-L/some/wierd/directory
before running configure.
Paul
On Sun, 07 Mar 2004 20:46:46 +0000 Paul Warren pdw@ex-parrot.com wrote:
On Sun, Mar 07, 2004 at 12:04:45PM -0600, John Thompson wrote:
On Sun, 07 Mar 2004 15:38:29 +0000 Paul Warren pdw@ex-parrot.com wrote:
Sorry for the delay in repling, I've only just had a chance to look at this. I think I need to see more of your config.log. configure should attempt to compile a test program in 12 different ways. I suspect that at least one of those is actually compiling and it's the test program that's failing. Can you post the rest of the file?
Certainly:
OK, so it doesn't like the -pthread option, and it can't find libpthread. What does:
locate libpthread
tell you?
bash-2.05b# locate libpthread /usr/pkg/pthreads/lib/libpthread.a /usr/pkg/pthreads/lib/libpthread.so /usr/pkg/pthreads/lib/libpthread.so.1 /usr/pkg/pthreads/lib/libpthread.so.1.60
If that reveals libpthread to be in a non-standard location, try doing:
export CPPFLAGS=-L/some/wierd/directory
before running configure.
No joy:
bash-2.05b# export CPPFLAGS=-L/usr/pkg/pthreads/lib bash-2.05b# ./configure
[...]
checking for library containing getnameinfo... none required checking for library containing gethostbyaddr_r... no checking for library containing gethostbyaddr... none required checking where to find pcap.h... /include checking for pcap_open_live in -lpcap... yes checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... no idea configure: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up.
bash-2.05b#
On Sun, Mar 07, 2004 at 05:36:28PM -0600, John Thompson wrote:
If that reveals libpthread to be in a non-standard location, try doing:
export CPPFLAGS=-L/some/wierd/directory
before running configure.
Sorry, my mistake, that should be LDFLAGS, not CPPFLAGS. If that still doesn't work, can you include the output from config.log with that option set.
thanks,
Paul