Discussion:
CVS commit: pkgsrc/devel/gettext-lib
Steven Drake
2012-08-29 09:01:01 UTC
Permalink
Module Name: pkgsrc
Committed By: sbd
Date: Wed Aug 29 09:01:01 UTC 2012

Modified Files:
pkgsrc/devel/gettext-lib: Makefile PLIST buildlink3.mk

Log Message:
Problem:

1) The libintl.h from gettext-lib renames the gettext functions so that
they are prefixed with 'libintl_' (So that the functions named in
libintl don't conflict with any that maybe in libc).

2) gettext-tools is _always_ built with gettext-lib.

3) The tools architecture may make gettext-tools a build dependence or
someone may choose to install gettext-tools.

4) The OS has built in gettext.

5) For some reason ${PREFIX}/include is add to the compiler search path and
libintl.h from gettext-lib is found before the system one.

The result is that all the gettext functions are renamed to have the
'libintl_' prefix but libintl is not linked with and the following happens:

${FILENAME}: undefined reference to `libintl_gettext'
${FILENAME}: undefined reference to `libintl_textdomain'
${FILENAME}: undefined reference to `libintl_bindtextdomain'
collect2: error: ld returned 1 exit status

Solution:
Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that
to the compiler search path when realy needed.

This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129
pkg/44009 and pkg/44016.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 pkgsrc/devel/gettext-lib/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/gettext-lib/PLIST
cvs rdiff -u -r1.33 -r1.34 pkgsrc/devel/gettext-lib/buildlink3.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
OBATA Akio
2012-08-29 09:38:41 UTC
Permalink
If such packages exist, it means such packages is looking out of
buildlink sandbox.
It should be fixed instead, or other headers and libraries from pkgsrc
also may be used accidentally.
Post by Steven Drake
Module Name: pkgsrc
Committed By: sbd
Date: Wed Aug 29 09:01:01 UTC 2012
pkgsrc/devel/gettext-lib: Makefile PLIST buildlink3.mk
1) The libintl.h from gettext-lib renames the gettext functions so that
they are prefixed with 'libintl_' (So that the functions named in
libintl don't conflict with any that maybe in libc).
2) gettext-tools is _always_ built with gettext-lib.
3) The tools architecture may make gettext-tools a build dependence or
someone may choose to install gettext-tools.
4) The OS has built in gettext.
5) For some reason ${PREFIX}/include is add to the compiler search path and
libintl.h from gettext-lib is found before the system one.
The result is that all the gettext functions are renamed to have the
${FILENAME}: undefined reference to `libintl_gettext'
${FILENAME}: undefined reference to `libintl_textdomain'
${FILENAME}: undefined reference to `libintl_bindtextdomain'
collect2: error: ld returned 1 exit status
Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that
to the compiler search path when realy needed.
This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129
pkg/44009 and pkg/44016.
Bump PKGREVISION.
cvs rdiff -u -r1.52 -r1.53 pkgsrc/devel/gettext-lib/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/gettext-lib/PLIST
cvs rdiff -u -r1.33 -r1.34 pkgsrc/devel/gettext-lib/buildlink3.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
--
OBATA Akio / ***@NetBSD.org
Steven Drake
2012-08-30 07:45:55 UTC
Permalink
Post by OBATA Akio
If such packages exist, it means such packages is looking out of
buildlink sandbox.
It should be fixed instead, or other headers and libraries from pkgsrc
also may be used accidentally.
Yes there are such packages, I agree, they should be fixed and yes other
header and libraries from pkgsrc can also be accidentally used.
(I working on the one such set of special case packages now).

