NetBSD Problem Report #47308

From www@NetBSD.org  Tue Dec 11 06:56:46 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 20B2463E848
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 11 Dec 2012 06:56:46 +0000 (UTC)
Message-Id: <20121211065644.A96D263E848@www.NetBSD.org>
Date: Tue, 11 Dec 2012 06:56:44 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: sane-backends DragonFly kodakaio.c:698: error: 'SOL_SOCKET' undeclared
X-Send-Pr-Version: www-1.0

>Number:         47308
>Category:       pkg
>Synopsis:       sane-backends DragonFly kodakaio.c:698: error: 'SOL_SOCKET' undeclared
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 11 07:00:01 +0000 2012
>Closed-Date:    Thu Dec 13 09:06:36 +0000 2012
>Last-Modified:  Thu Dec 13 15:40:05 +0000 2012
>Originator:     David Shao
>Release:        DragonFly  3.3-DEVELOPMENT x86_64
>Organization:
>Environment:
DragonFly  3.3-DEVELOPMENT x86_64
>Description:
DragonFly 3-3-DEVELOPMENT x86_64 as of master
commit 1e058a4369b9e46deb9a78083d554f9a37d4600e
Date:   Sat Dec 8 09:55:02 2012 +0100

pkgsrc current master as of
commit 239e9e1b5810b45db478da00247d1fe274ed8a9b
Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
Date:   Mon Dec 10 18:27:47 2012 -0800

# pkg_rolling-replace -uv

RR> Selecting sane-backends (graphics/sane-backends) as next package to replace
RR> Replacing sane-backends-1.0.22nb3
...
The supported build options for sane-backends are:

        inet6 snmp

The currently selected options are:

        inet6
...
===> Patching for sane-backends-1.0.23
=> Applying pkgsrc patches for sane-backends-1.0.23
  I can't seem to find a patch in there anywhere.
...
checking for LIBV4L... no
checking for sane_init in -lsane... no
Not including SNMP support
configure: WARNING: *** Warning: net-snmp library disabled, autodetecting network scanners will not be supported.
checking for ANSI C header files... (cached) yes
...
checking for getopt_long... yes
usage: nl [-p] [-b type] [-d delim] [-f type] [-h type] [-i incr] [-l num]
        [-n format] [-s sep] [-v startnum] [-w width] [file]
