Bug 147655 - [PATCH] textproc/libxslt: remove USE_GETTEXT=yes
Summary: [PATCH] textproc/libxslt: remove USE_GETTEXT=yes
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-07 17:00 UTC by Sunpoet Po-Chuan Hsieh
Modified: 2010-07-20 22:40 UTC (History)
1 user (show)

See Also:


Attachments
libxslt-1.1.26_1.patch (418 bytes, patch)
2010-06-07 17:00 UTC, Sunpoet Po-Chuan Hsieh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sunpoet Po-Chuan Hsieh 2010-06-07 17:00:17 UTC
gettext dependency was added to libxslt if CRYPTO option is on (by default).
However, libxslt does not link against gettext library if libgpg-error was built without NLS support (WITHOUT_NLS option).
Thus I think USE_GETTEXT should be removed.

Dependency tree:
libxslt ---> libgcrypt ---> libgpg-error ---> gettext
     depends on                      (conditional)

Port maintainer (gnome@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99

How-To-Repeat: 
% cd /usr/ports/security/libgpg-error
% make WITHOUT_NLS=yes install
% cd /usr/ports/textproc/libxslt
% make -V WITH_CRYPTO
true
% make install
% ldd /usr/local/lib/libexslt.so.8 /usr/local/lib/libxslt.so.2
/usr/local/lib/libexslt.so.8:
        libgcrypt.so.16 => /usr/local/lib/libgcrypt.so.16 (0x800c00000)
        libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x800d71000)
        libxslt.so.2 => /usr/local/lib/libxslt.so.2 (0x800e74000)
        libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x800faa000)
        libz.so.5 => /lib/libz.so.5 (0x8011e8000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x8012fc000)
        libm.so.5 => /lib/libm.so.5 (0x8014fe000)
        libc.so.7 => /lib/libc.so.7 (0x800645000)
/usr/local/lib/libxslt.so.2:
        libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x800c00000)
        libz.so.5 => /lib/libz.so.5 (0x800e3e000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x800f52000)
        libm.so.5 => /lib/libm.so.5 (0x801154000)
        libc.so.7 => /lib/libc.so.7 (0x800645000)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-06-07 17:00:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 ports@c0decafe.net 2010-06-10 21:08:04 UTC
Helo,