But what about the case where LOCALBASE=/usr/local?
--
Steven
OBATA Akio
2012-08-30 08:02:42 UTC
Permalink
Post by Steven Drake
Post by OBATA Akio
If such packages exist, it means such packages is looking out of
buildlink sandbox.
It should be fixed instead, or other headers and libraries from pkgsrc
also may be used accidentally.
Yes there are such packages, I agree, they should be fixed and yes other
header and libraries from pkgsrc can also be accidentally used.
(I working on the one such set of special case packages now).
Thanks!
Post by Steven Drake
But what about the case where LOCALBASE=/usr/local?
About the case that /usr/local is one of the default search paths
for the compiler?
You can find the solution for the case of Darwin in mk/platform/Darwin.mk
--
OBATA Akio / ***@NetBSD.org
Steven Drake
2012-08-30 09:03:43 UTC
Permalink
Post by OBATA Akio
Post by Steven Drake
But what about the case where LOCALBASE=/usr/local?
About the case that /usr/local is one of the default search paths
for the compiler?
Which is how gcc is normal built.
Post by OBATA Akio
You can find the solution for the case of Darwin in mk/platform/Darwin.mk
While that may be an idea what about the case where someone is using the
compiler outside of pkgsrc?

Perhaps we should consider a policy where headers and libraries that have
name conflicts with system ones get installed into subdirectories?
--
Steven
OBATA Akio
2012-08-30 09:32:36 UTC
Permalink
Post by Steven Drake
Post by OBATA Akio
Post by Steven Drake
But what about the case where LOCALBASE=/usr/local?
About the case that /usr/local is one of the default search paths
for the compiler?
Which is how gcc is normal built.
Then, should the trick also applied for the case using gcc from pkgsrc?
Post by Steven Drake
Post by OBATA Akio
You can find the solution for the case of Darwin in mk/platform/Darwin.mk
While that may be an idea what about the case where someone is using the
compiler outside of pkgsrc?
I have no idea except not using LOCALBASE=/usr/local.
Post by Steven Drake
Perhaps we should consider a policy where headers and libraries that have
name conflicts with system ones get installed into subdirectories?
But, for example, on Linux, any of headers and libraries may be in base system,
so all packages will be affected.
--
OBATA Akio / ***@NetBSD.org
John Marino
2012-08-31 17:44:57 UTC
Permalink
Post by Steven Drake
Module Name: pkgsrc
Committed By: sbd
Date: Wed Aug 29 09:01:01 UTC 2012
pkgsrc/devel/gettext-lib: Makefile PLIST buildlink3.mk
1) The libintl.h from gettext-lib renames the gettext functions so that
they are prefixed with 'libintl_' (So that the functions named in
libintl don't conflict with any that maybe in libc).
2) gettext-tools is _always_ built with gettext-lib.
3) The tools architecture may make gettext-tools a build dependence or
someone may choose to install gettext-tools.
4) The OS has built in gettext.
5) For some reason ${PREFIX}/include is add to the compiler search path and
libintl.h from gettext-lib is found before the system one.
The result is that all the gettext functions are renamed to have the
${FILENAME}: undefined reference to `libintl_gettext'
${FILENAME}: undefined reference to `libintl_textdomain'
${FILENAME}: undefined reference to `libintl_bindtextdomain'
collect2: error: ld returned 1 exit status
Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that
to the compiler search path when realy needed.
This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129
pkg/44009 and pkg/44016.
Bump PKGREVISION.
I just started a full bulkbuild that is 1800 packages in and I think I
already see a regression due to this.

devel/php-gettext: Configure: error: Cannot locate header file libintl.h

Is there something wrong with php-gettext or this gettext-lib change?

John
Ryo ONODERA
2012-08-31 20:10:11 UTC
Permalink
Hi,
Post by John Marino
Post by Steven Drake
Module Name: pkgsrc
Committed By: sbd
Date: Wed Aug 29 09:01:01 UTC 2012
pkgsrc/devel/gettext-lib: Makefile PLIST buildlink3.mk
1) The libintl.h from gettext-lib renames the gettext functions so that
they are prefixed with 'libintl_' (So that the functions named in
libintl don't conflict with any that maybe in libc).
2) gettext-tools is _always_ built with gettext-lib.
3) The tools architecture may make gettext-tools a build dependence or
someone may choose to install gettext-tools.
4) The OS has built in gettext.
5) For some reason ${PREFIX}/include is add to the compiler search path and
libintl.h from gettext-lib is found before the system one.
The result is that all the gettext functions are renamed to have the
${FILENAME}: undefined reference to `libintl_gettext'
${FILENAME}: undefined reference to `libintl_textdomain'
${FILENAME}: undefined reference to `libintl_bindtextdomain'
collect2: error: ld returned 1 exit status
Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that
to the compiler search path when realy needed.
This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129
pkg/44009 and pkg/44016.
Bump PKGREVISION.
I just started a full bulkbuild that is 1800 packages in and I think I
already see a regression due to this.
devel/php-gettext: Configure: error: Cannot locate header file
libintl.h
Is there something wrong with php-gettext or this gettext-lib change?
On DragonFly 3.0.1(that uses gettext from pkgsrc, and native gcc 4.4.7),
I have gotten the following errors (cases of normal bmake run
and bmake -d e) on devel/gobject-introspection.