checking for cups
cups.h not found, you may want to install a cups development package
in order to autodetect network scanners in kodakaio.
checking usb.h usability... yes
...
*** canon_pp backend requires libieee1284 library - disabling
*** gphoto2 backend requires gphoto2 and JPEG libraries - disabling
*** hpsj5s backend requires libieee1284 library - disabling
*** kvs40xx backend requires pthread library - disabling
*** mustek_pp backend requires libieee1284 and paraport-directio libraries - disabling
*** mustek_usb2 backend requires pthread library - disabling
*** pint backend requires sys/scanio.h - disabling
*** qcam backend requires ioperm and portaccess functions - disabling
*** v4l backend requires v4l libraries - disabling
*** pnm backend not manually selected - disabling
...
-> Network parameters:
Build saned:   yes
IPv6 support:  yes
Avahi support: no
SNMP support:  no
CUPS support:  no
-> The following backends will be built:
abaton agfafocus apple artec artec_eplus48u as6e avision bh canon canon630u canon_dr cardscan coolscan coolscan2 coolscan3 dc25 dc210 dc240 dell1600n_net dmc epjitsu epson epson2 fujitsu genesys gt68xx hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hs2p ibm kodak kodakaio kvs1025 kvs20xx leo lexmark ma1509 magicolor matsushita microtek microtek2 mustek mustek_usb nec net niash pie pixma plustek plustek_pp ricoh rts8891 s9036 sceptre sharp sm3600 sm3840 snapscan sp15c st400 stv680 tamarack teco1 teco2 teco3 test u12 umax umax_pp umax1220u xerox_mfp p5 
...
ln -s ./stubs.c kodakaio-s.c
/bin/sh ../libtool --silent  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../include/sane -I/usr/local/include -I. -I. -I../include -I../include -DLIBDIR="/usr/pkg/lib/sane" -DBACKEND_NAME=kodakaio -I/usr/pkg/include -I/usr/include -DPATH_SANE_CONFIG_DIR=/usr/pkg/share/examples/sane         -DPATH_SANE_DATA_DIR=/usr/pkg/share    -DPATH_SANE_LOCK_DIR=/usr/pkg/var/lock/sane      -DV_MAJOR=1 -DV_MINOR=0  -g -I/usr/pkg/include -I/usr/include -W -Wall -MT libsane_kodakaio_la-kodakaio-s.lo -MD -MP -MF .deps/libsane_kodakaio_la-kodakaio-s.Tpo -c -o libsane_kodakaio_la-kodakaio-s.lo `test -f 'kodakaio-s.c' || echo './'`kodakaio-s.c
mv -f .deps/libsane_kodakaio_la-kodakaio-s.Tpo .deps/libsane_kodakaio_la-kodakaio-s.Plo
/bin/sh ../libtool --silent  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../include/sane -I/usr/local/include -I. -I. -I../include -I../include -DLIBDIR="/usr/pkg/lib/sane" -DBACKEND_NAME=kodakaio -I/usr/pkg/include -I/usr/include -DPATH_SANE_CONFIG_DIR=/usr/pkg/share/examples/sane         -DPATH_SANE_DATA_DIR=/usr/pkg/share    -DPATH_SANE_LOCK_DIR=/usr/pkg/var/lock/sane      -DV_MAJOR=1 -DV_MINOR=0  -g -I/usr/pkg/include -I/usr/include -W -Wall -MT libkodakaio_la-kodakaio.lo -MD -MP -MF .deps/libkodakaio_la-kodakaio.Tpo -c -o libkodakaio_la-kodakaio.lo `test -f 'kodakaio.c' || echo './'`kodakaio.c
kodakaio.c: In function 'kodakaio_net_read':
kodakaio.c:646: warning: suggest parentheses around assignment used as truth value
kodakaio.c:666: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
kodakaio.c: In function 'sanei_kodakaio_net_open':
kodakaio.c:698: warning: implicit declaration of function 'setsockopt'
kodakaio.c:698: error: 'SOL_SOCKET' undeclared (first use in this function)
kodakaio.c:698: error: (Each undeclared identifier is reported only once
kodakaio.c:698: error: for each function it appears in.)
kodakaio.c:698: error: 'SO_RCVTIMEO' undeclared (first use in this function)
kodakaio.c: In function 'cmd_start_scan':
kodakaio.c:968: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
kodakaio.c: In function 'extract_from_id':
kodakaio.c:2091: warning: format '%d' expects type 'int', but argument 3 has type 'long int'
kodakaio.c:2091: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
gmake[2]: *** [libkodakaio_la-kodakaio.lo] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/graphics/sane-backends/work/sane-backends-1.0.23/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/pkgsrc/graphics/sane-backends/work/sane-backends-1.0.23/backend'
gmake: *** [all-recursive] Error 1
*** Error code 2


>How-To-Repeat:
DragonFly 3-3-DEVELOPMENT x86_64 as of master
commit 1e058a4369b9e46deb9a78083d554f9a37d4600e
Date:   Sat Dec 8 09:55:02 2012 +0100

pkgsrc current master as of
commit 239e9e1b5810b45db478da00247d1fe274ed8a9b
Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
Date:   Mon Dec 10 18:27:47 2012 -0800

