NetBSD Problem Report #45086

From www@NetBSD.org  Mon Jun 20 14:26:50 2011
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 42ADC63BC41
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Jun 2011 14:26:50 +0000 (UTC)
Message-Id: <20110620142649.AAAB163BA98@www.NetBSD.org>
Date: Mon, 20 Jun 2011 14:26:49 +0000 (UTC)
From: martin@martinbrandenburg.com
Reply-To: martin@martinbrandenburg.com
To: gnats-bugs@NetBSD.org
Subject: libvpx on Darwin 10
X-Send-Pr-Version: www-1.0

>Number:         45086
>Category:       pkg
>Synopsis:       libvpx on Darwin 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tron
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 20 14:30:00 +0000 2011
>Closed-Date:    Tue Jun 21 18:21:04 +0000 2011
>Last-Modified:  Tue Jun 21 18:21:04 +0000 2011
>Originator:     Martin Brandenburg
>Release:        N/A
>Organization:
>Environment:
Darwin Martin-Brandenburgs-MacBook-Pro.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

>Description:
On Darwin 10, the libvpx package cannot properly compile:

I've narrowed it to these lines in the pkgsrc Makefile for it:
.if ${OPSYS} == "Darwin"
.  if ${MACHINE_ARCH} == "i386"
.    if empty(OS_VERSION:M8.*)
CONFIGURE_ARGS+=        --target=x86-darwin9-gcc
.    else
CONFIGURE_ARGS+=        --target=x86-darwin8-gcc
.    endif
.  endif
.endif

libvpx compiles fine (albeit not in pkgsrc) when --target is not set at all, x86-darwin10-gcc does not work.

>How-To-Repeat:
Try to compile libvpx on Darwin 10.
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Mon, 20 Jun 2011 18:52:36 +0000
Responsible-Changed-Why:
I am MAINTAINER.


From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45086 CVS commit: pkgsrc/multimedia/libvpx
Date: Mon, 20 Jun 2011 18:57:02 +0000

 Module Name:	pkgsrc
 Committed By:	ryoon
 Date:		Mon Jun 20 18:57:02 UTC 2011

 Modified Files:
 	pkgsrc/multimedia/libvpx: Makefile

 Log Message:
 Patch from PR pkg/45086
 Add workaround for Darwin/i386 10.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/multimedia/libvpx/Makefile

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

State-Changed-From-To: open->feedback
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Mon, 20 Jun 2011 19:04:01 +0000
State-Changed-Why:
Please confirm it.


From: Martin Brandenburg <martin@martinbrandenburg.com>
To: gnats-bugs@NetBSD.org
Cc: ryoon@NetBSD.org,
 pkgsrc-bugs@netbsd.org,
 gnats-admin@netbsd.org
Subject: Re: pkg/45086 (libvpx on Darwin 10)
Date: Mon, 20 Jun 2011 16:19:41 -0400

 It did not fix it.

 --target needs to be not set at all on Darwin 10. This sets it twice =
 (the if Darwin appears in the file twice)

 On Jun 20, 2011, at 3:04 PM, ryoon@NetBSD.org wrote:

 > Synopsis: libvpx on Darwin 10
 >=20
 > State-Changed-From-To: open->feedback
 > State-Changed-By: ryoon@NetBSD.org
 > State-Changed-When: Mon, 20 Jun 2011 19:04:01 +0000
 > State-Changed-Why:
 > Please confirm it.
 >=20
 >=20
 >=20

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: martin@martinbrandenburg.com
Cc: gnats-bugs@NetBSD.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: pkg/45086 (libvpx on Darwin 10)
Date: Tue, 21 Jun 2011 05:25:15 +0900 (JST)

 Thank you.
 It's my misunderstanding.
 I will fix.


State-Changed-From-To: feedback->open
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Mon, 20 Jun 2011 20:44:23 +0000
State-Changed-Why:
not fixed yet


Responsible-Changed-From-To: ryoon->tron
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Tue, 21 Jun 2011 01:42:10 +0000
Responsible-Changed-Why:
tron@ added the part for Mac OS X i386 (but not match for Darwin 10 i386?)


