NetBSD Problem Report #38519

From wiz@hiro.nih.at  Sun Apr 27 08:12:57 2008
Return-Path: <wiz@hiro.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 846E563BA1C
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 27 Apr 2008 08:12:57 +0000 (UTC)
Message-Id: <20080427080651.989471181E62@hiro.nih.at>
Date: Sun, 27 Apr 2008 10:06:51 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: buildlink3 disregards quoting
X-Send-Pr-Version: 3.95

>Number:         38519
>Category:       pkg
>Synopsis:       buildlink3 disregards quoting
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 27 08:15:01 +0000 2008
>Last-Modified:  Sun Mar 21 16:07:10 +0000 2010
>Originator:     Thomas Klausner
>Release:        NetBSD 4.99.60
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:


Architecture: x86_64
Machine: amd64
>Description:
When building multimedia/gnash without patches, it breaks with:
c++ -DHAVE_CONFIG_H -I. -I..  -DGUI_KDE -DGUI_CONFIG=\"KDE\" -I.. -I.. -I../server -I../server/parser -I../server/vm -I../libltdl -I../libbase -I../backend -I../libgeometry -I../libmedia -I../libmedia/ffmpeg -I../libmedia/gst -DLOCALEDIR=\"/usr/pkg/share/locale\" -DPLUGINSDIR=\"/usr/pkg/lib/gnash/plugins\" -I/usr/pkg/include/libxml2   -I/usr/pkg/include -pthread  -I/usr/pkg/include -I/usr/pkg/include    -DPKGDATADIR=\"/usr/pkg/share/kde/gnash\" -DRENDERER_CONFIG=\"agg\" -DMEDIA_CONFIG=\"ffmpeg\" -DTARGET_CONFIG=\"\" -DCONFIG_CONFIG="\"--with-npapi-plugindir=/usr/pkg/lib/firefox/plugins --disable-pie --datadir=/usr/pkg/share/kde --sysconfdir=/usr/pkg/etc --with-qt-dir=/usr/pkg/qt3 --with-extra-includes=/usr/pkg/include:/usr/pkg/include --disable-rpath --disable-debug --with-xinerama --enable-gui=kde --enable-renderer=agg --enable-media=ffmpeg --disable-mit-shm --without-libintl-prefix --without-libiconv-prefix --prefix=/usr/pkg --host=x86_64--netbsd --mandir=/usr/pkg/man\"" -D
 CXXFLAGS="\"-O2 -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2 -pthread -pthread     -W     -Wall     -Wcast-align     -Wcast-qual     -Wpointer-arith     -Wreturn-type     \"" -I/usr/pkg/include -I/usr/pkg/include/kio -I/usr/pkg/qt3/include    -I/usr/pkg/include/agg2   -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2  -O2 -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2 -pthread -pthread     -W     -Wall     -Wcast-align     -Wcast-qual     -Wpointer-arith     -Wreturn-type      -MT kde_gnash-gui_kde.o -MD -MP -MF .deps/kde_gnash-gui_kde.Tpo -c -o kde_gnash-gui_kde.o `test -f 'gui_kde.cpp' || echo './'`gui_kde.cpp
In file included from gui_kde.cpp:29:
kdesup.h:28:26: error: qapplication.h: No such file or directory
kdesup.h:29:24: error: qpopupmenu.h: No such file or directory
In file included from kdesup.h:41,
                 from gui_kde.cpp:29:
kde_glue_agg.h:25:21: error: qimage.h: No such file or directory
In file included from kde_glue_agg.h:28,
                 from kdesup.h:41,
                 from gui_kde.cpp:29:
kde_glue.h:27:22: error: qwidget.h: No such file or directory

When looking at the .work.log, one sees:
[*] /scratch/multimedia/gnash/work/.wrapper/bin/c++ /scratch/multimedia/gnash/work/.wrapper/bin/c++ -DHAVE_CONFIG_H -I. -I.. -DGUI_KDE -DGUI_CONFIG=\"KDE\" -I.. -I.. -I../server
 -I../server/parser -I../server/vm -I../libltdl -I../libbase -I../backend -I../libgeometry -I../libmedia -I../libmedia/ffmpeg -I../libmedia/gst -DLOCALEDIR=\"/usr/pkg/share/loca
