NetBSD Problem Report #43976

From www@NetBSD.org  Fri Oct 15 22:16:32 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id A576D63B916
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 15 Oct 2010 22:16:32 +0000 (UTC)
Message-Id: <20101015221632.3A31D63B11D@www.NetBSD.org>
Date: Fri, 15 Oct 2010 22:16:32 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: audio/sox link fails on i386-5.99.39
X-Send-Pr-Version: www-1.0

>Number:         43976
>Category:       pkg
>Synopsis:       audio/sox link fails on i386-5.99.39
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 15 22:20:01 +0000 2010
>Closed-Date:    Thu Nov 04 17:09:49 +0000 2010
>Last-Modified:  Thu Nov 04 17:09:49 +0000 2010
>Originator:     John D. Baker
>Release:        5.99.39/i386 ; pkgsrc-current
>Organization:
>Environment:
NetBSD shadow.bozonet.ntc 5.99.39 NetBSD 5.99.39 (SHADOW) #34: Wed Oct  6 15:47:32 CDT 2010  sysop@shadow.bozonet.ntc:/d0/nbsd/current/obj/i386/sys/arch/i386/compile/SHADOW i386

NetBSD fred.technoskunk.fur 5.99.39 NetBSD 5.99.39 (FRED) #50: Thu Oct  7 21:49:51 CDT 2010  sysop@fred.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/FRED i386

>Description:
Building audio/sox on i386-5.99.39 fails to link with:

[...]
/bin/sh ../libtool --silent --tag=CC  --silent  --mode=link cc -Wconversion -O2 -I/usr/pkg/include -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wstrict-prototypes -pedantic   -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -o sox sox.o  libsox.la                         -lm
./.libs/libsox.so: undefined reference to `open_memstream'
*** Error code 1

Stop.
make: stopped in /d0/build/pkgsrc/audio/sox/work/sox-14.3.1/src
[...]

>How-To-Repeat:
Attempt to build audio/sox on i386-5.99.39.

For reference, it builds fine on i386-5.1_RC4.

>Fix:
The culprit seems to be a typographical error in

  ...work/sox-14.3.1/src/formats.c

[...]
      ft->fp =
#ifdef HAVE_FMEMOPEN
        buffer? fmemopen(buffer, buffer_size, "w+b") :
        buffer_ptr? open_memstream(buffer_ptr, buffer_size_ptr) :
#endif
        fopen(path, "w+b");
[...]

Since "fmemopen(3)" is in -current but not in netbsd-5, it builds on
the netbsd-5 branch, but trips up on this in -current.

The only function prototypes/definitions with "open_memstream" in
the name is "open_memstream_write()", so I'd assume this is what was
intended.

This is really an upstream problem, however.

>Release-Note:

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43976: audio/sox link fails on i386-5.99.39
Date: Fri, 15 Oct 2010 17:24:18 -0500 (CDT)

 Or not.

 Changing "open_memstream" to "open_memstream_write" results in an
 undefined reference to "open_memstream_write" in libsox.so .

 So maybe there's other magic going on...

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Iain Hibbert <plunky@rya-online.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43976: audio/sox link fails on i386-5.99.39
Date: Sun, 24 Oct 2010 12:49:25 +0100 (BST)

 The problem is that NetBSD-current now has fmemopen(3) but not (yet?) the
 open_memstream(3) function, and that sox autoconfig assumed that the two
 exist together..

 http://www.opengroup.org/onlinepubs/9699919799/functions/open_memstream.html

 regards,
 iain


State-Changed-From-To: open->closed
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Thu, 04 Nov 2010 17:09:49 +0000
State-Changed-Why:
this was fixed on 2010/10/30 (noticed by Iain Hibbert)


>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.