Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564168 - sys-devel/gettext-0.19.6-r1 still builds libintl.so even when using --without-included-gettext
Summary: sys-devel/gettext-0.19.6-r1 still builds libintl.so even when using --without...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All FreeBSD
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/bugs/?48233
Whiteboard:
Keywords:
Depends on:
Blocks: 574794
  Show dependency tree
 
Reported: 2015-10-26 11:50 UTC by Yuta SATOH
Modified: 2023-06-23 17:20 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (564168-info.log,4.16 KB, text/plain)
2015-10-27 11:21 UTC, Yuta SATOH
Details
build.log.gz (564168-build.log.gz,80.18 KB, application/gzip)
2015-10-27 11:22 UTC, Yuta SATOH
Details
gettext-runtime/config.log.gz (564168-gettext-runtime-config.log.gz,39.08 KB, application/gzip)
2015-11-01 02:12 UTC, Yuta SATOH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH 2015-10-26 11:50:08 UTC
Summary is all.


Reproducible: Always

Steps to Reproduce:
# emerge -C dev-libs/libintl
# emerge =sys-devel/gettext-0.19.6
# emerge -pv sys-devel/gettext virtual/libintl

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-libs/libintl-0.19.6::gentoo  USE="threads -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R    ] virtual/libintl-0-r2::gentoo  ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild     U  ] sys-devel/gettext-0.19.6-r1::gentoo [0.19.6::gentoo] USE="acl cxx ncurses nls -cvs -doc -emacs -git (-java) -openmp -static-libs" ABI_X86="(64) -32 (-x32)" 0 KiB
[blocks b      ] <sys-devel/gettext-0.19.6-r1 ("<sys-devel/gettext-0.19.6-r1" is blocking dev-libs/libintl-0.19.6)

Total: 3 packages (1 upgrade, 1 new, 1 reinstall), Size of downloads: 0 KiB
Conflict: 1 block

# emerge sys-devel/gettext
<snip>
>>> Installing (2 of 2) sys-devel/gettext-0.19.6-r1::gentoo
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). See
 * http://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how to
 * solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 *
 * Detected file collision(s):
 *
 *      /usr/include/libintl.h
 *      /usr/lib/libintl.so
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * dev-libs/libintl-0.19.6:0::gentoo
 *      /usr/include/libintl.h
 *      /usr/lib/libintl.so
 *
 * Package 'sys-devel/gettext-0.19.6-r1' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.




Gentoo/FreeBSD amd64
# pwd
/var/tmp/portage/sys-devel/gettext-0.19.6-r1/work/gettext-0.19.6-abi_x86_64.amd64_fbsd
# grep LIBINTL gettext-runtime/config.status
S["LTLIBINTL"]="${top_builddir}/intl/libintl.la  "
S["LIBINTL"]="${top_builddir}/intl/libintl.la  "
S["USE_INCLUDED_LIBINTL"]="yes"
S["BUILD_INCLUDED_LIBINTL"]="yes"

Gentoo/Linux amd64
# pwd
/var/tmp/portage/sys-devel/gettext-0.19.6-r1/work/gettext-0.19.6-abi_x86_64.amd64
# grep LIBINTL gettext-runtime/config.status
S["LTLIBINTL"]=""
S["LIBINTL"]=""
S["USE_INCLUDED_LIBINTL"]="no"
S["BUILD_INCLUDED_LIBINTL"]="yes"
Comment 1 SpanKY gentoo-dev 2015-10-26 18:08:44 UTC
the gettext package shouldn't be building+installing the libintl library

please post the full build log as an attachment.  you must do this for all bugs you file.
Comment 2 Yuta SATOH 2015-10-27 11:21:47 UTC
Created attachment 415584 [details]
emerge --info
Comment 3 Yuta SATOH 2015-10-27 11:22:35 UTC
Created attachment 415586 [details]
build.log.gz
Comment 4 SpanKY gentoo-dev 2015-10-31 07:15:12 UTC
can you attach the config.log file from the gettext-runtime subdir ?  the build log shows this:
checking whether included gettext is requested... no
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes

which is what we want.  but then it shows:
checking where the gettext function comes from... included intl directory

which is bad.  tracing m4/gettext.m4:AM_GNU_GETTEXT is a pita as it likes to construct variables dynamically w/eval.

i'm guessing it's this bit of code:
        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.)

which seems to indicate gettext, when seeing a libintl that looks like its own, will ignore the configure option and go ahead and build things anyways.
Comment 5 Yuta SATOH 2015-11-01 02:12:24 UTC
Created attachment 415842 [details]
gettext-runtime/config.log.gz

