NetBSD Problem Report #50988

From www@NetBSD.org  Mon Mar 21 03:01:44 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C76C77ABE6
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 21 Mar 2016 03:01:43 +0000 (UTC)
Message-Id: <20160321030141.BF9637ACB7@mollari.NetBSD.org>
Date: Mon, 21 Mar 2016 03:01:41 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: mplayer, gmplayer, mencoder build fails with "unrecognized relocation (0x2a) in section `.text'"
X-Send-Pr-Version: www-1.0

>Number:         50988
>Category:       pkg
>Synopsis:       mplayer, gmplayer, mencoder build fails with "unrecognized relocation (0x2a) in section `.text'"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 21 03:05:00 +0000 2016
>Closed-Date:    Sat Nov 19 17:55:08 +0000 2016
>Last-Modified:  Sat Nov 19 17:55:08 +0000 2016
>Originator:     John D. Baker
>Release:        NetBSD/amd64-7.0_STABLE, pkgsrc-HEAD (pre-pkgsrc-2016Q1)
>Organization:
>Environment:
NetBSD 7.0_STABLE amd64 x86_64

>Description:
Attempting to build "multimedia/mplayer", "multimedia/gmplayer", or
"multimedia/mencoder" fails during build with the following error:

[...]
ld: /tmp/ccJKkpO7.o: unrecognized relocation (0x2a) in section `.text'
ld: final link failed: Bad value
Makefile:752: recipe for target 'codec-cfg' failed
gmake: *** [codec-cfg] Error 1
gmake: *** Waiting for unfinished jobs....
*** Error code 2

Stop.
make[2]: stopped in /x/pkgsrc/multimedia/mencoder

The above example is from "multimedia/mencoder", but the same error
occurs when building any of the noted packages.

Re-running 'make' will elicit the error after different source files
but the error is the same every time.

Possibly related to using "devel/binutils" (binutils-2.26nb1)?
>How-To-Repeat:
S/A
>Fix:

>Release-Note:

>Audit-Trail:
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Sun, 20 Mar 2016 22:21:58 -0500 (CDT)

 Adding "CFLAGS+=-save-temps" reveals:

 [...]
 ld: codec-cfg.o: unrecognized relocation (0x2a) in section `.text'
 ld: final link failed: Bad value
 Makefile:752: recipe for target 'codec-cfg' failed

 -- 
 |/"\ 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: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Mon, 21 Mar 2016 11:08:50 +0100

 On Mon, Mar 21, 2016 at 03:05:00AM +0000, jdbaker@mylinuxisp.com wrote:
 > Possibly related to using "devel/binutils" (binutils-2.26nb1)?

 How/why are you using devel/binutils?
  Thomas

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Mon, 21 Mar 2016 05:46:36 -0500 (CDT)

 On Mon, 21 Mar 2016, Thomas Klausner wrote:

 >  On Mon, Mar 21, 2016 at 03:05:00AM +0000, jdbaker@mylinuxisp.com wrote:
 >  > Possibly related to using "devel/binutils" (binutils-2.26nb1)?
 >  
 >  How/why are you using devel/binutils?

 Because the package claims to require it:

 ===> Installing dependencies for mplayer-1.3.0
 [...]
 => Build dependency binutils>=2.22: found binutils-2.26nb1
 [...]

 Looking through a machine that has not started the update process
 reveals:

 $ grep binutil  /var/db/pkg/mplayer-1.2/+*  
 /var/db/pkg/mplayer-1.2/+CONTENTS:@blddep binutils-2.25.1

 and netbsd-7 in-tree binutils is 2.23.2.  So it's always required
 devel/binutils, it's just that the binutils-2.26 is being a pain?

 Perhaps its triggered by one of the options?  I have all but "debug"
 defined:

 [...]
 PKG_OPTIONS.mplayer+=aalib arts caca dts ggi mplayer-ssse3 #debug
 [...]

 -- 
 |/"\ 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: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Mon, 21 Mar 2016 05:52:29 -0500 (CDT)

 On Mon, 21 Mar 2016, John D. Baker wrote:

 > Because the package claims to require it:
 > 
 > ===> Installing dependencies for mplayer-1.3.0
 > [...]
 > => Build dependency binutils>=2.22: found binutils-2.26nb1
 > [...]
 > 
 > Looking through a machine that has not started the update process
 > reveals:
 > 
 > $ grep binutil  /var/db/pkg/mplayer-1.2/+*  
 > /var/db/pkg/mplayer-1.2/+CONTENTS:@blddep binutils-2.25.1
 > 
 > and netbsd-7 in-tree binutils is 2.23.2.  So it's always required
 > devel/binutils, it's just that the binutils-2.26 is being a pain?

 It's too early here (among other things).  Accoring to the build
 dependency, the in-tree binutils SHOULD be sufficient, but for some
 reason that's being ignored and devel/binutils is being built/used
 anyway.

 -- 
 |/"\ 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: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Mon, 21 Mar 2016 06:06:11 -0500 (CDT)

 On Mon, 21 Mar 2016, John D. Baker wrote:

 > > $ grep binutil  /var/db/pkg/mplayer-1.2/+*  
 > > /var/db/pkg/mplayer-1.2/+CONTENTS:@blddep binutils-2.25.1
 > > 
 > > and netbsd-7 in-tree binutils is 2.23.2.  So it's always required
 > > devel/binutils, it's just that the binutils-2.26 is being a pain?
 >
 > It's too early here (among other things).  Accoring to the build
 > dependency, the in-tree binutils SHOULD be sufficient, but for some
 > reason that's being ignored and devel/binutils is being built/used
 > anyway.

 A comprehensive search reveals that "mplayer" is the only package to
 register a build dependency on binutils-2.25.1 (binutils-2.26nb1) even
 though the messages at build time claim that any binutils >= 2.22 should
 be sufficient.

 -- 
 |/"\ 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: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Mon, 21 Mar 2016 06:29:00 -0500 (CDT)

 On Mon, 21 Mar 2016, John D. Baker wrote:

 > Perhaps its triggered by one of the options?  I have all but "debug"
 > defined:
 >
 > [...]
 > PKG_OPTIONS.mplayer+=aalib arts caca dts ggi mplayer-ssse3 #debug
 > [...]

 Looks like it's the "mplayer-ssse3" option that's triggering it.
 Excerpt from "multimedia/mplayer-share/options.mk":

 [...]
 .if !empty(PKG_OPTIONS:Mmplayer-ssse3)
 # needs a recent assembler
 .include "../../devel/binutils/buildlink3.mk"
 .include "../../devel/binutils/override-as.mk"
 .else
 CONFIGURE_ARGS+=	--disable-ssse3
 .endif
 [...]

 Removing the option removes the build dependency and the build completes.

 Commenting out the above ".include" directives from
 "multimedia/mplayer-share/options.mk" permits building with
 "mplayer-ssse3".

 So perhaps "devel/binutils" builtin detection is broken if >=2.22 is
 required but 2.23.2 is considered insufficient?

 -- 
 |/"\ 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: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, jdbaker@mylinuxisp.com
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Mon, 21 Mar 2016 21:08:14 +0900 (JST)

 From: "John D. Baker" <jdbaker@mylinuxisp.com>, Date: Mon, 21 Mar 2016 11:30:01 +0000 (UTC)

 > The following reply was made to PR pkg/50988; it has been noted by GNATS.
 > 
 > From: "John D. Baker" <jdbaker@mylinuxisp.com>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 >  "unrecognized relocation (0x2a) in section `.text'"
 > Date: Mon, 21 Mar 2016 06:29:00 -0500 (CDT)
 > 
 >  On Mon, 21 Mar 2016, John D. Baker wrote:
 >  
 >  > Perhaps its triggered by one of the options?  I have all but "debug"
 >  > defined:
 >  >
 >  > [...]
 >  > PKG_OPTIONS.mplayer+=aalib arts caca dts ggi mplayer-ssse3 #debug
 >  > [...]
 >  
 >  Looks like it's the "mplayer-ssse3" option that's triggering it.
 >  Excerpt from "multimedia/mplayer-share/options.mk":
 >  
 >  [...]
 >  .if !empty(PKG_OPTIONS:Mmplayer-ssse3)
 >  # needs a recent assembler
 >  .include "../../devel/binutils/buildlink3.mk"
 >  .include "../../devel/binutils/override-as.mk"
 >  .else
 >  CONFIGURE_ARGS+=	--disable-ssse3
 >  .endif
 >  [...]
 >  
 >  Removing the option removes the build dependency and the build completes.
 >  
 >  Commenting out the above ".include" directives from
 >  "multimedia/mplayer-share/options.mk" permits building with
 >  "mplayer-ssse3".
 >  
 >  So perhaps "devel/binutils" builtin detection is broken if >=2.22 is
 >  required but 2.23.2 is considered insufficient?

 Hi,

 From
 http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2009-July/169000.html
 binutils>=2.18 supports ssse3.

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

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Tue, 11 Oct 2016 09:21:37 -0500 (CDT)

 Test to see if I can append anything to this PR.

 I tried to send a message with a patch in it, but in three attempts, none
 have succeeded.  Maybe something is objecting to the patch content?

 -- 
 |/"\ 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: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with
 "unrecognized relocation (0x2a) in section `.text'"
