bugGNU gettext - Bugs: bug #48233, libintl still built even when...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48233: libintl still built even when passed --without-included-gettext

Submitter:  Mike Frysinger <vapier>
Submitted:  Wed 15 Jun 2016 03:58:10 PM UTC
   
 
Category:  Build Severity:  3 - Normal
Item Group:  None Status:  Not a Bug
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Thu 04 Jan 2018 10:30:14 AM UTC, comment #4: 

that's not how it's working.  we see libintl.so get built & installed even when we pass --without-included-gettext.

you can find extended build logs here:
  https://bugs.gentoo.org/564168

Mike Frysinger <vapier>
Tue 02 Jan 2018 07:28:19 PM UTC, comment #3: 


> the testsuite angle is already handled further down in the file:
> http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/gettext.m4?id=v0.19.8#n349


Yes, that's the point. The option --with-included-gettext means "use the GNU gettext library included here". When you pass --without-included-gettext, the GNU libintl included here will be built but not used (except in the test suite).

Bruno Haible <haible>
Group administrator
Wed 15 Jun 2016 08:44:49 PM UTC, comment #2: 

the testsuite angle is already handled further down in the file:
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/gettext.m4?id=v0.19.8#n349

in Gentoo, i ended up just deleting lines 259 & 260 that checked the $PACKAGE name.

Mike Frysinger <vapier>
Wed 15 Jun 2016 08:38:30 PM UTC, comment #1: 

I haven't looked into the detail, but I suspect that this is intentional so that we can test the included libintl functionality in our test suite:
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-tools/tests/gettext-3-prg.c#n28

Daiki Ueno <ueno>
Group administrator
Wed 15 Jun 2016 03:58:10 PM UTC, original submission:  

when building gettext on a system that has libintl (whether from gettext or elsewhere), passing the --without-included-gettext option is ignored.  this makes it a pain to build just the tools, or to maintain libintl as a sep package from gettext.

the problematic snippet is centered here:
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/gettext.m4?id=v0.19.8#n253
        dnl If an already present or preinstalled GNU gettext() is found,
        dnl use it.  But if this macro is used in GNU gettext, and GNU
        dnl gettext is already preinstalled in libintl, we update this
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
                && test "$PACKAGE" != gettext-runtime \
                && test "$PACKAGE" != gettext-tools; }; then
          gt_use_preinstalled_gnugettext=yes
        else
          ...
        fi

    ifelse(gt_included_intl, yes, [
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
          dnl GNU gettext is not found in the C library.
          dnl Fall back on included GNU gettext library.
          nls_cv_use_gnu_gettext=yes
        fi
      fi

      if test "$nls_cv_use_gnu_gettext" = "yes"; then
        dnl Mark actions used to generate GNU NLS library.
        BUILD_INCLUDED_LIBINTL=yes
        USE_INCLUDED_LIBINTL=yes

since libintl is part of gettext-runtime, gt_use_preinstalled_gnugettext is set, which cascades into setting BUILD_INCLUDED_LIBINTL all the time, which cascades into installing it.

if we back up a bit to where the configure flag is checked:
http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/m4/gettext.m4?id=v0.19.8#n125
    gt_use_preinstalled_gnugettext=no
    ifelse(gt_included_intl, yes, [
      AC_MSG_CHECKING([whether included gettext is requested])
      AC_ARG_WITH([included-gettext],
        [  --with-included-gettext use the GNU gettext library included here],
        nls_cv_force_use_gnu_gettext=$withval,
        nls_cv_force_use_gnu_gettext=no)
      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])

      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
    ])

perhaps the right answer is to change the 4th arg to AC_ARG_WITH to:
  nls_cv_force_use_gnu_gettext=auto

and then change the if test below to:
      if test "$nls_cv_force_use_gnu_gettext" = "auto"; then

Mike Frysinger <vapier>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by vapier (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-02 haible StatusNone Not a Bug
        Assigned toNone haible
        Open/ClosedOpen Closed
    2016-11-27 haible CategoryNone Build

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code