On Thu, Jun 10, 2010 at 9:27 AM, Sunpoet Hsieh <sunpoet@sunpoet.net> wrote:
> On Thu, Jun 10, 2010 at 5:59 AM, ports@c0decafe.net <ports@c0decafe.net> =
wrote:
>> On Mon, 07 Jun 2010 23:51:51 +0800, Sunpoet Po-Chuan Hsieh wrote:
>>> gettext dependency was added to libxslt if CRYPTO option is on (by
>>> default). However, libxslt does not link against gettext library if
>>> libgpg-error was built without NLS support (WITHOUT_NLS option). Thus I
>>> think USE_GETTEXT should be removed.
>>>
>>> Dependency tree:
>>> libxslt ---> libgcrypt ---> libgpg-error ---> gettext
>>> =A0 =A0 =A0depends on =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(condi=
tional)
>>
>> I'm not sure it is that simple.
>> Consider the following:
>> gmake[3]: Entering directory `/build/usr/ports/devel/eggdbus/work/
>> eggdbus-0.6/docs/man'
>> /usr/local/bin/xsltproc -nonet http://docbook.sourceforge.net/release/xs=
l/
>> current/manpages/docbook.xsl eggdbus-binding-tool.xml
>> /libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required b=
y
>> "libgcrypt.so.16"

> For me, I build libgpg-error without gettext (WITHOUT_NLS=3Dyes), thus
> my libxslt does not require gettext.

yes, but can WITHOUT_NLS guarantee that all dependencies are gettext safe?

If so, we could just make it actually respect WITHOUT_NLS:

--- Makefile.orig       2010-06-10 22:29:02.000000000 +0300
+++ Makefile    2010-06-10 22:31:57.000000000 +0300
@@ -46,7 +46,9 @@

 .if defined(WITH_CRYPTO)
 LIB_DEPENDS+=3D  gcrypt.16:${PORTSDIR}/security/libgcrypt
+.if !defined(WITHOUT_NLS)
 USE_GETTEXT=3D		yes
+.endif
 .else
 CONFIGURE_ARGS+=3D--without-crypto
 .endif

But i still see some serious breakages potential: race conditions, etc.

For the general use case, an implicit dependency might still be there.

Only USE_GETTEXT +bumps are safe for all the possible scenarios.

Just thoughts.
Comment 3 Sunpoet Po-Chuan Hsieh 2010-06-11 21:17:54 UTC
On Fri, Jun 11, 2010 at 4:08 AM,  <ports@c0decafe.net> wrote:
> Helo,
>
> On Thu, Jun 10, 2010 at 9:27 AM, Sunpoet Hsieh <sunpoet@sunpoet.net> wrot=
e:
>> On Thu, Jun 10, 2010 at 5:59 AM, ports@c0decafe.net <ports@c0decafe.net>=
 wrote:
>>> On Mon, 07 Jun 2010 23:51:51 +0800, Sunpoet Po-Chuan Hsieh wrote:
>>>> gettext dependency was added to libxslt if CRYPTO option is on (by
>>>> default). However, libxslt does not link against gettext library if
>>>> libgpg-error was built without NLS support (WITHOUT_NLS option). Thus =
I
>>>> think USE_GETTEXT should be removed.
>>>>
>>>> Dependency tree:
>>>> libxslt ---> libgcrypt ---> libgpg-error ---> gettext
>>>> =C2=A0 =C2=A0 =C2=A0depends on =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(conditional)
>>>
>>> I'm not sure it is that simple.
>>> Consider the following:
>>> gmake[3]: Entering directory `/build/usr/ports/devel/eggdbus/work/
>>> eggdbus-0.6/docs/man'
>>> /usr/local/bin/xsltproc -nonet http://docbook.sourceforge.net/release/x=
sl/
>>> current/manpages/docbook.xsl eggdbus-binding-tool.xml
>>> /libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required =
by
>>> "libgcrypt.so.16"
>
>> For me, I build libgpg-error without gettext (WITHOUT_NLS=3Dyes), thus
>> my libxslt does not require gettext.
>
> yes, but can WITHOUT_NLS guarantee that all dependencies are gettext safe=
?
>
> If so, we could just make it actually respect WITHOUT_NLS:
>
> --- Makefile.orig =C2=A0 =C2=A0 =C2=A0 2010-06-10 22:29:02.000000000 +030=
0
> +++ Makefile =C2=A0 =C2=A02010-06-10 22:31:57.000000000 +0300
> @@ -46,7 +46,9 @@
>
> =C2=A0.if defined(WITH_CRYPTO)
> =C2=A0LIB_DEPENDS+=3D =C2=A0gcrypt.16:${PORTSDIR}/security/libgcrypt
> +.if !defined(WITHOUT_NLS)
> =C2=A0USE_GETTEXT=3D =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 yes
> +.endif
> =C2=A0.else
> =C2=A0CONFIGURE_ARGS+=3D--without-crypto
> =C2=A0.endif
>
> But i still see some serious breakages potential: race conditions, etc.
>
> For the general use case, an implicit dependency might still be there.
>
> Only USE_GETTEXT +bumps are safe for all the possible scenarios.
>
> Just thoughts.
>

IMHO, for direct dependency, explicit declaration is required (ex:
USE_GETTEXT=3Dyes).
For indirect dependency, PORTVERSION bump is enough when shared
library version changes.
It is impractial to add all knobs which cover all combinations of
indirect dependencies.
If one of the dependencies requires gettext, gettext is already in the
depends list.
'make all-depends-list' shows the list.
Adding USE_GETTEXT to Makefile is needless.
Even more, it complicates and misleads the port dependency.
Think about A ---> B ---> gettext.
Say that you add USE_GETTEXT to A's Makefile.
Once B removes gettext from its dependencies (e.g. a newer version),
both A and B are gettext-safe now.
However, you still need gettext to build A due to the incorrect USE_GETTEXT=
.

Back to the libxslt case, I must emphasize that libxslt itself is gettext-s=
afe.
It requires gettext if and only if libgpg-error was built with gettext.

At last, I do not see any serious breakages you mentioned.
Would you please give out some examples?

- Sunpoet
Comment 4 dfilter service freebsd_committer freebsd_triage 2010-07-20 22:33:57 UTC
mezz        2010-07-20 21:33:43 UTC

  FreeBSD ports repository

  Modified files:
    textproc/libxslt     Makefile 
  Log:
  Remove USE_GETTEXT. There is no perfect solution in the ports tree. It's
  exactly why we have portmaster -r or portupgrade -r for that.
  
  PR:             ports/147655
  Reported by:    Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net>
  Discussed with: marcus
  Feature safe:   yes
  
  Revision  Changes    Path
  1.96      +0 -1      ports/textproc/libxslt/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Jeremy Messenger freebsd_committer freebsd_triage 2010-07-20 22:33:59 UTC
State Changed
From-To: open->closed

I agree, I have removed it.