# pkg_rolling-replace -uv
>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Tue, 11 Dec 2012 07:03:39 +0000

 On Tue, Dec 11, 2012 at 07:00:02AM +0000, davshao@gmail.com wrote:
  > kodakaio.c:698: warning: implicit declaration of function 'setsockopt'
  > kodakaio.c:698: error: 'SOL_SOCKET' undeclared (first use in this function)
  > kodakaio.c:698: error: 'SO_RCVTIMEO' undeclared (first use in this function)

 Where does dfly keep these in its headers? Does this source file fail
 to include that header?

  > kodakaio.c:968: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

 also these are probably worth patching.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47308 CVS commit: pkgsrc/graphics/sane-backends
Date: Tue, 11 Dec 2012 16:32:36 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Tue Dec 11 16:32:36 UTC 2012

 Modified Files:
 	pkgsrc/graphics/sane-backends: distinfo
 Added Files:
 	pkgsrc/graphics/sane-backends/patches: patch-backend_kodakaio.c
 Removed Files:
 	pkgsrc/graphics/sane-backends/patches: patch-ad

 Log Message:
 Fix PR pkg/47308

 SOL_SOCKET etc. are defined in sys/socket.h on DragonFly.

 I have tested on DragonFly/i386 3.0.1.

 And remove empty patch file.


 To generate a diff of this commit:
 cvs rdiff -u -r1.34 -r1.35 pkgsrc/graphics/sane-backends/distinfo
 cvs rdiff -u -r1.7 -r0 pkgsrc/graphics/sane-backends/patches/patch-ad
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/graphics/sane-backends/patches/patch-backend_kodakaio.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Wed, 12 Dec 2012 01:33:59 +0900 (JST)

 Hi,

 >   > kodakaio.c:968: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
 >  
 >  also these are probably worth patching.

 I cannot find this warning on DragonFly/i386 3.0.1.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Tue, 11 Dec 2012 17:57:21 +0000

 On Tue, Dec 11, 2012 at 05:55:03PM +0000, Ryo ONODERA wrote:
  >>> kodakaio.c:968: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
  >>  
  >>  also these are probably worth patching.
  >  
  >  I cannot find this warning on DragonFly/i386 3.0.1.

 Right, it's caused by having 64-bit size_t.

 Changing the %d to %zu (or %zd if signed) for the cases that showed up
 in the original PR is sufficient. If you don't want to do that blind,
 I'll see to it eventually, but it'll take me a while.

 -- 
 David A. Holland
 dholland@netbsd.org

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Tue, 11 Dec 2012 10:24:44 -0800

 Thank you for the extremely rapid patch for the problem on DragonFly.
 I have not had the chance to test it yet on x86_64.

 For graphics/sane-backends, and perhaps others, I am wondering about
 configure apparently not detecting the presence of cups, in
 particular, the header file /usr/pkg/include/cups/cups.h.  It is this
 header file that when including other header files normally pulls in
 <sys/socket.h> on platforms where cups.h is detected, in particular,
 apparently for the file kodakaio.c.  Is this non-detection a problem
 specific to DragonFly?

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Tue, 11 Dec 2012 15:21:45 -0800

 commit 110bf0aaf5cc09d070b296c41bee41a308d2a545
 Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
 Date:   Tue Dec 11 12:28:42 2012 -0800

 on DragonFly 3.3-DEVELOPMENT x86_64 leads to:

 # pkg_rolling-replace -uv
 ...
 test -z "/usr/pkg/share/doc/sane-1.0.23" || ./install-sh -c -d
 "/usr/pkgsrc/graphics/sane-backends/work/.destdir/usr/pkg/share/doc/sane-1.0.23"
  /usr/bin/install -c -o root -g wheel -m 644 AUTHORS ChangeLog COPYING
 LICENSE NEWS PROBLEMS PROJECTS README README.aix README.beos
 README.darwin README.djpeg README.freebsd README.hp-ux README.linux
 README.netbsd README.openbsd README.os2 README.solaris
 README.unixware2 README.unixware7 README.windows README.zeta
 '/usr/pkgsrc/graphics/sane-backends/work/.destdir/usr/pkg/share/doc/sane-1.0.23'
 gmake[2]: Leaving directory
 `/usr/pkgsrc/graphics/sane-backends/work/sane-backends-1.0.23'
 gmake[1]: Leaving directory
 `/usr/pkgsrc/graphics/sane-backends/work/sane-backends-1.0.23'
 => Automatic manual page handling
 pkg_create: can't stat
 `/usr/pkgsrc/graphics/sane-backends/work/.destdir/usr/pkg/share/doc/sane-1.0.23/README.dragonfly'
 ===> Building binary package for sane-backends-1.0.23
 => Creating binary package /usr/pkgsrc/packages/All/sane-backends-1.0.23.tgz
 pkg_create: can't stat
 `/usr/pkgsrc/graphics/sane-backends/work/.destdir/usr/pkg/share/doc/sane-1.0.23/README.dragonfly'
 pkg_create: lstat failed for file
 share/doc/sane-1.0.23/README.dragonfly: No such file or directory
 *** Error code 2

 Stop.
 bmake: stopped in /usr/pkgsrc/graphics/sane-backends
 *** Error code 1

 Stop.
 bmake: stopped in /usr/pkgsrc/graphics/sane-backends
 *** 'make replace' failed for package sane-backends.
 *** Please read the errors listed above, fix the problem,
 *** then re-run pkg_rolling-replace to continue.
 - sane-backends