It seems that -I/usr/pkg/include/gettext is not utilized.

=== error message with "bmake build"
CCLD gi-dump-types
CC glib_print-glib-print.o
CCLD glib-print
GEN g-ir-scanner
GEN g-ir-annotation-tool
GISCAN GLib-2.0.gir
In file included from <stdin>:36:
/usr/pkg/include/glib/glib-2.0/glib/gi18n.h:25:21: error: libintl.h: No such file or directory
Error while processing the source.
gmake[2]: *** [GLib-2.0.gir] Error 1
gmake[2]: Leaving directory `/usr/tmp/devel/gobject-introspection/work/gobject-introspection-1.32.1'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/tmp/devel/gobject-introspection/work/gobject-introspection-1.32.1'
gmake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/devel/gobject-introspection
*** Error code 1



== error message with "bmake -d e" (auto-fill-ed with emacs)
*** Failed target: do-build
*** Failed command: set -e; cd
/usr/tmp/devel/gobject-introspection/work/gobject-introspection-1.32.1
&& cd
/usr/tmp/devel/gobject-introspection/work/gobject-introspection-1.32.1
&& /usr/bin/env USETOOLS=no PTHREAD_CFLAGS=\ -pthread\
PTHREAD_LDFLAGS=\ -pthread PTHREAD_LIBS=-lpthread\ -lrt
PTHREADBASE=/usr DL_CFLAGS= DL_LDFLAGS= DL_LIBS=
PYTHON=/usr/pkg/bin/python2.7 CC=cc CFLAGS=-O2\ -I/usr/pkg/include\
-I/usr/include\ -I/usr/pkg/include/gettext
CPPFLAGS=-I/usr/pkg/include\ -I/usr/include\
-I/usr/pkg/include/gettext CXX=c++ CXXFLAGS=-O2\ -I/usr/pkg/include\
-I/usr/include\ -I/usr/pkg/include/gettext COMPILER_RPATH_FLAG=-Wl,-R
F77=f77 FC=f77 FFLAGS=-O LANG=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C
LC_MONETARY=C LC_NUMERIC=C LC_TIME=C LDFLAGS=-L/usr/pkg/lib\
-Wl,-R/usr/pkg/lib\ -L/usr/lib\ -Wl,-R/usr/lib LINKER_RPATH_FLAG=-R
PATH=/usr/tmp/devel/gobject-introspection/work/.wrapper/bin:/usr/tmp/devel/gobject-introspection/work/.buildlink/bin:/usr/tmp/devel/gobject-introspection/work/.gcc/bin:/usr/tmp/devel/gobject-introspection/work/.tools/bin:/usr/pkg/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/usr/pkg/bin:/usr/pkg/bin
PREFIX=/usr/pkg PKG_SYSCONFDIR=/usr/pkg/etc CXXCPP=cpp
HOME=/usr/tmp/devel/gobject-introspection/work/.home CPP=cpp
LINK_ALL_LIBGCC_HACK= LOCALBASE=/usr/pkg
NO_WHOLE_ARCHIVE_FLAG=-Wl,--no-whole-archive
WHOLE_ARCHIVE_FLAG=-Wl,--whole-archive X11BASE=/usr/pkg
X11PREFIX=/usr/pkg PKGMANDIR=man PKGINFODIR=info MAKECONF=/dev/null
OBJECT_FMT=ELF USETOOLS=no LIBTOOL="libtool "
BSD_INSTALL_PROGRAM=/usr/bin/install\ -c\ -s\ -o\ root\ -g\ wheel\ -m\
755 BSD_INSTALL_SCRIPT=/usr/bin/install\ -c\ -o\ root\ -g\ wheel\ -m\
755 BSD_INSTALL_LIB=/usr/bin/install\ -c\ -o\ root\ -g\ wheel\ -m\ 755
BSD_INSTALL_DATA=/usr/bin/install\ -c\ -o\ root\ -g\ wheel\ -m\ 644
BSD_INSTALL_MAN=/usr/bin/install\ -c\ -o\ root\ -g\ wheel\ -m\ 644
BSD_INSTALL=/usr/bin/install BSD_INSTALL_PROGRAM_DIR=/usr/bin/install\
-d\ -o\ root\ -g\ wheel\ -m\ 755
BSD_INSTALL_SCRIPT_DIR=/usr/bin/install\ -d\ -o\ root\ -g\ wheel\ -m\
755 BSD_INSTALL_LIB_DIR=/usr/bin/install\ -d\ -o\ root\ -g\ wheel\ -m\
755 BSD_INSTALL_DATA_DIR=/usr/bin/install\ -d\ -o\ root\ -g\ wheel\
-m\ 755 BSD_INSTALL_MAN_DIR=/usr/bin/install\ -d\ -o\ root\ -g\ wheel\
-m\ 755 BSD_INSTALL_GAME=/usr/bin/install\ -c\ -s\ -o\ root\ -g\
wheel\ -m\ 2555 BSD_INSTALL_GAME_DATA=/usr/bin/install\ -c\ -o\ root\
-g\ wheel\ -m\ 664 BSD_INSTALL_GAME_DIR=/usr/bin/install\ -d\ -o\
root\ -g\ wheel\ -m\ 775 INSTALL_INFO=
MAKEINFO=/usr/tmp/devel/gobject-introspection/work/.tools/bin/makeinfo
FLEX=/usr/tmp/devel/gobject-introspection/work/.tools/bin/flex
BISON=/usr/tmp/devel/gobject-introspection/work/.tools/bin/bison
PKG_CONFIG=/usr/tmp/devel/gobject-introspection/work/.tools/bin/pkg-config
PKG_CONFIG_LIBDIR=/usr/tmp/devel/gobject-introspection/work/.buildlink/lib/pkgconfig:/usr/tmp/devel/gobject-introspection/work/.buildlink/share/pkgconfig
PKG_CONFIG_LOG=/usr/tmp/devel/gobject-introspection/work/.pkg-config.log
PKG_CONFIG_PATH= WRAPPER_DEBUG=no WRAPPER_UPDATE_CACHE=yes
VIEWBASE=/usr/pkg /usr/pkg/bin/gmake -f Makefile all

--
Ryo ONODERA // ***@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Ryo ONODERA
2012-09-01 08:19:49 UTC
Permalink
Post by Ryo ONODERA
Hi,
Post by John Marino
Post by Steven Drake
Module Name: pkgsrc
Committed By: sbd
Date: Wed Aug 29 09:01:01 UTC 2012
pkgsrc/devel/gettext-lib: Makefile PLIST buildlink3.mk
1) The libintl.h from gettext-lib renames the gettext functions so that
they are prefixed with 'libintl_' (So that the functions named in
libintl don't conflict with any that maybe in libc).
2) gettext-tools is _always_ built with gettext-lib.
3) The tools architecture may make gettext-tools a build dependence or
someone may choose to install gettext-tools.
4) The OS has built in gettext.
5) For some reason ${PREFIX}/include is add to the compiler search path and
libintl.h from gettext-lib is found before the system one.
The result is that all the gettext functions are renamed to have the
${FILENAME}: undefined reference to `libintl_gettext'
${FILENAME}: undefined reference to `libintl_textdomain'
${FILENAME}: undefined reference to `libintl_bindtextdomain'
collect2: error: ld returned 1 exit status
Hide libintl.h from gettext-lib in ${PREFIX}/include/gettext then add that
to the compiler search path when realy needed.
This should permanently fix PR's pkg/24326 pkg/36201 pkg/40153 pkg/43129
pkg/44009 and pkg/44016.
Bump PKGREVISION.
I just started a full bulkbuild that is 1800 packages in and I think I
already see a regression due to this.
devel/php-gettext: Configure: error: Cannot locate header file libintl.h
Is there something wrong with php-gettext or this gettext-lib change?
On DragonFly 3.0.1(that uses gettext from pkgsrc, and native gcc 4.4.7),
I have gotten the following errors (cases of normal bmake run
and bmake -d e) on devel/gobject-introspection.
It seems that -I/usr/pkg/include/gettext is not utilized.
Modifying glib-2.0.pc's Cflags: line to add -I/usr/pkg/include/gettext
helps me.
Automated mechanism of overriding .pc file is required?