...
configure:20123: checking for GNU gettext in libintl
configure:20155: x86_64-gentoo-freebsd10.2-gcc -o conftest -O2 -pipe  -D_THREAD_SAFE   conftest.c  /usr/lib/libintl.so >&5
configure:20155: $? = 0
configure:20200: result: yes
configure:20254: checking whether to use NLS
configure:20256: result: yes
configure:20259: checking where the gettext function comes from
configure:20270: result: included intl directory
...
Comment 6 Fabian Groffen gentoo-dev 2016-01-07 09:47:07 UTC
I see the same problem on Darwin, would it be an option to just remove the libs after build?
Comment 7 Yuta SATOH 2016-02-07 07:47:48 UTC
For Users,
Please try the following workaround until this bug is resolved.

mkdir /etc/portage/profile
echo 'dev-libs/libintl-0.19.7' >> /etc/portage/profile/package.provided
Comment 8 Eric N. Vander Weele 2016-02-17 00:28:50 UTC
I have done some investigation in bug 574794 for prefix (see https://bugs.gentoo.org/show_bug.cgi?id=574794#c3).

It turns out that the 'nls' USE flag controls whether libintl is installed for non-GNU systems (confirmed this on Mac OS X).  However, --with-included-gettext and 'nls' controls libint being installed for GNU systems (confirmed on box with glibc).

GNU System:
./configure --without-included-gettext --disable-nls # no libintl.so installed
./configure --without-included-gettext --enable-nls  # no libintl.so installed
./configure --with-included-gettext    --disable-nls # no libintl.so installed
./configure --with-included-gettext    --enable-nls  # libintl.so installed

Non-GNU System (Mac OS X):
./configure --without-included-gettext --disable-nls # no libintl.so installed
./configure --without-included-gettext --enable-nls  # libintl.so installed
./configure --with-included-gettext    --disable-nls # no libintl.so installed
./configure --with-included-gettext    --enable-nls  # libintl.so installed
Comment 9 Mauricio L. Pilla (RETIRED) gentoo-dev 2016-06-14 17:59:41 UTC
I have got the same issue in Gentoo FreeBSD.
Comment 10 SpanKY gentoo-dev 2016-06-14 23:14:52 UTC
does this hack in src_prepare help:

  sed -i \
    -e '/gt_use_preinstalled_gnugettext=yes/s:=yes:=no:' \
    gettext-runtime/configure || die
Comment 11 Michael Haubenwallner (RETIRED) gentoo-dev 2016-06-15 06:08:24 UTC
There is a similar hack in prefix repo for gettext-0.19.7 already:
https://gitweb.gentoo.org/repo/proj/prefix.git/commit/sys-devel/gettext/gettext-0.19.7.ebuild?id=aba80c258a5c7e4f3a1dd22b61b67b1507377dac
Comment 12 SpanKY gentoo-dev 2016-06-15 20:16:48 UTC
i've opened a report upstream to try and get it figured out:
https://savannah.gnu.org/bugs/?48233

in the mean time, my proposal didn't quite work as it left some variables set incorrectly (like the libintl vars).  i've written this patch instead:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7006ca35680e9aa14f4e5f4bbf3b30f03d5b38d6

please re-open if that doesn't work
Comment 13 Sven Eden 2018-05-09 10:36:30 UTC
Just an information, I do not want to re-open, as this is a quite special case:

When installing the latest sys-devel/gettext-0.19.8.1 in a Gentoo prefix on Cygwin, using the cygport patches, this solution is no longer enough.

For gettext to really work without any later issues, one of the m4 files (m4/woe32-dll.m4) and the gettext-tools/configure.ac have to be patched.

After that the build system calls autoconf again, which undoes the configure patch.

I had to add an additional patch that does the same as your patch but to gettext-runtime/m4/intl.m4, and now everything merges just fine.

Again, this is a very special case, thus no re-opening.
Comment 14 Aeth3r 2020-04-22 13:04:08 UTC
(In reply to Sven Eden from comment #13)
> Just an information, I do not want to re-open, as this is a quite special
> case:
> 
> When installing the latest sys-devel/gettext-0.19.8.1 in a Gentoo prefix on
> Cygwin, using the cygport patches, this solution is no longer enough.
> 
> For gettext to really work without any later issues, one of the m4 files
> (m4/woe32-dll.m4) and the gettext-tools/configure.ac have to be patched.
> 
> After that the build system calls autoconf again, which undoes the configure
> patch.
> 
> I had to add an additional patch that does the same as your patch but to
> gettext-runtime/m4/intl.m4, and now everything merges just fine.
> 
> Again, this is a very special case, thus no re-opening.


I know it is too late to ask. Im trying to bootstrap gentoo prefix on cygwin for 2 years and  due to this issue im unable to complete it. Could you please give me an idea of the patches so that i can move forward?