Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155758 - emerge dev-perl/Locale-gettext-1.05 fails after changing CHOSTs
Summary: emerge dev-perl/Locale-gettext-1.05 fails after changing CHOSTs
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-20 05:34 UTC by Christian Theune
Modified: 2009-10-17 00:37 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Theune 2006-11-20 05:34:07 UTC
Portage 2.1.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r4, 2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.6.13
Last Sync: Mon, 20 Nov 2006 08:00:03 +0000
distcc 2.16 i386-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://burns.whq.gocept.com/gentoo-portage"
USE="x86 Jpeg alsa apache2 apm arts berkdb bitmap-fonts cli cracklib crypt cups dlloader dri eds elibc_glibc emboss encode esd foomaticdb fortran gdbm gif gpm gstreamer gtk2 iconv imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg kde kernel_linux libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Christian Theune 2006-11-20 05:35:22 UTC
Failure is:

checking for gettext... no
checking for gettext in -lintl... no
gettext function not found. Please install libintl at Makefile.PL line 18.
Comment 2 Yuval Yaari (RETIRED) gentoo-dev 2006-12-10 15:55:46 UTC
dev-perl/Locale-gettext DEPENDs on sys-devel/gettext.
Could you make sure you have it installed?
Comment 3 Christian Theune 2006-12-10 23:59:29 UTC
Yes, it's installed:

[ Searching for package 'gettext' in all categories among: ]
 * installed packages
[I--] [  ] sys-devel/gettext-0.15 (0)
Comment 4 Michael Cummings (RETIRED) gentoo-dev 2007-01-04 05:46:00 UTC
The tests associated with determing whether you have gettext support aren't really too complex. Is libintl.h in /usr/include (provided by glibc and necessary for half the basic tests here)? What does  gcc -print-search-dirs say? Please also include perl -V output so we can see how perl was compiled. You can also try the following, which is the same process that is failing in the Makefile.PL:

create a file called conftest.c with the following input:
#include <libintl.h>

int main(int argc, char **argv)
{
char *x = gettext("foo");
return 0;
}