--
Ryo ONODERA // ***@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
OBATA Akio
2012-09-01 08:41:35 UTC
Permalink
Please try to apply followings:

Index: devel/gettext-lib/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gettext-lib/buildlink3.mk,v
retrieving revision 1.34
diff -u -r1.34 buildlink3.mk
--- devel/gettext-lib/buildlink3.mk 29 Aug 2012 09:01:01 -0000 1.34
+++ devel/gettext-lib/buildlink3.mk 1 Sep 2012 08:38:39 -0000
@@ -35,7 +35,7 @@
.if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
USE_BUILTIN.iconv= yes
.else
-BUILDLINK_INCDIRS.gettext+= include/gettext
+BUILDLINK_FNAME_TRANSFORM.gettext+= -e 's|include/gettext/|include/|'
.endif

.include "../../converters/libiconv/buildlink3.mk"
--
OBATA Akio / ***@NetBSD.org
John Marino
2012-09-01 08:49:39 UTC
Permalink
Post by OBATA Akio
Index: devel/gettext-lib/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gettext-lib/buildlink3.mk,v
retrieving revision 1.34
diff -u -r1.34 buildlink3.mk
--- devel/gettext-lib/buildlink3.mk 29 Aug 2012 09:01:01 -0000 1.34
+++ devel/gettext-lib/buildlink3.mk 1 Sep 2012 08:38:39 -0000
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.