Date: Wed, 12 Oct 2016 14:33:40 +0000

 On Tue, Oct 11, 2016 at 02:25:01PM +0000, John D. Baker wrote:
  >  Test to see if I can append anything to this PR.
  >  
  >  I tried to send a message with a patch in it, but in three attempts, none
  >  have succeeded.  Maybe something is objecting to the patch content?

 Odd. Gnats is normally happy to accept even MIME attachments (then it
 stores them in a form that requires manual unmangling to decode, but
 that's a separate problem...)

 Maybe try sending it to me directly?

 -- 
 David A. Holland
 dholland@netbsd.org

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails with"unrecognized
 relocation (0x2a) in section `.text'"
Date: Fri, 14 Oct 2016 20:52:27 -0500 (CDT)

 Restructuring a bit to see if this message will be allowed to pass.

 The following patch lets me build with "mplayer-ssse3" option on NetBSD 6
 and later for i386 and amd64 as the host binutils is of sufficent version.
 Not sure how to deal with non-NetBSD platforms.

 +Index: multimedia/mplayer-share/options.mk
 +===================================================================
 +RCS file: /cvsroot/pkgsrc/multimedia/mplayer-share/options.mk,v
 +retrieving revision 1.55
 +diff -u -p -r1.55 options.mk
 +--- multimedia/mplayer-share/options.mk	25 Feb 2016 15:49:44 -0000	1.55
 ++++ multimedia/mplayer-share/options.mk	30 Mar 2016 22:49:01 -0000
 +@@ -339,9 +339,11 @@ CONFIGURE_ARGS+=	--disable-xvid
 + .endif
 + 
 + .if !empty(PKG_OPTIONS:Mmplayer-ssse3)
 +-# needs a recent assembler
 +-.include "../../devel/binutils/buildlink3.mk"
 +-.include "../../devel/binutils/override-as.mk"
 ++.  if !empty(MACHINE_PLATFORM:MNetBSD-[0-5].*)
 ++     # needs a recent assembler
 ++.    include "../../devel/binutils/buildlink3.mk"
 ++.    include "../../devel/binutils/override-as.mk"
 ++.  endif
 + .else
 + CONFIGURE_ARGS+=	--disable-ssse3
 + .endif

 -- 
 |/"\ 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: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50988 CVS commit: pkgsrc/multimedia/mplayer-share
Date: Sat, 19 Nov 2016 17:43:39 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sat Nov 19 17:43:38 UTC 2016

 Modified Files:
 	pkgsrc/multimedia/mplayer-share: options.mk

 Log Message:
 Add patch from John D. Baker with a workaround for PR 50988: netbsd 6
 and up don't require binutils from pkgsrc for ssse3 to work, so don't
 request it.


 To generate a diff of this commit:
 cvs rdiff -u -r1.55 -r1.56 pkgsrc/multimedia/mplayer-share/options.mk

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

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50988: mplayer, gmplayer, mencoder build fails
 with"unrecognized relocation (0x2a) in section `.text'"
Date: Sat, 19 Nov 2016 17:46:30 +0000

 On Sat, Oct 15, 2016 at 01:55:01AM +0000, John D. Baker wrote:
  >  The following patch lets me build with "mplayer-ssse3" option on NetBSD 6
  >  and later for i386 and amd64 as the host binutils is of sufficent version.
  >  Not sure how to deal with non-NetBSD platforms.

 Wait until someone notices it doesn't work, probably :-)

 I think the core problem is that override-as.mk doesn't check
 USE_BUILTIN.binutils, so it'll always use the assembler from binutils
 regardless of builtin handling.

 But arguably that's what it ought to do, so I'm not sure there's any
 easy fix. This seems to be the only use of it, in any case...

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 19 Nov 2016 17:55:08 +0000
State-Changed-Why:
Committed, thanks.


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.