NetBSD Problem Report #55593

From www@netbsd.org  Thu Aug 20 03:39:33 2020
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 159831A9217
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 20 Aug 2020 03:39:33 +0000 (UTC)
Message-Id: <20200820033931.730181A923D@mollari.NetBSD.org>
Date: Thu, 20 Aug 2020 03:39:31 +0000 (UTC)
From: you.kawasaki@gmail.com
Reply-To: you.kawasaki@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Proposed modification to buildlink3.mk of libxml2
X-Send-Pr-Version: www-1.0

>Number:         55593
>Category:       pkg
>Synopsis:       Proposed modification to buildlink3.mk of libxml2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 20 03:40:00 +0000 2020
>Last-Modified:  Thu Sep 03 16:55:01 +0000 2020
>Originator:     Yosuke Kawasaki
>Release:        pkgsrc-2020Q2
>Organization:
None
>Environment:
Linux 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux

>Description:
When I tried to compile multimedia/handbrake 1.3.1nb4, it failed to find libxml2 headers.

The exact error message is as follows.

/var/pkg/work/multimedia/handbrake/work/.cwrapper/bin/cc -std=gnu99 -pipe -fmessage-length=0 -Wall -Wno-format-truncation -g0 -O3 -O2 -D_GNU_SOURCE -I/usr/pkg/include/libxml2 -D_FORTIFY_SOURCE=2 -I/var/pkg/include -I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/include -I/var/pkg/include/freetype2 -I/var/pkg/include/libdrm -I/var/pkg/include -I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/include -I/var/pkg/include/freetype2 -I/var/pkg/include/libdrm -mfpmath=sse -msse2 -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/vfr.c -o libhb/vfr.o
../libhb/plist.c:15:10: fatal error: libxml/parser.h: No such file or directory
 #include "libxml/parser.h"
          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [../libhb/module.rules:12: libhb/plist.o] Error 1
make: *** Waiting for unfinished jobs....
*** Error code 2

Stop.
bmake[1]: stopped in /var/pkgsrc/pkgsrc-2020Q2/multimedia/handbrake
*** Error code 1

Stop.
bmake: stopped in /var/pkgsrc/pkgsrc-2020Q2/multimedia/handbrake



I noticed that the CFLAG does not include "include/libxml2".
When I added following line in buildlink3.mk of libxml2 to include "include/libxml2" in the CFLAG, building finished without an error for handbrake.

BUILDLINK_CFLAGS.libxml2+=    -I${BUILDLINK_PREFIX.libxml2}/include/libxml2

I thus propose adding the above line in buildlink3.mk of libxml2.

Yosuke
>How-To-Repeat:
Build handbrake 1.3.1nb4.
>Fix:
Add following line to buildlink3.mk of libxml2

BUILDLINK_CFLAGS.libxml2+=    -I${BUILDLINK_PREFIX.libxml2}/include/libxml2

>Audit-Trail:
From: Jonathan Perkin <jperkin@joyent.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Thu, 20 Aug 2020 09:03:28 +0100

 * On 2020-08-20 at 06:27 BST, you.kawasaki@gmail.com wrote:

 > BUILDLINK_CFLAGS.libxml2+=    -I${BUILDLINK_PREFIX.libxml2}/include/libxml2

 Usually the correct way to do this would be to add:

   BUILDLINK_INCDIRS.libxml2+=	include/libxml2

 Does that resolve your issue too?

 -- 
 Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Thu, 20 Aug 2020 10:36:31 +0200

 On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 > /var/pkg/work/multimedia/handbrake/work/.cwrapper/bin/cc -std=gnu99
 > -pipe -fmessage-length=0 -Wall -Wno-format-truncation -g0 -O3 -O2 -D_GNU_SOURCE
 > -I/usr/pkg/include/libxml2 ...
 > 
 > I noticed that the CFLAG does not include "include/libxml2".

 But it doess?

 Joerg

