NetBSD Problem Report #30267
From www@netbsd.org Wed May 18 08:30:07 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id 59D0D63B104; Wed, 18 May 2005 08:30:07 +0000 (UTC)
Message-Id: <20050518083007.59D0D63B104@narn.netbsd.org>
Date: Wed, 18 May 2005 08:30:07 +0000 (UTC)
From: karl@utopiafoundation.org
Reply-To: karl@utopiafoundation.org
To: gnats-bugs@netbsd.org
Subject: the package multimedia/libdv won't compile
X-Send-Pr-Version: www-1.0
>Number: 30267
>Category: pkg
>Synopsis: the package multimedia/libdv won't compile
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: reed
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 18 08:31:00 +0000 2005
>Closed-Date: Sat Mar 11 04:09:57 +0000 2006
>Last-Modified: Sat Mar 11 04:10:01 +0000 2006
>Originator: Karl Janmar
>Release: NetBSD 3.0_BETA
>Organization:
utopiafoundation.org
>Environment:
NetBSD ngong.utopiafoundation.org 3.0_BETA NetBSD 3.0_BETA (NGONG) #2: Thu May 12 18:37:46 CEST 2005 karl@ngong.utopiafoundation.org:/usr/src/sys/arch/i386/compile/NGONG i386
>Description:
The libdv package won't compile without optimization. There have been a fix for this in the now removed pkgsrc-wip version. There have been similar problems with the FreeBSD port of the package and they have fixed it with similar solution as the one I present.
>How-To-Repeat:
compile the package multimedia/libdv on i386 netbsd 3.0 and possibly 2.0
>Fix:
Apply this patch to the package:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/multimedia/libdv/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile 11 Apr 2005 21:46:41 -0000 1.10
+++ Makefile 18 May 2005 08:27:17 -0000
@@ -14,6 +14,7 @@
PKGCONFIG_OVERRIDE= ${WRKSRC}/libdv.pc.in
PTHREAD_AUTO_VARS= yes
+CFLAGS+= -O2
LIBS+= ${LIBOSSAUDIO}
.include "../../mk/bsd.prefs.mk"
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: karl@utopiafoundation.org
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/30267: the package multimedia/libdv won't compile
Date: Wed, 18 May 2005 11:06:40 +0200
On Wed, May 18, 2005 at 08:31:00AM +0000, karl@utopiafoundation.org wrote:
> The libdv package won't compile without optimization. There have been a fix for this in the now removed pkgsrc-wip version. There have been similar problems with the FreeBSD port of the package and they have fixed it with similar solution as the one I present.
...
> +CFLAGS+= -O2
...
-O2 is in the default CFLAGS for every package. Why is it not in your CFLAGS?
Do you have any related settings in /etc/mk.conf?
Thomas
From: Karl Janmar <karl@utopiafoundation.org>
To: Thomas Klausner <wiz@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/30267: the package multimedia/libdv won't compile
Date: Wed, 18 May 2005 11:21:44 +0200
My mk.conf looks like this:
ACCEPTABLE_LICENSES+=shareware
COPTS+=-march=pentium4
ACCEPTABLE_LICENSES+=adobe-acrobat-license
ACCEPTABLE_LICENSES+=jdk13-license
But according to the manual COPTS+= won't override any default setting?
- Karl
Thomas Klausner wrote:
> On Wed, May 18, 2005 at 08:31:00AM +0000, karl@utopiafoundation.org wrote:
>
>>The libdv package won't compile without optimization. There have been a fix for this in the now removed pkgsrc-wip version. There have been similar problems with the FreeBSD port of the package and they have fixed it with similar solution as the one I present.
>
> ...
>
>>+CFLAGS+= -O2
>
> ...
>
> -O2 is in the default CFLAGS for every package. Why is it not in your CFLAGS?
> Do you have any related settings in /etc/mk.conf?
> Thomas
From: Karl Janmar <karl@utopiafoundation.org>
To: Thomas Klausner <wiz@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/30267: the package multimedia/libdv won't compile
Date: Wed, 18 May 2005 11:25:28 +0200
Ok, I located the culprit. That user had it's CFLAGS set in the
environment, sorry for wasting your time.
Close this PR.
- Karl
Thomas Klausner wrote:
> On Wed, May 18, 2005 at 08:31:00AM +0000, karl@utopiafoundation.org wrote:
>
>>The libdv package won't compile without optimization. There have been a fix for this in the now removed pkgsrc-wip version. There have been similar problems with the FreeBSD port of the package and they have fixed it with similar solution as the one I present.
>
> ...
>
>>+CFLAGS+= -O2
>
> ...
>
> -O2 is in the default CFLAGS for every package. Why is it not in your CFLAGS?
> Do you have any related settings in /etc/mk.conf?
> Thomas
State-Changed-From-To: open->closed
State-Changed-By: wiz@netbsd.org
State-Changed-When: Wed, 18 May 2005 10:02:49 +0000
State-Changed-Why:
Local problem, closed by submitter's request.
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc: Karl Janmar <karl@utopiafoundation.org>
Subject: Re: pkg/30267: the package multimedia/libdv won't compile
Date: Wed, 18 May 2005 08:36:07 -0700 (PDT)
On Wed, 18 May 2005, Karl Janmar wrote:
> Ok, I located the culprit. That user had it's CFLAGS set in the
> environment, sorry for wasting your time.
> Close this PR.
This PR should not be closed.
We can't assume that DBG or CFLAGS contains it.
I had same problem and discussions about this with tech-pkg-ja@ in
February,
For now I have:
+CFLAGS+= -O
But Osamu OISHI told me that is not acceptable because reduces execution
speed and suggested:
+.if !empty(MACHINE_PLATFORM:MLinux-*-*)
+CFLAGS+= -O
+.endif
But that is wrong because it is not platform specific.
Juan later suggested:
http://mail-index.netbsd.org/tech-pkg/2005/02/10/0030.html
.if empty(CFLAGS:M-O*)
CFLAGS+= -O
.endif
But I need to test this.
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/
Responsible-Changed-From-To: pkg-manager->reed
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Wed, 18 May 2005 15:50:20 +0000
Responsible-Changed-Why:
Reed is working on this.
State-Changed-From-To: closed->analyzed
State-Changed-By: wiz@netbsd.org
State-Changed-When: Wed, 18 May 2005 15:50:20 +0000
State-Changed-Why:
Reed analyzed the problem.
State-Changed-From-To: analyzed->closed
State-Changed-By: reed@netbsd.org
State-Changed-When: Sat, 11 Mar 2006 04:09:57 +0000
State-Changed-Why:
Committed fix as I suggested and asked tech-pkg-ja about.
Thanks for reporting the PR.
From: "Jeremy C. Reed" <reed@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/30267 CVS commit: pkgsrc/multimedia/libdv
Date: Sat, 11 Mar 2006 04:08:47 +0000 (UTC)
Module Name: pkgsrc
Committed By: reed
Date: Sat Mar 11 04:08:47 UTC 2006
Modified Files:
pkgsrc/multimedia/libdv: Makefile.common
Log Message:
This is to fix PR 30267. (I have noticed same problem.)
The build needs optimization. So if CFLAGS doesn't contain at least
-O then add it. (Thank you Juan for idea.)
On the tech-pkg-ja@jp.NetBSD.org list, I was told (19 Dec 2005):
> This change can be accepted when judged only from my environment (i386),
> since the expression of "if empty(CFLAGS:M-O*)" is evaluated
> after setting of the environment variable (-O2).
> However, I do not have the positive proof whether this expression is evaluated
> after setting of the environment variable (-O2), in all environments.
So hopefully this doesn't break for anyone else.
To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 pkgsrc/multimedia/libdv/Makefile.common
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.