State-Changed-From-To: open->feedback
State-Changed-By: tron@NetBSD.org
State-Changed-When: Tue, 21 Jun 2011 07:07:22 +0000
State-Changed-Why:
The packages builds without any problems for me under ...

Darwin excalibur.zhadum.org.uk 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

... which is the latest update of Mac OS X Snow Leopard.

The "--target" line is definitely necessary because the package otherwise
builds a 64bit library which doesn't work if "ABI" is set to "32".

Your bug report doesn't provide any kind of usefull information like
error message(s), the pkgsrc branch you are using, the contents of
"/etc/mk.conf", the Xcode tools version, the default compiler, etc..

Please provide more information.


From: Matthias Scheler <tron@NetBSD.org>
To: obache@NetBSD.org
Cc: NetBSD GNATS <gnats-bugs@NetBSD.org>
Subject: Re: pkg/45086 (libvpx on Darwin 10)
Date: Tue, 21 Jun 2011 08:00:20 +0100

 On Tue, Jun 21, 2011 at 01:42:11AM +0000, obache@NetBSD.org wrote:
 > Synopsis: libvpx on Darwin 10
 > 
 > Responsible-Changed-From-To: ryoon->tron
 > Responsible-Changed-By: obache@NetBSD.org
 > Responsible-Changed-When: Tue, 21 Jun 2011 01:42:10 +0000
 > Responsible-Changed-Why:
 > tron@ added the part for Mac OS X i386 (but not match for Darwin 10 i386?)

 There is no such thing as Darwin 10. Martin Brandenburg is using
 Mac OS X Snow Leopard.

 	Kind regards

 -- 
 Matthias Scheler                                  http://zhadum.org.uk/

