NetBSD Problem Report #43577

From kre@munnari.OZ.AU  Wed Jul  7 11:01:29 2010
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 4411963BA43
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  7 Jul 2010 11:01:29 +0000 (UTC)
Message-Id: <201007071101.o67B1KlL028500@jade.coe.psu.ac.th>
Date: Wed, 7 Jul 2010 18:01:20 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: graphics/ov519view graphics/cpia2view graphics/cnxtview all fail to compile with jpeg-8b (NetBSD 4.0/i386)
X-Send-Pr-Version: 3.95

>Number:         43577
>Category:       pkg
>Synopsis:       graphics/ov519view graphics/cpia2view graphics/cnxtview all fail to compile with jpeg-8b (NetBSD 4.0/i386)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 07 11:05:00 +0000 2010
>Closed-Date:    Mon Feb 10 11:54:08 +0000 2014
>Last-Modified:  Mon Feb 10 11:54:08 +0000 2014
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   (pkgsrc current 2010-07-07)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 kre@jade.coe.psu.ac.th:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
	It appears that jpeg-8b changed the prototype of the new
	function declaration added in jpeg8 (jpeg_mem_src) by altering
	the type of the 3rd arg from size_t (in jpeg-8) to unsigned long (8b).

	To me, that kind of API change looks like it should deserve a
	major version bump in the library, as those types are not necessarily
	even slightly compatible, but ...

	Because of that, the three packages (that I know of) that
	declare their own jpeg_mem_src() functions (which all broke
	when jpeg-8 appeared (see PRs 42698 42699 42700), have all
	broken again...

	This time just one PR (this) for all three of them, they are
		graphics/ov519view
		graphics/cpia2view
		graphics/cnxtview

	They're all ery similar source, and look to have a common origin,
	so I am assuming they will all be fixed together.


>How-To-Repeat:
	Pick any of the three, attempt to build it with jpeg-8b,
	and expect to see (something like) ...

#   compile  ov51x-1.65-1.11-mark/jpeg_decode.o
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include/gtk-1.2 -I/usr/pkg/include/glib/glib-1.2 -I/usr/pkg/lib/glib/include -I/usr/pkg/include/gtk-1.2 -I/usr/pkg/include/glib/glib-1.2 -I/usr/pkg/lib/glib/include -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include     -I/usr/pkg/include -I/usr/include    -c    jpeg_decode.c
jpeg_decode.c:86: error: conflicting types for 'jpeg_mem_src'
/pkg_comp/obj/pkgsrc/graphics/ov519view/4x/.buildlink/include/jpeglib.h:959: error: previous declaration of 'jpeg_mem_src' was here
*** Error code 1

Stop.
make: stopped in /pkg_comp/obj/pkgsrc/graphics/ov519view/4x/ov51x-1.65-1.11-mark
*** Error code 1

Stop.

	The conflicting types, as far as I could see, amounted entirely
	to the different 3rd arg in the prototype of the function (of course,
	I might also have just not spotted some other change...)

>Fix:
	Change these 3 to all use "unsigned long" as the 3rd arg type,
	instead of size_t (it's unlikely that will have any fallout, just
	changing the declaration - in each - should be sufficient).

	Then hope that the upstream idiots looking after graphics/jpeg
	don't do anything like this again...   (it is actually surprising,
	after so many years of jpeg6 being so good, that they'd mess up
	this badly).

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 17 Jul 2010 12:16:20 +0000
State-Changed-Why:
Feedback requested


From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/43577: graphics/ov519view graphics/cpia2view
 graphics/cnxtview all fail to compile with jpeg-8b (NetBSD 4.0/i386)