From: =?UTF-8?B?5bed5bWc5rSL56WQ?= <you.kawasaki@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Fri, 21 Aug 2020 10:42:11 +0900

 --0000000000002a2bb405ad5959cf
 Content-Type: text/plain; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 Dear Jonathan,

 I confirmed that the addition of following line in buildlink3.mk of libxml2
 resolved the issue too.
   BUILDLINK_INCDIRS.libxml2+=3D  include/libxml2

 The log states following flags to compile libhb/vfr.o

 /var/pkg/work/multimedia/handbrake/work/.cwrapper/bin/cc -std=3Dgnu99 -pipe
 -fmes
 sage-length=3D0 -Wall -Wno-format-truncation -g0 -O3 -O2 -D_GNU_SOURCE
 -I/usr/pkg
 /include/libxml2 -D_FORTIFY_SOURCE=3D2 -I/var/pkg/include -I/usr/include
 -I/var/p
 kg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0
 -I/var/pkg/lib/glib-2.0/inc
 lude -I/var/pkg/include/freetype2 -I/var/pkg/include/libxml2
 -I/var/pkg/include
 /libdrm -I/var/pkg/include -I/usr/include -I/var/pkg/include/glib-2.0
 -I/var/pk
 g/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/include
 -I/var/pkg/include/freet
 ype2 -I/var/pkg/include/libxml2 -I/var/pkg/include/libdrm -mfpmath=3Dsse
 -msse2 -
 D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE
 -D_FILE_OFFSET_BITS=3D64
  -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include
 -I/usr/include/l
 ibxml2 -c ../libhb/vfr.c -o libhb/vfr.o


 WIthout the insertion, the compilation stopped with following error.
 /include/libxml2 -D_FORTIFY_SOURCE=3D2 -I/var/pkg/include -I/usr/include
 -I/var/p
 kg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0
 -I/var/pkg/lib/glib-2.0/inc
 lude -I/var/pkg/include/freetype2 -I/var/pkg/include/libdrm
 -I/var/pkg/include
 -I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0
 -I/v
 ar/pkg/lib/glib-2.0/include -I/var/pkg/include/freetype2
 -I/var/pkg/include/lib
 drm -mfpmath=3Dsse -msse2 -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX
 -D_LARGEFILE_SOUR
 CE -D_FILE_OFFSET_BITS=3D64 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/
 -I./contrib
 /include -I/usr/include/libxml2 -c ../libhb/vfr.c -o libhb/vfr.o
 ../libhb/plist.c:15:10: fatal error: libxml/parser.h: No such file or
 directory
  #include "libxml/parser.h"

 Thank you.

 Yosuke

 2020=E5=B9=B48=E6=9C=8820=E6=97=A5(=E6=9C=A8) 17:05 Jonathan Perkin <jperki=
 n@joyent.com>:

 > The following reply was made to PR pkg/55593; it has been noted by GNATS.
 >
 > From: Jonathan Perkin <jperkin@joyent.com>
 > To: gnats-bugs@netbsd.org
 > Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.or=
 g
 > Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
 > Date: Thu, 20 Aug 2020 09:03:28 +0100
 >
 >  * On 2020-08-20 at 06:27 BST, you.kawasaki@gmail.com wrote:
 >
 >  > BUILDLINK_CFLAGS.libxml2+=3D
 > -I${BUILDLINK_PREFIX.libxml2}/include/libxml2
 >
 >  Usually the correct way to do this would be to add:
 >
 >    BUILDLINK_INCDIRS.libxml2+=3D  include/libxml2
 >
 >  Does that resolve your issue too?
 >
 >  --
 >  Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com
 >
 >

 --0000000000002a2bb405ad5959cf
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div dir=3D"ltr"><div>Dear Jonathan,</div><div><br></div><=
 div>I confirmed that the addition of following line in <a href=3D"http://bu=
 ildlink3.mk">buildlink3.mk</a> of libxml2 resolved the issue too.<br></div>=
 <div>=C2=A0 BUILDLINK_INCDIRS.libxml2+=3D=C2=A0 include/libxml2</div><div><=
 br></div><div>The log states following flags to compile libhb/vfr.o<br></di=
 v><div><br></div><div>/var/pkg/work/multimedia/handbrake/work/.cwrapper/bin=
 /cc -std=3Dgnu99 -pipe -fmes<br>sage-length=3D0 -Wall -Wno-format-truncatio=
 n -g0 -O3 -O2 -D_GNU_SOURCE -I/usr/pkg<br>/include/libxml2 -D_FORTIFY_SOURC=
 E=3D2 -I/var/pkg/include -I/usr/include -I/var/p<br>kg/include/glib-2.0 -I/=
 var/pkg/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/inc<br>lude -I/var/pkg=
 /include/freetype2 -I/var/pkg/include/libxml2 -I/var/pkg/include<br>/libdrm=
  -I/var/pkg/include -I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pk<br=
 >g/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/include -I/var/pkg/include/=
 freet<br>ype2 -I/var/pkg/include/libxml2 -I/var/pkg/include/libdrm -mfpmath=
 =3Dsse -msse2 -<br>D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX -D_LARGEFILE_SOURCE=
  -D_FILE_OFFSET_BITS=3D64<br>=C2=A0-DHAS_STRERROR_R -DARCH_X86_64 -I./libhb=
 / -I./contrib/include -I/usr/include/l<br>ibxml2 -c ../libhb/vfr.c -o libhb=
 /vfr.o</div><div><br></div><div><br></div><div>WIthout the insertion, the c=
 ompilation stopped with following error.</div><div>/include/libxml2 -D_FORT=
 IFY_SOURCE=3D2 -I/var/pkg/include -I/usr/include -I/var/p<br>kg/include/gli=
 b-2.0 -I/var/pkg/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/inc<br>lude -=
 I/var/pkg/include/freetype2 -I/var/pkg/include/libdrm -I/var/pkg/include <b=
 r>-I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.=
 0 -I/v<br>ar/pkg/lib/glib-2.0/include -I/var/pkg/include/freetype2 -I/var/p=
 kg/include/lib<br>drm -mfpmath=3Dsse -msse2 -D__LIBHB__ -DUSE_PTHREAD -DSYS=
 _LINUX -D_LARGEFILE_SOUR<br>CE -D_FILE_OFFSET_BITS=3D64 -DHAS_STRERROR_R -D=
 ARCH_X86_64 -I./libhb/ -I./contrib<br>/include -I/usr/include/libxml2 -c ..=
 /libhb/vfr.c -o libhb/vfr.o<br>../libhb/plist.c:15:10: fatal error: libxml/=
 parser.h: No such file or directory<br>=C2=A0#include &quot;libxml/parser.h=
 &quot;<br></div><div><br></div><div>Thank you.<br></div><div><br></div><div=
 >Yosuke<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas=
 s=3D"gmail_attr">2020=E5=B9=B48=E6=9C=8820=E6=97=A5(=E6=9C=A8) 17:05 Jonath=
 an Perkin &lt;<a href=3D"mailto:jperkin@joyent.com">jperkin@joyent.com</a>&=
 gt;:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px=
  0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The followi=
 ng reply was made to PR pkg/55593; it has been noted by GNATS.<br>
 <br>
 From: Jonathan Perkin &lt;<a href=3D"mailto:jperkin@joyent.com" target=3D"_=
 blank">jperkin@joyent.com</a>&gt;<br>
 To: <a href=3D"mailto:gnats-bugs@netbsd.org" target=3D"_blank">gnats-bugs@n=
 etbsd.org</a><br>
 Cc: <a href=3D"mailto:pkg-manager@netbsd.org" target=3D"_blank">pkg-manager=
 @netbsd.org</a>, <a href=3D"mailto:gnats-admin@netbsd.org" target=3D"_blank=
 ">gnats-admin@netbsd.org</a>, <a href=3D"mailto:pkgsrc-bugs@netbsd.org" tar=
 get=3D"_blank">pkgsrc-bugs@netbsd.org</a><br>
 Subject: Re: pkg/55593: Proposed modification to <a href=3D"http://buildlin=
 k3.mk" rel=3D"noreferrer" target=3D"_blank">buildlink3.mk</a> of libxml2<br=
 >
 Date: Thu, 20 Aug 2020 09:03:28 +0100<br>
 <br>
 =C2=A0* On 2020-08-20 at 06:27 BST, <a href=3D"mailto:you.kawasaki@gmail.co=
 m" target=3D"_blank">you.kawasaki@gmail.com</a> wrote:<br>
 <br>
 =C2=A0&gt; BUILDLINK_CFLAGS.libxml2+=3D=C2=A0 =C2=A0 -I${BUILDLINK_PREFIX.l=
 ibxml2}/include/libxml2<br>
 <br>
 =C2=A0Usually the correct way to do this would be to add:<br>
 <br>
 =C2=A0 =C2=A0BUILDLINK_INCDIRS.libxml2+=3D=C2=A0 include/libxml2<br>
 <br>
 =C2=A0Does that resolve your issue too?<br>
 <br>
 =C2=A0-- <br>
 =C2=A0Jonathan Perkin=C2=A0 -=C2=A0 Joyent, Inc.=C2=A0 -=C2=A0 <a href=3D"h=
 ttp://www.joyent.com" rel=3D"noreferrer" target=3D"_blank">www.joyent.com</=
 a><br>
 <br>
 </blockquote></div></div>

 --0000000000002a2bb405ad5959cf--