perl -V:cc to get the compiler to use (the script bases it's compiler on what perl was built with, so for example on the box i'm on atm, it's i686-pc-linux-gnu-gcc - perl -V:cc should tell you what to use). Then run both:
     i686-pc-linux-gnu-gcc -o conftest -lintl conftest.c
which tests whether -lintl could be loaded (not important, but good to know) and if that fails, run:
     i686-pc-linux-gnu-gcc -o conftest conftest.c

On my test x86 desktop, the first failed, but the second passed, which is all that Locale-gettext really cared about anyway. Since the Makefile.PL is capturing the errors, this will be your best for finding out what/why this module is failing to locate gettext.
Comment 5 Kevin F. Quinn (RETIRED) gentoo-dev 2007-02-12 07:30:51 UTC
I think this happens because the installed perl is looking for the wrong compiler (I had this issue when building up from a chroot that started with i386-pc-linux-gnu and upgraded to i686-pc-linux-gnu - i.e. changed CHOST, and that was the problem).  It blames gettext because that's the first test it does that uses the compiler from 'perl -V:cc'.

To fix it, did:

gcc-config <compiler>
env-update
source /etc/profile

after which 'perl -V:cc' returned i686-pc-linux-gnu-gcc.

Probably a good idea to rebuild dev-lang/perl at this point.
Comment 6 Richard Scott 2007-02-19 10:11:28 UTC
I'd also like to add that I've had this fail on a stage1 install too!

See: http://forums.gentoo.org/viewtopic-t-541210.html
Comment 7 Richard Scott 2007-02-19 20:48:36 UTC
I don't know if this will help, but emerging perl *before* running the bootstrap process is a workaround for my issue i.e. 

# emerge --oneshot --nodeps perl
# /usr/portage/scripts/bootstrap.sh

I wasn't sure if this was a good idea tho, as I believe perl shouldn't be installed until the emerge -e system part of a stage1 install.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-02-25 13:56:47 UTC
@Christian, have you changed your CHOST?

(In reply to comment #6)
(In reply to comment #7)

We don't support stage1 installs at all, so we really don't care much about boostrap or whatnot bombing out on you, sorry.
Comment 9 G. Gibson 2007-03-07 21:16:35 UTC
This also occurred under gentoo-prefix:  I have gettext-0.16.1 installed but it cannot seem to detect it what so ever, as follows:

checking for gettext in -lintl...gettext function not found. Please install libintl at Makefile.PL line 18.
 no

!!! ERROR: dev-perl/Locale-gettext-1.05 failed.
Call stack:
  ebuild.sh, line 1694:   Called dyn_compile
  ebuild.sh, line 1051:   Called qa_call 'src_compile'
  environment, line 3218:   Called src_compile
  ebuild.sh, line 1384:   Called perl-module_src_compile
  perl-module.eclass, line 136:   Called perl-module_src_prep
  perl-module.eclass, line 125:   Called die

!!! Unable to build! (are you using USE="build"?)
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/opt/var/log/portage/dev-perl:Locale-gettext-1.05:20070307-202050.log'
Comment 10 G. Gibson 2007-03-07 21:19:31 UTC
(In reply to comment #9)
> This also occurred under gentoo-prefix:  I have gettext-0.16.1 installed but it
> cannot seem to detect it what so ever, as follows:
> 
> checking for gettext in -lintl...gettext function not found. Please install
> libintl at Makefile.PL line 18.
>  no
> 
> !!! ERROR: dev-perl/Locale-gettext-1.05 failed.
> Call stack:
>   ebuild.sh, line 1694:   Called dyn_compile
>   ebuild.sh, line 1051:   Called qa_call 'src_compile'
>   environment, line 3218:   Called src_compile
>   ebuild.sh, line 1384:   Called perl-module_src_compile
>   perl-module.eclass, line 136:   Called perl-module_src_prep
>   perl-module.eclass, line 125:   Called die
> 
> !!! Unable to build! (are you using USE="build"?)
> !!! If you need support, post the topmost build error, and the call stack if
> relevant.
> !!! A complete build log is located at
> '/opt/var/log/portage/dev-perl:Locale-gettext-1.05:20070307-202050.log'
> 
Correction: Prepend following to comment #9:

/opt/var/tmp/portage/dev-perl/Locale-gettext-1.05/work/gettext-1.05
 * Using ExtUtils::MakeMaker
checking for gettext... no

above text was missing from my paste into comment #9.
Comment 11 Michael Cummings (RETIRED) gentoo-dev 2007-04-16 21:32:35 UTC
If comment #5 is right (sorry, I actually missed the followup actions on this bug or would have posted sooner), then you can try to edit (adjust paths accordingly):

/usr/lib64/perl5/5.8.8/x86_64-linux/Config_heavy.pl

to update the compiler - but i'd really recommend rebuilding perl over this (or at least think I do - I'm not sure of the ramifications of adjusting this file directly, to be blunt - perl uses the values from build to then build modules with and expects the two to be in sync with one another).
Comment 12 G. Gibson 2007-04-28 06:11:52 UTC
(In reply to comment #4)
> The tests associated with determing whether you have gettext support aren't
> really too complex. Is libintl.h in /usr/include (provided by glibc and
> necessary for half the basic tests here)? What does  gcc -print-search-dirs
> say? Please also include perl -V output so we can see how perl was compiled.
> You can also try the following, which is the same process that is failing in
> the Makefile.PL:
> 
> create a file called conftest.c with the following input:
> #include <libintl.h>
> 
> int main(int argc, char **argv)
> {
> char *x = gettext("foo");
> return 0;
> }
> 
> perl -V:cc to get the compiler to use (the script bases it's compiler on what
> perl was built with, so for example on the box i'm on atm, it's
> i686-pc-linux-gnu-gcc - perl -V:cc should tell you what to use). Then run both:
>      i686-pc-linux-gnu-gcc -o conftest -lintl conftest.c
> which tests whether -lintl could be loaded (not important, but good to know)
> and if that fails, run:
>      i686-pc-linux-gnu-gcc -o conftest conftest.c
> 
> On my test x86 desktop, the first failed, but the second passed, which is all
> that Locale-gettext really cared about anyway. Since the Makefile.PL is
> capturing the errors, this will be your best for finding out what/why this
> module is failing to locate gettext.
> 

Under gentoo-prefix, it looks for libintl.h in /usr/include.  To be prefix-friendly it should look in {prefix}/usr/include. As a temporary work-around I symlinked {prefix}/usr/include/libintl.h @/usr/include.  Its sloppy, but it built and installed just fine after that for me.  Until then it could not locate gettext-0.16.1 that was installed.
Comment 13 Paul Sorensen 2007-06-30 17:04:08 UTC
(In reply to comment #5)
> I think this happens because the installed perl is looking for the wrong
> compiler (I had this issue when building up from a chroot that started with
> i386-pc-linux-gnu and upgraded to i686-pc-linux-gnu - i.e. changed CHOST, and
> that was the problem).  It blames gettext because that's the first test it does
> that uses the compiler from 'perl -V:cc'.
> 
> To fix it, did:
> 
> gcc-config <compiler>
> env-update
> source /etc/profile
> 
> after which 'perl -V:cc' returned i686-pc-linux-gnu-gcc.
> 
> Probably a good idea to rebuild dev-lang/perl at this point.
> 

I just had this issue after installing a fresh stage 3 a few days ago and then updating.  After updating the perl installation 'perl -V:cc' returned the correct profile and the update to Locale-gettext-1.05 now installs correctly.

Thanks
Comment 14 SpanKY gentoo-dev 2007-09-02 19:31:29 UTC
hmm, perhaps the perl-module eclass could be updated with a sanity check for when things fail to see if 'perl -V:cc' works ?  any CHOST change would trigger this sort of weird breakage ...
Comment 15 kavol 2008-04-21 08:08:18 UTC
I've just run into this too

just rebuilding perl helped, no need to play with gcc-config ...
Comment 16 Puschkin 2009-01-29 17:27:06 UTC
Same Problem on 2008.0 i686:

perl -V:cc returned: cc='i486-pc-linux-gnu-gcc';

after re-emerging Perl everything's right
Comment 17 David Abbott (RETIRED) gentoo-dev 2009-10-17 00:37:51 UTC
Is this still an issue? I am going to close the bug as it works here, if not please reopen.