From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47308 CVS commit: pkgsrc/graphics/sane-backends
Date: Wed, 12 Dec 2012 08:40:27 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Wed Dec 12 08:40:27 UTC 2012

 Modified Files:
 	pkgsrc/graphics/sane-backends: PLIST

 Log Message:
 Fix PR pkg/47308

 Fix invalid PLIST subst.


 To generate a diff of this commit:
 cvs rdiff -u -r1.29 -r1.30 pkgsrc/graphics/sane-backends/PLIST

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Wed, 12 Dec 2012 23:01:48 -0800

 As of

 commit c0eb50857e068b35a9a8d650047ee9638df286b8
 Author: pkgsrc fixup <pkgsrc@dragonflybsd.org>
 Date:   Wed Dec 12 18:27:10 2012 -0800

 both graphics/sane-backends and graphics/libksane are cleanly built
 and replaced by
 # pkg_rolling-replace -uv

 on DragonFly x86_64.  Thanks!

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 13 Dec 2012 09:06:36 +0000
State-Changed-Why:
Confirmed fixed, thanks for the feedback!


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, dholland-pbugs@NetBSD.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Thu, 13 Dec 2012 18:39:48 +0900 (JST)

 Hi,

 From: David Holland <dholland-pbugs@NetBSD.org>, Date: Tue, 11 Dec 2012 18:00:11 +0000 (UTC)

 >   >>> kodakaio.c:968: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
 >   >>  
 >   >>  also these are probably worth patching.
 >   >  
 >   >  I cannot find this warning on DragonFly/i386 3.0.1.
 >  
 >  Right, it's caused by having 64-bit size_t.
 >  
 >  Changing the %d to %zu (or %zd if signed) for the cases that showed up
 >  in the original PR is sufficient. If you don't want to do that blind,
 >  I'll see to it eventually, but it'll take me a while.

 Please look at this.

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/47308: sane-backends DragonFly kodakaio.c:698: error:
 'SOL_SOCKET' undeclared
Date: Thu, 13 Dec 2012 15:35:38 +0000

 On Thu, Dec 13, 2012 at 11:00:10AM +0000, Ryo ONODERA wrote:
  >  >  Changing the %d to %zu (or %zd if signed) for the cases that showed up
  >  >  in the original PR is sufficient. If you don't want to do that blind,
  >  >  I'll see to it eventually, but it'll take me a while.
  >  
  >  Please look at this.
  >  
  >  Thank you.

 I'll do it this weekend.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.