From: =?UTF-8?B?5bed5bWc5rSL56WQ?= <you.kawasaki@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Fri, 21 Aug 2020 10:44:20 +0900

 --000000000000d5786505ad59604a
 Content-Type: text/plain; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 Dear Joerg,

 Thank you for your feedback.
 When I re-run the compile, it stopped with the following error.

 ./include/libxml2 -D_FORTIFY_SOURCE=3D2 -I/var/pkg/include -I/usr/include
 -I/var/p
 kg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0
 -I/var/pkg/lib/glib-2.0/inc
 lude -I/var/pkg/include/freetype2 -I/var/pkg/include/libdrm
 -I/var/pkg/include
 -I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pkg/include/gio-unix-2.0
 -I/v
 ar/pkg/lib/glib-2.0/include -I/var/pkg/include/freetype2
 -I/var/pkg/include/lib
 drm -mfpmath=3Dsse -msse2 -D__LIBHB__ -DUSE_PTHREAD -DSYS_LINUX
 -D_LARGEFILE_SOUR
 CE -D_FILE_OFFSET_BITS=3D64 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/
 -I./contrib
 /include -I/usr/include/libxml2 -c ../libhb/vfr.c -o libhb/vfr.o
 ../libhb/plist.c:15:10: fatal error: libxml/parser.h: No such file or
 directory
  #include "libxml/parser.h"

 Yosuke
 2020=E5=B9=B48=E6=9C=8820=E6=97=A5(=E6=9C=A8) 17:40 Joerg Sonnenberger <joe=
 rg@bec.de>:

 > The following reply was made to PR pkg/55593; it has been noted by GNATS.
 >
 > From: Joerg Sonnenberger <joerg@bec.de>
 > To: gnats-bugs@netbsd.org
 > Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.or=
 g
 > Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
 > Date: Thu, 20 Aug 2020 10:36:31 +0200
 >
 >  On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 >  > /var/pkg/work/multimedia/handbrake/work/.cwrapper/bin/cc -std=3Dgnu99
 >  > -pipe -fmessage-length=3D0 -Wall -Wno-format-truncation -g0 -O3 -O2
 > -D_GNU_SOURCE
 >  > -I/usr/pkg/include/libxml2 ...
 >  >
 >  > I noticed that the CFLAG does not include "include/libxml2".
 >
 >  But it doess?
 >
 >  Joerg
 >
 >

 --000000000000d5786505ad59604a
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><div dir=3D"ltr">Dear Joerg,</div><div dir=3D"ltr"><br></d=
 iv><div>Thank you for your feedback.</div><div>When I re-run the compile, i=
 t stopped with the following error.</div><div><br></div>./include/libxml2 -=
 D_FORTIFY_SOURCE=3D2 -I/var/pkg/include -I/usr/include -I/var/p<br>kg/inclu=
 de/glib-2.0 -I/var/pkg/include/gio-unix-2.0 -I/var/pkg/lib/glib-2.0/inc<br>=
 lude -I/var/pkg/include/freetype2 -I/var/pkg/include/libdrm -I/var/pkg/incl=
 ude <br>-I/usr/include -I/var/pkg/include/glib-2.0 -I/var/pkg/include/gio-u=
 nix-2.0 -I/v<br>ar/pkg/lib/glib-2.0/include -I/var/pkg/include/freetype2 -I=
 /var/pkg/include/lib<br>drm -mfpmath=3Dsse -msse2 -D__LIBHB__ -DUSE_PTHREAD=
  -DSYS_LINUX -D_LARGEFILE_SOUR<br>CE -D_FILE_OFFSET_BITS=3D64 -DHAS_STRERRO=
 R_R -DARCH_X86_64 -I./libhb/ -I./contrib<br>/include -I/usr/include/libxml2=
  -c ../libhb/vfr.c -o libhb/vfr.o<br>../libhb/plist.c:15:10: fatal error: l=
 ibxml/parser.h: No such file or directory<br><div>=C2=A0#include &quot;libx=
 ml/parser.h&quot;</div><div><br></div><div>Yosuke<br></div><div class=3D"gm=
 ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">2020=E5=B9=B48=E6=9C=8820=
 =E6=97=A5(=E6=9C=A8) 17:40 Joerg Sonnenberger &lt;<a href=3D"mailto:joerg@b=
 ec.de">joerg@bec.de</a>&gt;:<br></div><blockquote class=3D"gmail_quote" sty=
 le=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddi=
 ng-left:1ex">The following reply was made to PR pkg/55593; it has been note=
 d by GNATS.<br>
 <br>
 From: Joerg Sonnenberger &lt;<a href=3D"mailto:joerg@bec.de" target=3D"_bla=
 nk">joerg@bec.de</a>&gt;<br>
 To: <a href=3D"mailto:gnats-bugs@netbsd.org" target=3D"_blank">gnats-bugs@n=
 etbsd.org</a><br>
 Cc: <a href=3D"mailto:pkg-manager@netbsd.org" target=3D"_blank">pkg-manager=
 @netbsd.org</a>, <a href=3D"mailto:gnats-admin@netbsd.org" target=3D"_blank=
 ">gnats-admin@netbsd.org</a>, <a href=3D"mailto:pkgsrc-bugs@netbsd.org" tar=
 get=3D"_blank">pkgsrc-bugs@netbsd.org</a><br>
 Subject: Re: pkg/55593: Proposed modification to <a href=3D"http://buildlin=
 k3.mk" rel=3D"noreferrer" target=3D"_blank">buildlink3.mk</a> of libxml2<br=
 >
 Date: Thu, 20 Aug 2020 10:36:31 +0200<br>
 <br>
 =C2=A0On Thu, Aug 20, 2020 at 03:40:00AM +0000, <a href=3D"mailto:you.kawas=
 aki@gmail.com" target=3D"_blank">you.kawasaki@gmail.com</a> wrote:<br>
 =C2=A0&gt; /var/pkg/work/multimedia/handbrake/work/.cwrapper/bin/cc -std=3D=
 gnu99<br>
 =C2=A0&gt; -pipe -fmessage-length=3D0 -Wall -Wno-format-truncation -g0 -O3 =
 -O2 -D_GNU_SOURCE<br>
 =C2=A0&gt; -I/usr/pkg/include/libxml2 ...<br>
 =C2=A0&gt; <br>
 =C2=A0&gt; I noticed that the CFLAG does not include &quot;include/libxml2&=
 quot;.<br>
 <br>
 =C2=A0But it doess?<br>
 <br>
 =C2=A0Joerg<br>
 <br>
 </blockquote></div></div>

 --000000000000d5786505ad59604a--

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Fri, 21 Aug 2020 19:58:56 +0200

 On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 > I noticed that the CFLAG does not include "include/libxml2".
 > When I added following line in buildlink3.mk of libxml2 to include "include/libxml2" in the CFLAG, building finished without an error for handbrake.

 So the short version is that this $#%^$%^$%^ hardcodes include paths for
 various systems and for Linux it falls through to explicitly using
 /usr/include. It should be using pkg-config like everyone... libxml2's
 b3.mk should most definitely not be changed for compensating for such a
 mess.

 Joerg