I will leave it in place though to continue this build.

John
OBATA Akio
2012-09-01 09:09:03 UTC
Permalink
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of BUILDLINK_PREFIX.gettext
to configure script.

IMO, it is better to revert the change, sacrifice more than one gains.
--
OBATA Akio / ***@NetBSD.org
John Marino
2012-09-01 09:14:20 UTC
Permalink
Post by OBATA Akio
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
IMO, it is better to revert the change, sacrifice more than one gains.
Which change to do recommend reverting?
The original devel/gettext-lib change or the buildlink3.mk patch?
OBATA Akio
2012-09-02 02:46:23 UTC
Permalink
Post by John Marino
Post by OBATA Akio
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
IMO, it is better to revert the change, sacrifice more than one gains.
Which change to do recommend reverting?
The original devel/gettext-lib change or the buildlink3.mk patch?
original change
--
OBATA Akio / ***@NetBSD.org
John Marino
2012-09-01 18:40:50 UTC
Permalink
Post by OBATA Akio
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
IMO, it is better to revert the change, sacrifice more than one gains.
you know, this patch works on php-gettext outside of the bulk build, I
confirmed that it didn't build without the patch and then rebuilding
gettext-lib with the patch allowed php-gettext to configure.

I applied it in the middle of the build, so maybe there's something out
of config (even rebuilding gettext-lib inside bulk build didn't fix it).

So let's not give up on this patch just yet.
John
John Marino
2012-09-01 19:00:12 UTC
Permalink
Post by John Marino
Post by OBATA Akio
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
IMO, it is better to revert the change, sacrifice more than one gains.
you know, this patch works on php-gettext outside of the bulk build, I
confirmed that it didn't build without the patch and then rebuilding
gettext-lib with the patch allowed php-gettext to configure.
I applied it in the middle of the build, so maybe there's something out
of config (even rebuilding gettext-lib inside bulk build didn't fix it).
So let's not give up on this patch just yet.
John
I must have configured the wrong package because php-gettext doesn't
build outside bulk either. However, I'm looking at config.m4 and
configure.in and the script is looking at /usr/pkg/include/libintl.h
instead of $WRKSRC/.buildlink/include/libintl. due to the CONFIGURE_ARG
in the source package makefile.

So your patch correctly fixes the .buildlink but this package isn't
looking there.

John
John Marino
2012-09-01 19:10:23 UTC
Permalink
Post by John Marino
Post by John Marino
Post by OBATA Akio
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
IMO, it is better to revert the change, sacrifice more than one gains.
you know, this patch works on php-gettext outside of the bulk build, I
confirmed that it didn't build without the patch and then rebuilding
gettext-lib with the patch allowed php-gettext to configure.
I applied it in the middle of the build, so maybe there's something out
of config (even rebuilding gettext-lib inside bulk build didn't fix it).
So let's not give up on this patch just yet.
John
I must have configured the wrong package because php-gettext doesn't
build outside bulk either. However, I'm looking at config.m4 and
configure.in and the script is looking at /usr/pkg/include/libintl.h
instead of $WRKSRC/.buildlink/include/libintl. due to the CONFIGURE_ARG
in the source package makefile.
So your patch correctly fixes the .buildlink but this package isn't
looking there.
The attached patch to devel/php-gettext will fix the build.
It works inside and outside the bulk build, but it references the
.buildlink directory directly. Is that okay? It forces the configure
script to look inside the wrappers first.

John
OBATA Akio
2012-09-02 02:59:44 UTC
Permalink
Post by John Marino
Post by John Marino
Post by John Marino
Post by OBATA Akio
Post by John Marino
This patch did not fix php-gettext - it still fails at the configure
target due to being unable to locate libintl.h.
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
IMO, it is better to revert the change, sacrifice more than one gains.
you know, this patch works on php-gettext outside of the bulk build, I
confirmed that it didn't build without the patch and then rebuilding
gettext-lib with the patch allowed php-gettext to configure.
I applied it in the middle of the build, so maybe there's something out
of config (even rebuilding gettext-lib inside bulk build didn't fix it).
So let's not give up on this patch just yet.
John
I must have configured the wrong package because php-gettext doesn't
build outside bulk either. However, I'm looking at config.m4 and
configure.in and the script is looking at /usr/pkg/include/libintl.h
instead of $WRKSRC/.buildlink/include/libintl. due to the CONFIGURE_ARG
in the source package makefile.
So your patch correctly fixes the .buildlink but this package isn't
looking there.
The attached patch to devel/php-gettext will fix the build.
It works inside and outside the bulk build, but it references the
.buildlink directory directly. Is that okay? It forces the configure
script to look inside the wrappers first.
Post by John Marino
Post by John Marino
Post by OBATA Akio
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
You should use ${BUILDLINK_DIR} instead of ${WRKDIR}/.buildlink.

But this kind of trick may introduce potentially $WRKDIR reference injection
into the result of built, so it should be taken carefully.
--
OBATA Akio / ***@NetBSD.org
John Marino
2012-09-02 07:01:49 UTC
Permalink
Post by OBATA Akio
Post by OBATA Akio
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
You should use ${BUILDLINK_DIR} instead of ${WRKDIR}/.buildlink.
But this kind of trick may introduce potentially $WRKDIR reference injection
into the result of built, so it should be taken carefully.
I understand.
In this particularly case, I think using BUILDLINK_DIR fixes the build
correctly. The whole gettext-lib modification is essentially "a trick"
so php-gettext needs another trick to restore it on platforms like
DragonFly.

My bulk build finished last night, the one where I applied the
gettext-lib/buildlink3.mk patch. I did not see any more gettext-lib
related package failures.

So:
1) I think the gettext-lib modification made by SD can stay in place
2) You should commit the gettext-lib/buildlink3.mk patch
3) I will commit the update to php-gettext

What do you think?

John
OBATA Akio
2012-09-02 09:30:58 UTC
Permalink
Post by John Marino
Post by OBATA Akio
Post by OBATA Akio
For such cases, need to pass BUILDLINK_DIR instead of
BUILDLINK_PREFIX.gettext
to configure script.
You should use ${BUILDLINK_DIR} instead of ${WRKDIR}/.buildlink.
But this kind of trick may introduce potentially $WRKDIR reference injection
into the result of built, so it should be taken carefully.
I understand.
In this particularly case, I think using BUILDLINK_DIR fixes the build
correctly. The whole gettext-lib modification is essentially "a trick"
so php-gettext needs another trick to restore it on platforms like
DragonFly.
My bulk build finished last night, the one where I applied the
gettext-lib/buildlink3.mk patch. I did not see any more gettext-lib
related package failures.
1) I think the gettext-lib modification made by SD can stay in place
2) You should commit the gettext-lib/buildlink3.mk patch
3) I will commit the update to php-gettext
What do you think?
For builtin gettext, its libintl.h should be linked into ${BUILDLINK_DIR}/include,
or builtin libintl.h may not be found by configure script.
--
OBATA Akio / ***@NetBSD.org
Steven Drake
2012-09-11 07:47:23 UTC
Permalink
Excuse me for not replying sooner (it been that sort of a week+).
Post by OBATA Akio
IMO, it is better to revert the change, sacrifice more than one gains.
IMHO your complete wrong as what one gains is a lot more than you realize
and with your suggested changes to the buildlink3.mk there are far fewer
(if any) sacrifices.