Date: Sat, 17 Jul 2010 14:15:59 +0200

 --a8Wt8u1KmwUX3Y2C
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 Does the attached patch fix the problem for you?

 I don't see the problem on amd64.
  Thomas

 --a8Wt8u1KmwUX3Y2C
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="ov.patch"

 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/graphics/ov519view/distinfo,v
 retrieving revision 1.4
 diff -u -r1.4 distinfo
 --- distinfo	22 Apr 2006 18:06:30 -0000	1.4
 +++ distinfo	17 Jul 2010 12:15:11 -0000
 @@ -11,3 +11,4 @@
  SHA1 (patch-ac) = c5c5aac3bc655f6c0c7ae0fa320a7f658374a841
  SHA1 (patch-ad) = 7c5031292c267209415c8cae296a05d56ed553eb
  SHA1 (patch-ae) = 1c3ab9021e9491ecf8a81f1d8007a99d20ed4268
 +SHA1 (patch-af) = 41089fe6d9630ebf18a26eaff10810164b9e8cdc
 Index: patches/patch-af
 ===================================================================
 RCS file: patches/patch-af
 diff -N patches/patch-af
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-af	17 Jul 2010 12:15:11 -0000
 @@ -0,0 +1,15 @@
 +$NetBSD$
 +
 +To match prototype from jpeg library on 32-bit platforms. PR/43577
 +
 +--- jpeg_decode.c.orig	2010-07-17 12:12:06.000000000 +0000
 ++++ jpeg_decode.c
 +@@ -82,7 +82,7 @@ term_mem_source (j_decompress_ptr cinfo)
 + 
 + 
 + GLOBAL(void)
 +-jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * source_ptr, size_t source_length)
 ++jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * source_ptr, unsigned long source_length)
 + {
 + 	mem_src_ptr src;
 +    

 --a8Wt8u1KmwUX3Y2C--

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43577: graphics/ov519view graphics/cpia2view graphics/cnxtview all fail to compile with jpeg-8b (NetBSD 4.0/i386)
Date: Sun, 18 Jul 2010 07:00:58 +0700

     Date:        Sat, 17 Jul 2010 12:20:06 +0000 (UTC)
     From:        Thomas Klausner <wiz@NetBSD.org>
     Message-ID:  <20100717122006.5D85363BAE7@www.NetBSD.org>

   |  Does the attached patch fix the problem for you?

 It does indeed, thanks - and patches for the other two would be
 almost identical.   I would have generated and sent patches for
 these, as I did last time, but last time the patches were not needed
 as the packages were all upgraded to versions that handled the
 new jpeg library requirements instead - I was expecting that to
 probably happen (reasonably quickly) to them this time as well...

 kre

Responsible-Changed-From-To: pkg-manager->hamajima
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 18 Jul 2010 09:43:31 +0000
Responsible-Changed-Why:
Over to ov519view maintainer  - possible patch in PR.


State-Changed-From-To: feedback->analyzed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 20 Jul 2010 09:49:54 +0000
State-Changed-Why:
Feedback supplied, fix included.


Responsible-Changed-From-To: hamajima->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 15 Apr 2012 22:03:59 +0000
Responsible-Changed-Why:
back to role account, hamajima resigned


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43577 CVS commit: pkgsrc/graphics/cpia2view
Date: Mon, 10 Feb 2014 11:43:09 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Mon Feb 10 11:43:09 UTC 2014

 Modified Files:
 	pkgsrc/graphics/cpia2view: distinfo
 Added Files:
 	pkgsrc/graphics/cpia2view/patches: patch-jpeg__decode.c

 Log Message:
 Fixes build for the case size_t != unsigned long.

 PR pkg/43577.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/graphics/cpia2view/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/cpia2view/patches/patch-jpeg__decode.c

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

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43577 CVS commit: pkgsrc/graphics/cnxtview
Date: Mon, 10 Feb 2014 11:46:55 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Mon Feb 10 11:46:55 UTC 2014

 Modified Files:
 	pkgsrc/graphics/cnxtview: distinfo
 Added Files:
 	pkgsrc/graphics/cnxtview/patches: patch-jpeg__decode.c

 Log Message:
 Fixes build with jpeg>=8 for the case size_t != unsigned long.

 PR pkg/43577.


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/graphics/cnxtview/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/cnxtview/patches/patch-jpeg__decode.c

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

State-Changed-From-To: analyzed->closed
State-Changed-By: obache@NetBSD.org
State-Changed-When: Mon, 10 Feb 2014 11:54:08 +0000
State-Changed-Why:
graphics/ov519view: had been removed from pkgsrc.
graphics/cpia2view: fixed.
graphics/cnxtview: fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.