From: Martin Brandenburg <martin@martinbrandenburg.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45086 (libvpx on Darwin 10)
Date: Tue, 21 Jun 2011 09:52:57 -0400

 That is correct. I was under the impression that pkgsrc referred to OS X =
 Snow Leopard as Darwin 10 like most of the development tools.

 Sorry about the lack of info, here's some more details:

 gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
 Xcode 4.0.2
 pkgsrc -current

 mk.conf:
 # Example /Users/martin/pkgsrc/pkg/etc/mk.conf file produced by =
 bootstrap-pkgsrc
 # Mon Jun 20 15:12:41 EDT 2011

 .ifdef BSD_PKG_MK	# begin pkgsrc settings

 ABI=3D			32

 PKG_DBDIR=3D		/Users/martin/pkgsrc/var/pkg
 LOCALBASE=3D		/Users/martin/pkgsrc/pkg
 VARBASE=3D		/Users/martin/pkgsrc/pkg/var
 PKG_TOOLS_BIN=3D		/Users/martin/pkgsrc/pkg/sbin
 PKGMANDIR=3D		man


 .endif			# end pkgsrc settings

 Here is the exact output of bmake:
 =3D> Bootstrap dependency digest>=3D20010302: found digest-20080510
 =3D=3D=3D> Skipping vulnerability checks.
 WARNING: No /Users/martin/pkgsrc/var/pkg/pkg-vulnerabilities file found.
 WARNING: To fix run: `/Users/martin/pkgsrc/pkg/sbin/pkg_admin -K =
 /Users/martin/pkgsrc/var/pkg fetch-pkg-vulnerabilities'.
 =3D> Checksum SHA1 OK for libvpx-v0.9.6.tar.bz2
 =3D> Checksum RMD160 OK for libvpx-v0.9.6.tar.bz2
 =3D=3D=3D> Installing dependencies for libvpx-0.9.6
 =3D> Build dependency yasm-[0-9]*: found yasm-1.1.0nb1
 =3D> Build dependency libtool-base>=3D2.2.6bnb3: found =
 libtool-base-2.2.6bnb5
 =3D> Build dependency perl>=3D5.8.0: found perl-5.12.2nb2
 =3D=3D=3D> Overriding tools for libvpx-0.9.6
 =3D=3D=3D> Extracting for libvpx-0.9.6
 /bin/cp /Users/martin/pkgsrc/multimedia/libvpx/files/strip_fPIC.sh =
 /Users/martin/pkgsrc/multimedia/libvpx/work/libvpx-v0.9.6
 =3D=3D=3D> Patching for libvpx-0.9.6
 =3D> Applying pkgsrc patches for libvpx-0.9.6
 =3D=3D=3D> Creating toolchain wrappers for libvpx-0.9.6
 =3D=3D=3D> Configuring for libvpx-0.9.6
 =3D> Replacing bash interpreter in configure build/make/version.sh =
 build/make/gen_asm_deps.sh examples/gen_example_text.sh =
 examples/gen_example_code.sh.
 Configuring selected codecs
   enabling vp8_encoder
   enabling vp8_decoder
 Configuring for target 'x86-darwin9-gcc'
   enabling x86
   enabling runtime_cpu_detect
   enabling mmx
   enabling sse
   enabling sse2
   enabling sse3
   enabling ssse3
   enabling sse4_1
   using yasm
 Unable to invoke compiler: gcc -pipe -O2 -I/usr/include -isysroot =
 /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=3D10.5 -m32 -arch =
 i386 -O3 -fPIC -Wall -Wdeclaration-after-statement =
 -Wdisabled-optimization -Wpointer-arith -Wcast-qual -Wno-unused

 Configuration failed. This could reflect a misconfiguration of your
 toolchains, improper options selected, or another problem. If you
 don't see any useful error messages above, the next step is to look
 at the configure error log file (config.err) to determine what
 configure was trying to do when it died.
 *** Error code 1

 Stop.
 bmake: stopped in /Users/martin/pkgsrc/multimedia/libvpx
 *** Error code 1

 Stop.
 bmake: stopped in /Users/martin/pkgsrc/multimedia/libvpx

 The mentioned error log file (config.err) ends with:
 check_header stdio.h
 check_cpp
 BEGIN /tmp/vpx-conf-17094-24434.c
     1	#include "stdio.h"
     2	int x;
 END /tmp/vpx-conf-17094-24434.c
 gcc -pipe -O2 -I/usr/include -isysroot /Developer/SDKs/MacOSX10.5.sdk =
 -mmacosx-version-min=3D10.5 -m32 -arch i386 -O3 -fPIC -Wall =
 -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith =
 -Wcast-qual -Wno-unused -E -o /tmp/vpx-conf-17094-7473.o =
 /tmp/vpx-conf-17094-24434.c
 /tmp/vpx-conf-17094-24434.c:1:19: error: stdio.h: No such file or =
 directory

 and begins:
 # ./configure --disable-postproc --enable-pic =
 --enable-runtime-cpu-detect --prefix=3D/Users/martin/pkgsrc/pkg =
 --target=3Dx86-darwin9-gcc

 --target was set to x86-darwin9-gcc on a darwin 10 (that is, Mac OS X =
 Snow Leopard) machine. This is wrong. You are correct that compiling it =
 without --target at all produces a 64 bit binary, as I did not consider =
 checking.

 The configure script only recognizes x86_64-darwin10-gcc as=20

 By editing the configure script like so:
 --- configure.orig	2011-06-21 09:34:10.000000000 -0400
 +++ configure	2011-06-21 09:33:14.000000000 -0400
 @@ -105,6 +105,7 @@
  all_platforms=3D"${all_platforms} x86-darwin8-icc"
  all_platforms=3D"${all_platforms} x86-darwin9-gcc"
  all_platforms=3D"${all_platforms} x86-darwin9-icc"
 +all_platforms=3D"${all_platforms} x86-darwin10-gcc"
  all_platforms=3D"${all_platforms} x86-linux-gcc"
  all_platforms=3D"${all_platforms} x86-linux-icc"
  all_platforms=3D"${all_platforms} x86-solaris-gcc"

 and compiling with --target=3Dx86-darwin10-gcc I was able to get a clean =
 compile.

 I am not sure how to proceed with creating a patch for patches/

 Thanks,
 Martin

 On Jun 21, 2011, at 3:20 AM, Matthias Scheler wrote:

 > The following reply was made to PR pkg/45086; it has been noted by =
 GNATS.
 >=20
 > From: Matthias Scheler <tron@NetBSD.org>
 > To: obache@NetBSD.org
 > Cc: NetBSD GNATS <gnats-bugs@NetBSD.org>
 > Subject: Re: pkg/45086 (libvpx on Darwin 10)
 > Date: Tue, 21 Jun 2011 08:00:20 +0100
 >=20
 > On Tue, Jun 21, 2011 at 01:42:11AM +0000, obache@NetBSD.org wrote:
 >> Synopsis: libvpx on Darwin 10
 >>=20
 >> Responsible-Changed-From-To: ryoon->tron
 >> Responsible-Changed-By: obache@NetBSD.org
 >> Responsible-Changed-When: Tue, 21 Jun 2011 01:42:10 +0000
 >> Responsible-Changed-Why:
 >> tron@ added the part for Mac OS X i386 (but not match for Darwin 10 =
 i386?)
 >=20
 > There is no such thing as Darwin 10. Martin Brandenburg is using
 > Mac OS X Snow Leopard.
 >=20
 > 	Kind regards
 >=20
 > --=20
 > Matthias Scheler                                  =
 http://zhadum.org.uk/
 >=20

From: Martin Brandenburg <martin@martinbrandenburg.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45086 (libvpx on Darwin 10)
Date: Tue, 21 Jun 2011 09:59:20 -0400

 On Jun 21, 2011, at 9:55 AM, Martin Brandenburg wrote:

 > --- configure.orig	2011-06-21 09:34:10.000000000 -0400
 > +++ configure	2011-06-21 09:33:14.000000000 -0400
 > @@ -105,6 +105,7 @@
 >  all_platforms=3D"${all_platforms} x86-darwin8-icc"
 >  all_platforms=3D"${all_platforms} x86-darwin9-gcc"
 >  all_platforms=3D"${all_platforms} x86-darwin9-icc"
 > +all_platforms=3D"${all_platforms} x86-darwin10-gcc"
 >  all_platforms=3D"${all_platforms} x86-linux-gcc"
 >  all_platforms=3D"${all_platforms} x86-linux-icc"
 >  all_platforms=3D"${all_platforms} x86-solaris-gcc"

 --- configure.orig	2011-06-21 09:34:10.000000000 -0400
 +++ configure	2011-06-21 09:33:14.000000000 -0400
 @@ -105,6 +105,7 @@
  all_platforms="${all_platforms} x86-darwin8-icc"
  all_platforms="${all_platforms} x86-darwin9-gcc"
  all_platforms="${all_platforms} x86-darwin9-icc"
 +all_platforms="${all_platforms} x86-darwin10-gcc"
  all_platforms="${all_platforms} x86-linux-gcc"
  all_platforms="${all_platforms} x86-linux-icc"
  all_platforms="${all_platforms} x86-solaris-gcc"

 I don't know why the 3D got put in there, sorry.

State-Changed-From-To: feedback->open
State-Changed-By: tron@NetBSD.org
State-Changed-When: Tue, 21 Jun 2011 18:02:07 +0000
State-Changed-Why:
Feedback was provided.


From: "Matthias Scheler" <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45086 CVS commit: pkgsrc/multimedia/libvpx
Date: Tue, 21 Jun 2011 18:14:30 +0000

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Tue Jun 21 18:14:30 UTC 2011

 Modified Files:
 	pkgsrc/multimedia/libvpx: Makefile distinfo
 Added Files:
 	pkgsrc/multimedia/libvpx/patches: patch-ae

 Log Message:
 Fix build under Mac OS X Snow Leopard if the Mac OS X Leopard is not
 installed. Based on changes sugested by Martin Brandenburg in PR pkg/45086.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/multimedia/libvpx/Makefile
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/multimedia/libvpx/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/libvpx/patches/patch-ae

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

State-Changed-From-To: open->closed
State-Changed-By: tron@NetBSD.org
State-Changed-When: Tue, 21 Jun 2011 18:21:04 +0000
State-Changed-Why:
I've fixed the problem as suggested by you. Thanks a lot for the bug report.


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