From: Jonathan Perkin <jperkin@joyent.com>
To: Joerg Sonnenberger <joerg@bec.de>
Cc: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Fri, 28 Aug 2020 16:05:09 +0100

 * On 2020-08-21 at 18:59 BST, Joerg Sonnenberger wrote:

 > On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 > > I noticed that the CFLAG does not include "include/libxml2".
 > > When I added following line in buildlink3.mk of libxml2 to include "include/libxml2" in the CFLAG, building finished without an error for handbrake.
 > 
 > So the short version is that this $#%^$%^$%^ hardcodes include paths for
 > various systems and for Linux it falls through to explicitly using
 > /usr/include. It should be using pkg-config like everyone... libxml2's
 > b3.mk should most definitely not be changed for compensating for such a
 > mess.

 FWIW I just ran into this on a system building www/nginx also.

 I don't see any _harm_ in adding the correct INCDIRS, it's what we do
 for a lot of other packages, so I'm going to add it unless there are
 serious objections.

 -- 
 Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Fri, 28 Aug 2020 18:12:37 +0200

 On Fri, Aug 28, 2020 at 04:05:09PM +0100, Jonathan Perkin wrote:
 > * On 2020-08-21 at 18:59 BST, Joerg Sonnenberger wrote:
 > 
 > > On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 > > > I noticed that the CFLAG does not include "include/libxml2".
 > > > When I added following line in buildlink3.mk of libxml2 to include "include/libxml2" in the CFLAG, building finished without an error for handbrake.
 > > 
 > > So the short version is that this $#%^$%^$%^ hardcodes include paths for
 > > various systems and for Linux it falls through to explicitly using
 > > /usr/include. It should be using pkg-config like everyone... libxml2's
 > > b3.mk should most definitely not be changed for compensating for such a
 > > mess.
 > 
 > FWIW I just ran into this on a system building www/nginx also.
 > 
 > I don't see any _harm_ in adding the correct INCDIRS, it's what we do
 > for a lot of other packages, so I'm going to add it unless there are
 > serious objections.

 If you do it in the package that fails that's definitely fine.
  Thomas

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	you.kawasaki@gmail.com
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Fri, 28 Aug 2020 23:50:34 +0200

 On Fri, Aug 28, 2020 at 04:15:02PM +0000, Thomas Klausner wrote:
 > The following reply was made to PR pkg/55593; it has been noted by GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc: 
 > Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
 > Date: Fri, 28 Aug 2020 18:12:37 +0200
 > 
 >  On Fri, Aug 28, 2020 at 04:05:09PM +0100, Jonathan Perkin wrote:
 >  > * On 2020-08-21 at 18:59 BST, Joerg Sonnenberger wrote:
 >  > 
 >  > > On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 >  > > > I noticed that the CFLAG does not include "include/libxml2".
 >  > > > When I added following line in buildlink3.mk of libxml2 to include "include/libxml2" in the CFLAG, building finished without an error for handbrake.
 >  > > 
 >  > > So the short version is that this $#%^$%^$%^ hardcodes include paths for
 >  > > various systems and for Linux it falls through to explicitly using
 >  > > /usr/include. It should be using pkg-config like everyone... libxml2's
 >  > > b3.mk should most definitely not be changed for compensating for such a
 >  > > mess.
 >  > 
 >  > FWIW I just ran into this on a system building www/nginx also.
 >  > 
 >  > I don't see any _harm_ in adding the correct INCDIRS, it's what we do
 >  > for a lot of other packages, so I'm going to add it unless there are
 >  > serious objections.
 >  
 >  If you do it in the package that fails that's definitely fine.

 I don't mind doing it in the leaves, but I do object to adding it to
 libxml2's b3.mk. Essentially, this is a hackaround for a steaming
 U+1F4A9 and the package here is definitely broken.

 Joerg

