Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 384031

Summary: net-analyzer/pchar[pcap] fails to build (possibly glibc version related)
Product: Gentoo Linux Reporter: Amitav <amitavmohanty01>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph, treecleaner
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Amitav 2011-09-21 22:59:24 UTC
I have installed pchar-1.5 and it is working fine. However, when I turned the pcap USE flag on, it failed to compile with the following error message.

* ERROR: net-analyzer/pchar-1.5 failed (install phase):
 *   einstall failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_install
 *   environment, line 2782:  Called einstall
 *     ebuild.sh, line  605:  Called die
 * The specific snippet of code:
 *   		${MAKE:-make} prefix="${D}usr" \
 *   			datadir="${D}usr/share" \
 *   			infodir="${D}usr/share/info" \
 *   			localstatedir="${D}var/lib" \
 *   			mandir="${D}usr/share/man" \
 *   			sysconfdir="${D}etc" \
 *   			${LOCAL_EXTRA_EINSTALL} \
 *   			${MAKEOPTS} ${EXTRA_EMAKE} -j1 \
 *   			"$@" install || die "einstall failed"
 * 
 * If you need support, post the output of 'emerge --info =net-analyzer/pchar-1.5',
 * the complete build log and the output of 'emerge -pqv =net-analyzer/pchar-1.5'.
 * The complete build log is located at '/var/tmp/portage/net-analyzer/pchar-1.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/pchar-1.5/temp/environment'.
 * S: '/var/tmp/portage/net-analyzer/pchar-1.5/work/pchar-1.5'

Reproducible: Always

Steps to Reproduce:
emerge pchar with pcap USE flag on
Actual Results:  
compilation fails

Expected Results:  
compilation should be successful

emerge pchar
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-analyzer/pchar-1.5
 * pchar-1.5.tar.gz RMD160 SHA1 SHA256 size ;-) ...                      [ ok ]
>>> Unpacking source...
>>> Unpacking pchar-1.5.tar.gz to /var/tmp/portage/net-analyzer/pchar-1.5/work
 * Applying pchar-1.5-snmp.patch ...                                     [ ok ]
 * Running eautoreconf in '/var/tmp/portage/net-analyzer/pchar-1.5/work/pchar-1.5' ...
 * Running autoconf ...                                                  [ ok ]
>>> Source unpacked in /var/tmp/portage/net-analyzer/pchar-1.5/work
>>> Compiling source in /var/tmp/portage/net-analyzer/pchar-1.5/work/pchar-1.5 ...
 * econf: updating pchar-1.5/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating pchar-1.5/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --without-suid --with-ipv6 --without-snmp --with-pcap