Also IMO is silly having gettext-tools and gettext use the pkgsrc version
of libintl on Linux.
--
Steven
Ryo ONODERA
2012-09-02 03:16:32 UTC
Permalink
Hi,
Post by OBATA Akio
Index: devel/gettext-lib/buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/gettext-lib/buildlink3.mk,v
retrieving revision 1.34
diff -u -r1.34 buildlink3.mk
--- devel/gettext-lib/buildlink3.mk 29 Aug 2012 09:01:01 -0000 1.34
+++ devel/gettext-lib/buildlink3.mk 1 Sep 2012 08:38:39 -0000
@@ -35,7 +35,7 @@
.if !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
USE_BUILTIN.iconv= yes
.else
-BUILDLINK_INCDIRS.gettext+= include/gettext
+BUILDLINK_FNAME_TRANSFORM.gettext+= -e 's|include/gettext/|include/|'
.endif
.include "../../converters/libiconv/buildlink3.mk"
This patch works fine.

Thank you.

--
Ryo ONODERA // ***@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
John Marino
2012-09-02 14:08:38 UTC
Permalink
Module Name: pkgsrc
Committed By: marino
Date: Sun Sep 2 14:08:38 UTC 2012

Modified Files:
pkgsrc/devel/gettext-lib: buildlink3.mk

Log Message:
devel/gettext-lib: Change buildlink location of libintl.h

The previous change to devel/gettext-lib moved the libintl header to
include/gettext. For platforms that don't have native libintl, this
header needs to be at include inside the buildlink directory. This
patch makes that happen.

Contributed-by: OBATA Akio


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 pkgsrc/devel/gettext-lib/buildlink3.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
John Marino
2012-09-02 14:12:59 UTC
Permalink
Post by Steven Drake
Module Name: pkgsrc
Committed By: marino
Date: Sun Sep 2 14:08:38 UTC 2012
pkgsrc/devel/gettext-lib: buildlink3.mk
devel/gettext-lib: Change buildlink location of libintl.h
The previous change to devel/gettext-lib moved the libintl header to
include/gettext. For platforms that don't have native libintl, this
header needs to be at include inside the buildlink directory. This
patch makes that happen.
Contributed-by: OBATA Akio
If the recent change to devel/gettext-lib is reverted, this commit must
be reverted too. The fix to devel/php-gettext doesn't have to be
reverted, it should continue to work with "old" gettext-lib.
Loading...