From: Jonathan Perkin <jperkin@joyent.com>
To: Joerg Sonnenberger <joerg@bec.de>
Cc: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org, you.kawasaki@gmail.com
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Thu, 3 Sep 2020 10:20:39 +0100

 * On 2020-08-28 at 22:50 BST, Joerg Sonnenberger wrote:

 > On Fri, Aug 28, 2020 at 04:15:02PM +0000, Thomas Klausner wrote:
 > > The following reply was made to PR pkg/55593; it has been noted by GNATS.
 > > 
 > > From: Thomas Klausner <wiz@NetBSD.org>
 > > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > > Cc: 
 > > Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
 > > Date: Fri, 28 Aug 2020 18:12:37 +0200
 > > 
 > >  On Fri, Aug 28, 2020 at 04:05:09PM +0100, Jonathan Perkin wrote:
 > >  > * On 2020-08-21 at 18:59 BST, Joerg Sonnenberger wrote:
 > >  > 
 > >  > > On Thu, Aug 20, 2020 at 03:40:00AM +0000, you.kawasaki@gmail.com wrote:
 > >  > > > I noticed that the CFLAG does not include "include/libxml2".
 > >  > > > When I added following line in buildlink3.mk of libxml2 to include "include/libxml2" in the CFLAG, building finished without an error for handbrake.
 > >  > > 
 > >  > > So the short version is that this $#%^$%^$%^ hardcodes include paths for
 > >  > > various systems and for Linux it falls through to explicitly using
 > >  > > /usr/include. It should be using pkg-config like everyone... libxml2's
 > >  > > b3.mk should most definitely not be changed for compensating for such a
 > >  > > mess.
 > >  > 
 > >  > FWIW I just ran into this on a system building www/nginx also.
 > >  > 
 > >  > I don't see any _harm_ in adding the correct INCDIRS, it's what we do
 > >  > for a lot of other packages, so I'm going to add it unless there are
 > >  > serious objections.
 > >  
 > >  If you do it in the package that fails that's definitely fine.
 > 
 > I don't mind doing it in the leaves, but I do object to adding it to
 > libxml2's b3.mk. Essentially, this is a hackaround for a steaming
 > U+1F4A9 and the package here is definitely broken.

 So why do we bother having BUILDLINK_INCDIRS in the first place?  What
 problems are we solving by having to patch every leaf instead of just
 fixing this in the infrastructure like we do for everything else?
 What possible side-effects are there of adding include/libxml2 for
 _only the configured libxml2_ to the search path?  It's not like we're
 going to accidentally find some incompatible libz in there or
 something...

 Fine, I'll go around adding patches for everything that breaks due to
 this, but it feels very against the pkgsrc philosophy, will mean
 constant future maintenance burden, and inconsistency in how different
 packages resolve the problem.

 -- 
 Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	you.kawasaki@gmail.com
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Thu, 3 Sep 2020 15:55:32 +0200

 On Thu, Sep 03, 2020 at 09:25:02AM +0000, Jonathan Perkin wrote:
 >  So why do we bother having BUILDLINK_INCDIRS in the first place?  What
 >  problems are we solving by having to patch every leaf instead of just
 >  fixing this in the infrastructure like we do for everything else?
 >  What possible side-effects are there of adding include/libxml2 for
 >  _only the configured libxml2_ to the search path?  It's not like we're
 >  going to accidentally find some incompatible libz in there or
 >  something...

 Did you read what I said why this is failing in first place? All sane
 build systems work fine because they use pkg-config already. This #$%#$%
 is singular shit by deciding that Linux must have things in /usr/include
 and hard-coding that. So no, I do not want to penalize everything
 everywhere just for the sake of one or two crappy packages.

 Joerg

