Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300754 - sys-devel/gettext-0.17-r1 fails to compile, implicit declaration of tfind, tsearch
Summary: sys-devel/gettext-0.17-r1 fails to compile, implicit declaration of tfind, ts...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 17:59 UTC by Gary
Modified: 2010-01-21 04:53 UTC (History)
0 users

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


Attachments
/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/environment (environment,114.53 KB, text/plain)
2010-01-12 18:00 UTC, Gary
Details
Here's the requested build.log (build.log,871.90 KB, text/plain)
2010-01-14 15:15 UTC, Gary
Details
Here's the emerge --info (emerge.info,3.65 KB, text/plain)
2010-01-14 23:00 UTC, Gary
Details
Here's the dcigettext.i (dcigettext.i,238.53 KB, text/plain)
2010-01-15 16:06 UTC, Gary
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary 2010-01-12 17:59:06 UTC
Had the same problem on gettext-0.17. Used 'sudo emerge gettext' and got the results in the attached

Reproducible: Always

Steps to Reproduce:
1. sudo emerge sys-devel/gettext
2.
3.

Actual Results:  
   usr/lib64/libgettextlib.a
   usr/lib64/libgettextsrc.a
   usr/lib64/libasprintf.a
   usr/lib64/libgettextpo.a
ecompressdir: bzip2 -9 /usr/share/man
ecompressdir: bzip2 -9 /usr/share/info
making executable: usr/lib64/preloadable_libintl.so
removing executable bit: usr/lib64/libasprintf.la
removing executable bit: usr/lib64/libgettextlib.la
removing executable bit: usr/lib64/libgettextpo.la
removing executable bit: usr/lib64/libgettextsrc.la

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * ../../gettext-runtime/intl/dcigettext.c:583: warning: implicit declaration of function 'tfind'
 * ../../gettext-runtime/intl/dcigettext.c:816: warning: implicit declaration of function 'tsearch'

 * 
 * QA Notice: Package has poor programming practices which may compile
 *            but will almost certainly crash on 64bit architectures.
 * 
 * Function `tfind' implicitly converted to pointer at ../../gettext-runtime/intl/dcigettext.c:583
 * Function `tsearch' implicitly converted to pointer at ../../gettext-runtime/intl/dcigettext.c:816
 * 
 *  Please file a bug about this at http://bugs.gentoo.org/
 *  with the maintaining herd of the package.
 * 
 * 
 * 

 * 
 * ERROR: sys-devel/gettext-0.17-r1 failed.
 * Call stack:
 *       misc-functions.sh, line 729:  Called install_qa_check
 *       misc-functions.sh, line 421:  Called die
 * The specific snippet of code:
 *                              die "install aborted due to" \
 *  The die message:
 *   install aborted due to poor programming practices shown above
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/environment'.
 * 
!!! post install failed; exiting.

>>> Failed to emerge sys-devel/gettext-0.17-r1, Log file:

>>>  '/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/build.log'

 * Messages for package sys-devel/gettext-0.17-r1:

 * 
 * QA Notice: Package has poor programming practices which may compile
 *            but will almost certainly crash on 64bit architectures.
 * 
 * Function `tfind' implicitly converted to pointer at ../../gettext-runtime/intl/dcigettext.c:583
 * Function `tsearch' implicitly converted to pointer at ../../gettext-runtime/intl/dcigettext.c:816
 * 
 *  Please file a bug about this at http://bugs.gentoo.org/
 *  with the maintaining herd of the package.
 * 
 * 
 * ERROR: sys-devel/gettext-0.17-r1 failed.
 * Call stack:
 *       misc-functions.sh, line 729:  Called install_qa_check
 *       misc-functions.sh, line 421:  Called die
 * The specific snippet of code:
 *                              die "install aborted due to" \
 *  The die message:
 *   install aborted due to poor programming practices shown above
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/environment'.
 * 

 * IMPORTANT: 8 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.




attached ... /var/tmp/portage/sys-devel/gettext-0.17-r1/temp/environment
Comment 1 Gary 2010-01-12 18:00:13 UTC
Created attachment 216259 [details]
/var/tmp/portage/sys-devel/gettext-0.17-r1/temp/environment
Comment 2 Patrick Lauer gentoo-dev 2010-01-12 21:33:36 UTC
FEATURES="stricter" and/or using a developer profile? :)
Comment 3 SpanKY gentoo-dev 2010-01-12 23:38:57 UTC
the 64bit check is always applied to people, not just random profiles.  then again, we'd know that if there was `emerge --info` which the wranglers should have asked for ... but i guess they dont really do much anymore.

Gary: please post the full build log as an attachment as well as `emerge --info`.  the build works fine on my 64bit systems.
Comment 4 Gary 2010-01-14 15:15:16 UTC
Created attachment 216507 [details]
Here's the requested build.log
Comment 5 Gary 2010-01-14 15:19:48 UTC
Also the profile I'm using  is default/linux/amd64/10.0
Comment 6 SpanKY gentoo-dev 2010-01-14 22:40:29 UTC
i dont want the profile, i want `emerge --info` please

tfind/tsearch should be in /usr/include/search.h which should be coming from glibc.  make sure your search.h is sane:
echo '#include <search.h>' | gcc -E -

it should be from /usr/include/search.h and both funcs should be listed
Comment 7 Gary 2010-01-14 23:00:21 UTC
Created attachment 216552 [details]
Here's the emerge --info
Comment 8 Gary 2010-01-14 23:04:52 UTC
And I ran the command (echo '#include <search.h>' | gcc -E -) and got search.h output which included the following tsearch/tfind info.

...
/* Search for an entry matching the given KEY in the tree pointed to
   by *ROOTP and insert a new element if not found.  */
extern void *tsearch (__const void *__key, void **__rootp,
              __compar_fn_t __compar);

/* Search for an entry matching the given KEY in the tree pointed to
   by *ROOTP.  If no matching entry is available return NULL.  */
extern void *tfind (__const void *__key, void *__const *__rootp,
            __compar_fn_t __compar);

/* Remove the element matching KEY from the tree pointed to by *ROOTP.  */
extern void *tdelete (__const void *__restrict __key,
              void **__restrict __rootp,
              __compar_fn_t __compar);

Comment 9 SpanKY gentoo-dev 2010-01-14 23:40:17 UTC
then go into the build directory and the gettext-runtime/intl/ subdir and run the command but with -E

x86_64-pc-linux-gnu-gcc -std=gnu99 -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib64\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/lib64\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I../../gettext-runtime/intl -I.. -O2 -pipe -march=nocona -fvisibility=hidden ../../gettext-runtime/intl/dcigettext.c  -fPIC -DPIC -o dcigettext.i -E -dD

then post the dcigettext.i file as an attachment
Comment 10 Gary 2010-01-15 16:06:38 UTC
Created attachment 216610 [details]
Here's the dcigettext.i
Comment 11 SpanKY gentoo-dev 2010-01-15 19:55:01 UTC
and the mystery is solved ;)

PEBKAC:
# 1 "/usr/local/include/search.h" 1 3
Comment 12 Gary 2010-01-20 15:41:41 UTC
(In reply to comment #11)
> and the mystery is solved ;)
> 
> PEBKAC:
> # 1 "/usr/local/include/search.h" 1 3
> 

Can you be a little more specific here? Each and every package was installed w/ portage in no special way, and emerging this package ... is user error?
Comment 13 Gary 2010-01-20 17:38:50 UTC
Don't understand the fix.
Comment 14 SpanKY gentoo-dev 2010-01-21 04:53:09 UTC
nothing in gentoo installs into /usr/local