creating cache ./config.cache
checking host system type... x86_64-pc-linux-gnu
checking for mawk... no
checking for gawk... gawk
checking for c++... c++
checking whether the C++ compiler (c++ -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed) works... yes
checking whether the C++ compiler (c++ -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pchar version number... 1.5
checking echo functionality...  BSD-style
checking size of bool... 1
checking for socklen_t... yes
checking how to run the C++ preprocessor... c++ -E
checking for ANSI C header files... yes
checking for unistd.h... yes
checking for strings.h... yes
checking if sockaddr struct has sa_len member... no
checking for gethostbyname... yes
checking for socket... yes
checking for putmsg in -lstr... no
checking for herror... yes
checking for snprintf... yes
checking for log in -lm... yes
checking for IPv6 support... yes
checking for inet_pton in -linet6... no
checking for UCD SNMP support... no
checking for LBL pcap support... yes
checking for pcap_open_live in -lpcap... yes
checking for BPF support... no
checking for SUID root build... no
checking for OS-specific requirements... none
updating cache ./config.cache
creating ./config.status
creating Makefile
creating Makefile.depend
>>> Source compiled.
>>> Test phase [not enabled]: net-analyzer/pchar-1.5

>>> Install pchar-1.5 into /var/tmp/portage/net-analyzer/pchar-1.5/image/ category net-analyzer
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c main.cc -o main.o
In file included from PctestIpv4Udp.h:40,
                 from main.cc:50:
PctestIpv4.h: In member function 'virtual char* PctestIpv4::GetAddressFamilyString()':
PctestIpv4.h:80: warning: deprecated conversion from string constant to 'char*'
In file included from PctestIpv6Icmp.h:44,
                 from main.cc:56:
PctestIpv6.h: In member function 'virtual char* PctestIpv6::GetAddressFamilyString()':
PctestIpv6.h:85: warning: deprecated conversion from string constant to 'char*'
main.cc: In function 'char* GetPrintableNetworkProtocol(NetworkProtocolType)':
main.cc:299: warning: deprecated conversion from string constant to 'char*'
main.cc:302: warning: deprecated conversion from string constant to 'char*'
main.cc:305: warning: deprecated conversion from string constant to 'char*'
main.cc:308: warning: deprecated conversion from string constant to 'char*'
main.cc:311: warning: deprecated conversion from string constant to 'char*'
main.cc:315: warning: deprecated conversion from string constant to 'char*'
main.cc:318: warning: deprecated conversion from string constant to 'char*'
main.cc:321: warning: deprecated conversion from string constant to 'char*'
main.cc:324: warning: deprecated conversion from string constant to 'char*'
main.cc:328: warning: deprecated conversion from string constant to 'char*'
main.cc: In function 'int main(int, char**)':
main.cc:374: warning: too few arguments for format
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c Kendall.cc -o Kendall.o
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c Pctest.cc -o Pctest.o
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c PctestIpv4.cc -o PctestIpv4.o
In file included from PctestIpv4.cc:31:
PctestIpv4.h: In member function 'virtual char* PctestIpv4::GetAddressFamilyString()':
PctestIpv4.h:80: warning: deprecated conversion from string constant to 'char*'
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c PctestIpv4File.cc -o PctestIpv4File.o
In file included from PctestIpv4File.h:40,
                 from PctestIpv4File.cc:31:
PctestIpv4.h: In member function 'virtual char* PctestIpv4::GetAddressFamilyString()':
PctestIpv4.h:80: warning: deprecated conversion from string constant to 'char*'
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c PctestIpv4Udp.cc -o PctestIpv4Udp.o
In file included from PctestIpv4Udp.h:40,
                 from PctestIpv4Udp.cc:30:
PctestIpv4.h: In member function 'virtual char* PctestIpv4::GetAddressFamilyString()':
PctestIpv4.h:80: warning: deprecated conversion from string constant to 'char*'
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c PctestIpv4Raw.cc -o PctestIpv4Raw.o
In file included from PctestIpv4Udp.h:40,
                 from PctestIpv4Raw.h:40,
                 from PctestIpv4Raw.cc:34:
PctestIpv4.h: In member function 'virtual char* PctestIpv4::GetAddressFamilyString()':
PctestIpv4.h:80: warning: deprecated conversion from string constant to 'char*'
c++ -O2 -pipe -march=native -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_PCAP=1 -DHAVE_LIBPCAP=1  -c PctestIpv4Tcp.cc -o PctestIpv4Tcp.o
In file included from PctestIpv4Tcp.h:40,
                 from PctestIpv4Tcp.cc:34:
PctestIpv4.h: In member function 'virtual char* PctestIpv4::GetAddressFamilyString()':
PctestIpv4.h:80: warning: deprecated conversion from string constant to 'char*'
PctestIpv4Tcp.cc: In member function 'virtual int PctestIpv4Tcp::Test(TestRecord&)':
PctestIpv4Tcp.cc:174: error: 'struct tcphdr' has no member named 'th_sport'
PctestIpv4Tcp.cc:175: error: 'struct tcphdr' has no member named 'th_dport'
PctestIpv4Tcp.cc:176: error: 'struct tcphdr' has no member named 'th_seq'
PctestIpv4Tcp.cc:177: error: 'struct tcphdr' has no member named 'th_ack'
PctestIpv4Tcp.cc:184: error: 'struct tcphdr' has no member named 'th_off'
PctestIpv4Tcp.cc:186: error: 'struct tcphdr' has no member named 'th_flags'
PctestIpv4Tcp.cc:186: error: 'TH_FIN' was not declared in this scope
PctestIpv4Tcp.cc:186: error: 'TH_ACK' was not declared in this scope
PctestIpv4Tcp.cc:187: error: 'struct tcphdr' has no member named 'th_win'
PctestIpv4Tcp.cc:188: error: 'struct tcphdr' has no member named 'th_sum'
PctestIpv4Tcp.cc:189: error: 'struct tcphdr' has no member named 'th_urp'
PctestIpv4Tcp.cc:220: error: 'struct tcphdr' has no member named 'th_sum'
PctestIpv4Tcp.cc:377: error: 'struct tcphdr' has no member named 'th_dport'
PctestIpv4Tcp.cc:377: error: 'struct tcphdr' has no member named 'th_sport'
PctestIpv4Tcp.cc:378: error: 'struct tcphdr' has no member named 'th_sport'
PctestIpv4Tcp.cc:378: error: 'struct tcphdr' has no member named 'th_dport'
make: *** [PctestIpv4Tcp.o] Error 1
Comment 1 Agostino Sarubbo gentoo-dev 2011-09-22 07:42:29 UTC
fail for me also with -pcap
Comment 2 Amitav 2011-09-24 07:14:36 UTC
I am successfully using pchar without pcap. What issues are you having during compilation?
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-08-20 03:39:32 UTC
The problem is that pchar is using BSD-style tcphdr structure, but GLIBC is exposing to it the Linux-style instead. See http://en.wikipedia.org/wiki/Tcphdr .
Comment 4 Larry the Git Cow gentoo-dev 2020-01-18 14:07:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7caf6f85060d2da59b2bf4b1b42e4cfd34cec40e

commit 7caf6f85060d2da59b2bf4b1b42e4cfd34cec40e
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2020-01-18 14:06:56 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2020-01-18 14:06:56 +0000

    package.mask: Last rite net-analyzer/pchar
    
    Bug: https://bugs.gentoo.org/384031
    Signed-off-by: David Seifert <soap@gentoo.org>

 profiles/package.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-02-21 19:14:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a601616a5ef999439bfe0b3d70e36bd590a0986

commit 2a601616a5ef999439bfe0b3d70e36bd590a0986
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-02-21 19:11:28 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-02-21 19:12:45 +0000

    net-analyzer/pchar: Remove last-rited pkg
    
    Closes: https://bugs.gentoo.org/384031
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 net-analyzer/pchar/Manifest                   |  1 -
 net-analyzer/pchar/files/pchar-1.5-snmp.patch | 24 ---------------
 net-analyzer/pchar/metadata.xml               | 17 -----------
 net-analyzer/pchar/pchar-1.5-r1.ebuild        | 42 ---------------------------
 profiles/package.mask                         |  5 ----
 5 files changed, 89 deletions(-)