From: Jonathan Perkin <jperkin@joyent.com>
To: Joerg Sonnenberger <joerg@bec.de>
Cc: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
	pkgsrc-bugs@netbsd.org, you.kawasaki@gmail.com
Subject: Re: pkg/55593: Proposed modification to buildlink3.mk of libxml2
Date: Thu, 3 Sep 2020 17:53:08 +0100

 * On 2020-09-03 at 14:55 BST, Joerg Sonnenberger wrote:

 > On Thu, Sep 03, 2020 at 09:25:02AM +0000, Jonathan Perkin wrote:
 > >  So why do we bother having BUILDLINK_INCDIRS in the first place?  What
 > >  problems are we solving by having to patch every leaf instead of just
 > >  fixing this in the infrastructure like we do for everything else?
 > >  What possible side-effects are there of adding include/libxml2 for
 > >  _only the configured libxml2_ to the search path?  It's not like we're
 > >  going to accidentally find some incompatible libz in there or
 > >  something...
 > 
 > Did you read what I said why this is failing in first place? All sane
 > build systems work fine because they use pkg-config already. This #$%#$%
 > is singular shit by deciding that Linux must have things in /usr/include
 > and hard-coding that. So no, I do not want to penalize everything
 > everywhere just for the sake of one or two crappy packages.

 Software is broken.  News at 11.  That's why we develop pkgsrc
 infrastructure to fix things large-scale where possible rather than
 having to patch individual packages.

 And still doesn't explain why adding BUILDLINK_INCDIRS *penalizes*
 anything.  It can only ever possibly point to the directory that has
 been deliberately chosen as where the correct software lives, and only
 when that software has been deliberately chosen to be enabled.

 -- 
 Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.