le\" -DPLUGINSDIR=\"/usr/pkg/lib/gnash/plugins\" -I/usr/pkg/include/libxml2 -I/usr/pkg/include -pthread -I/usr/pkg/include -I/usr/pkg/include -DPKGDATADIR=\"/usr/pkg/share/kde/g
nash\" -DRENDERER_CONFIG=\"agg\" -DMEDIA_CONFIG=\"ffmpeg\" -DTARGET_CONFIG=\"\" "-DCONFIG_CONFIG=\"--with-npapi-plugindir=/usr/pkg/lib/firefox/plugins --disable-pie --datadir=/u
sr/pkg/share/kde --sysconfdir=/usr/pkg/etc --with-qt-dir=/usr/pkg/qt3 --with-extra-includes=/usr/pkg/include:/usr/pkg/include --disable-rpath --disable-debug --with-xinerama --e
nable-gui=kde --enable-renderer=agg --enable-media=ffmpeg --disable-mit-shm --without-libintl-prefix --without-libiconv-prefix --prefix=/usr/pkg --host=x86_64--netbsd --mandir=/
usr/pkg/man\"" "-DCXXFLAGS=\"-O2 -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetyp
e2 -pthread -pthread     -W     -Wall     -Wcast-align     -Wcast-qual     -Wpointer-arith     -Wreturn-type     \"" -I/usr/pkg/include -I/usr/pkg/include/kio -I/usr/pkg/qt3/inc
lude -I/usr/pkg/include/agg2 -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2 -
O2 -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2 -pthread -pthread -W -Wall
-Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -MT kde_gnash-gui_kde.o -MD -MP -MF .deps/kde_gnash-gui_kde.Tpo -c -o kde_gnash-gui_kde.o gui_kde.cpp
<.> /scratch/multimedia/gnash/work/.gcc/bin/g++ -DHAVE_CONFIG_H -I. -I.. -DGUI_KDE -DGUI_CONFIG=\"KDE\" -I../server -I../server/parser -I../server/vm -I../libltdl -I../libbase -
I../backend -I../libgeometry -I../libmedia -I../libmedia/ffmpeg -I../libmedia/gst -DLOCALEDIR=\"/usr/pkg/share/locale\" -DPLUGINSDIR=\"/usr/pkg/lib/gnash/plugins\" -I/scratch/mu
ltimedia/gnash/work/.buildlink/include/libxml2 -I/scratch/multimedia/gnash/work/.buildlink/include -pthread -DPKGDATADIR=\"/usr/pkg/share/kde/gnash\" -DRENDERER_CONFIG=\"agg\" -
DMEDIA_CONFIG=\"ffmpeg\" -DTARGET_CONFIG=\"\" "-DCONFIG_CONFIG=\"--with-npapi-plugindir=/usr/pkg/lib/firefox/plugins --disable-pie --datadir=/usr/pkg/share/kde --sysconfdir=/usr
/pkg/etc --with-qt-dir=/usr/pkg/qt3 --with-extra-includes=/usr/pkg/include:/usr/pkg/include --disable-rpath --disable-debug --with-xinerama --enable-gui=kde --enable-renderer=ag
g --enable-media=ffmpeg --disable-mit-shm --without-libintl-prefix --without-libiconv-prefix --prefix=/usr/pkg --host=x86_64--netbsd --mandir=/usr/pkg/man\"" "-DCXXFLAGS=\"-O2 -
I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2 -pthread -pthread     -W     -W
all     -Wcast-align     -Wcast-qual     -Wpointer-arith     -Wreturn-type     \"" -I/scratch/multimedia/gnash/work/.buildlink/include/kio -I/scratch/multimedia/gnash/work/.buil
dlink/include/agg2 -I/scratch/multimedia/gnash/work/.buildlink/include/SDL -I/scratch/multimedia/gnash/work/.buildlink/include/freetype2 -O2 -pthread -pthread -W -Wall -Wcast-al
ign -Wcast-qual -Wpointer-arith -Wreturn-type -MT kde_gnash-gui_kde.o -MD -MP -MF .deps/kde_gnash-gui_kde.Tpo -c -o kde_gnash-gui_kde.o gui_kde.cpp -L/scratch/multimedia/gnash/w
ork/.buildlink/lib

The problem seems to me that '-I/usr/pkg/qt3/include' appears twice:
Once inside
"-DCXXFLAGS=\"-O2 -I/usr/pkg/include -DLDAP_DEPRECATED -I/usr/include -I/usr/pkg/qt3/include -I/usr/pkg/include/SDL -I/usr/include/krb5 -I/usr/pkg/include/freetype2 -pthread -pthread     -W     -Wall     -Wcast-align     -Wcast-qual     -Wpointer-arith     -Wreturn-type     \""
and once after that.
The second occurrence is removed by the buildlink framework and the build breaks.

The workaround implemented in the gnash patches is to move the unquoted include
before the quoted one so that the quoted one is removed instead.
>How-To-Repeat:
cd /usr/pkgsrc/multimedia/gnash
cvs up -D 20080427
rm patches/p*
make
>Fix:
buildlink3 should understand quoting as used by gnash.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jlam
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 27 Apr 2008 08:16:03 +0000
Responsible-Changed-Why:
Over to the buildlink3 authority.


Responsible-Changed-From-To: jlam->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 21 Mar 2010 16:07:10 +0000
Responsible-Changed-Why:
Back to role account, jlam lost his commit bit.


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