Debian Bug report logs - #605236
FTBFS on GNU/kFreeBSD

version graph

Package: fprobe; Maintainer for fprobe is Radu Spineanu <radu@debian.org>; Source for fprobe is src:fprobe.

Reported by: Guillaume Delacour <gui@iroqwa.org>

Date: Sun, 28 Nov 2010 12:00:02 UTC

Severity: important

Tags: patch

Found in version fprobe/1.1-7.2

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-bsd@lists.debian.org, Radu Spineanu <radu@debian.org>:
Bug#605236; Package fprobe. (Sun, 28 Nov 2010 12:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillaume Delacour <gui@iroqwa.org>:
New Bug report received and forwarded. Copy sent to debian-bsd@lists.debian.org, Radu Spineanu <radu@debian.org>. (Sun, 28 Nov 2010 12:00:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Guillaume Delacour <gui@iroqwa.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: FTBFS on GNU/kFreeBSD
Date: Sun, 28 Nov 2010 12:58:09 +0100
[Message part 1 (text/plain, inline)]
Package: fprobe
Version: 1.1-7.2
Severity: serious
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

The package fprobe fails to build on kfreebsd-* and applying the attached patch
seems to be sufficient to build this package fine.

However, fprobe fails to bind on kfreebsd-*:

# fprobe -i em0 localhost:555
bind(): Invalid argument

I've started to track down the problem in src/fprobe.c but any other help could be appreciated.

- -- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-26-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJM8kPNAAoJEJmGUYuaqqClL8cQAJ8DoQnyVxZDq1BpPPK3zTvY
25ifU/Ic2OVaR2W01BLv4IS4WDTLSOn2Y7EEq7QlfMZ+Cp78gGTxKlMf/LZtbJSh
4be7/fbB9Y9xXl/mRB7F3ZkCX2td//7q63HJlWAG8H/sIzfxEGh2RQpeJN9dar1+
mgHvK90TLwYtMn6r85VfnLMT3kZWQ9seiIY5yTek0bKWw/KrliNTZ1WrUojHM/07
e46JeEU5IND5EwOdh0P+/P6AjzKnmT0lORhct9p4tISgYH3eJ0FE2FWwcWtItgVD
JvXOdKgnxnOBlgKO/XaXSfv/M6wB9lHytdiUogM1wjdXKPtGZNDh6GvViRJXoT+k
ZbE/iGqqLPZxkotyJLvRapgzhXzNLDRh/rbzNxAuFcL13+fDOo63oBmskQP0ZRUG
ulz0TYi16jT9TpQ0VkhSJOOBvW4gLR24VUF6DIct4Y7QIWKlWo8htEkGZZQ+/27z
s7M9/1IB6BJl3yGW5COgzZ+SQKXDaBkY/8eS4PuPbjOLv5YnGMikr6Ss0YASNgvt
4GSNMVutW+4l/MSsUuzynSWmTk5bYwunut9IwVVj9tWusj0mZIkaAtKzxYkDNNu2
YKC1MipxSD0lEuyyIzVcI5++OeZj2yxINwkanG8/KxqgaXOCJdG1HV/4hjxVTi1Z
/uMr/ACeRcFn0RIDK+jZ
=fz5B
-----END PGP SIGNATURE-----
[ftbfs_fprobe.diff (text/x-c, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Radu Spineanu <radu@debian.org>:
Bug#605236; Package fprobe. (Sun, 28 Nov 2010 22:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mehdi Dogguy <mehdi@dogguy.org>:
Extra info received and forwarded to list. Copy sent to Radu Spineanu <radu@debian.org>. (Sun, 28 Nov 2010 22:09:05 GMT) Full text and rfc822 format available.

Message #10 received at 605236@bugs.debian.org (full text, mbox):

From: Mehdi Dogguy <mehdi@dogguy.org>
To: Guillaume Delacour <gui@iroqwa.org>, 605236@bugs.debian.org
Subject: Re: Bug#605236: FTBFS on GNU/kFreeBSD
Date: Sun, 28 Nov 2010 23:02:46 +0100
severity 605236 important
thanks

On 11/28/2010 12:58 PM, Guillaume Delacour wrote:
> 
> Severity: serious
> 

I don't think that this should have an RC severity. fprobe is currently
uncompiled on kfreebsd-*.

Regards,

-- 
Mehdi Dogguy مهدي الدڤي
http://dogguy.org/




Severity set to 'important' from 'serious' Request was from Mehdi Dogguy <mehdi@dogguy.org> to control@bugs.debian.org. (Sun, 28 Nov 2010 22:09:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Radu Spineanu <radu@debian.org>:
Bug#605236; Package fprobe. (Tue, 30 Nov 2010 12:00:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mats Erik Andersson <mats.andersson@gisladisker.se>:
Extra info received and forwarded to list. Copy sent to Radu Spineanu <radu@debian.org>. (Tue, 30 Nov 2010 12:00:09 GMT) Full text and rfc822 format available.

Message #17 received at 605236@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 605236@bugs.debian.org
Cc: debian-bsd@lists.debian.org
Subject: Bug#605236: FTBFS: No address is being initialized.
Date: Tue, 30 Nov 2010 12:57:54 +0100
The problem is that the code 'src/fprobe.c:1350-1352' is never
executed, neither for GNU/Linux, nor for GNU/kFreeBSD. Thus the
address

   peers[npeers].laddr

is left as zero when assiving at the call to bind(3). In particular,

   peers[npeers].laddr.sin_family == 0   ( == AF_UNSPEC)

This is an acceptable wild card for bind(3) on GNU/Linux, but not
with GNU/kFreeBSD, as it demands and actually check that either
AF_INET, AF_INET6, AF_LOCAL, and possibly others are explictly given.
The value AF_UNSPEC (=0) is forbidden! Otherwise the call fails,
exactly as you have found out.

The conclusion is that the software is broken also on GNU/Linux,
given that a call

    ./src/fprobe -ieth0 localhost:2055

is correct, which seems plausible.

There is one remedy possible:

--- fprobe-1.1/src/fprobe.c.orig
+++ fprobe-1.1/src/fprobe.c
@@ -1326,6 +1326,7 @@
 		peers[npeers].sock = sock;
 		peers[npeers].type = PEER_MIRROR;
 		peers[npeers].laddr = saddr;
+		peers[npeers].laddr.sin_family = AF_INET;
 		peers[npeers].seq = 0;
 		if ((lhost = strchr(dport, '/'))) {
 			*lhost++ = 0;

Together with your obervation on __FAVOR_BSD, this new insertion
will produce an executable that starts a live deamon on kfreebsd-amd64
from the command line invokation you mentioned.


Best regards,
Mats Erik Andersson, DM incognito




Information forwarded to debian-bugs-dist@lists.debian.org, Radu Spineanu <radu@debian.org>:
Bug#605236; Package fprobe. (Tue, 14 Dec 2010 22:36:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mats Erik Andersson <mats.andersson@gisladisker.se>:
Extra info received and forwarded to list. Copy sent to Radu Spineanu <radu@debian.org>. (Tue, 14 Dec 2010 22:36:05 GMT) Full text and rfc822 format available.

Message #22 received at 605236@bugs.debian.org (full text, mbox):

From: Mats Erik Andersson <mats.andersson@gisladisker.se>
To: 605236@bugs.debian.org
Subject: The cause of FTBFS for GNU/kFreeBSD
Date: Tue, 14 Dec 2010 23:32:24 +0100
The configuration script is not written to discover
the possibility of compiling for GNU/kFreeBSD. Hence
the _BSD_SOURCE is never defines, as it is for GNU/Linux,
and hence neither is __FAVOR_BSD defined. Setting this
was the initial patch by Guillaume Delacour.

A more fundamental change would be to go into the Autotools
mechanism. The result compiles alright! An expert must
judge if "-phread" is the optimal alternative here.


--- fprobe-1.1.orig/configure.in
+++ fprobe-1.1/configure.in
@@ -39,6 +39,10 @@
 		AC_DEFINE_UNQUOTED(OS_SOLARIS, , OS type)
 		CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
 		;;
+	*-*-kfreebsd*)
+		AC_DEFINE_UNQUOTED(OS_FREEBSD, , OS type)
+		CFLAGS="$CFLAGS -D_BSD_SOURCE -pthread"
+		;;
 	*-*-freebsd*)
 		AC_DEFINE_UNQUOTED(OS_FREEBSD, , OS type)
 		CFLAGS="$CFLAGS -pthread"




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 13:16:39 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.