Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 279528 - emerging dev-lang/tcl-8.5.7 SegFaults on the Install phase
Summary: emerging dev-lang/tcl-8.5.7 SegFaults on the Install phase
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 23:22 UTC by Luíza Utsch
Modified: 2009-09-08 20:43 UTC (History)
0 users

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


Attachments
Output of emerge --info (emergeinfo.txt,3.53 KB, text/plain)
2009-07-28 23:23 UTC, Luíza Utsch
Details
Build log (build.log,292.44 KB, text/plain)
2009-07-28 23:24 UTC, Luíza Utsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luíza Utsch 2009-07-28 23:22:49 UTC
dev-lang/tcl-8.5.7 compiles properly, but fails on the Install phase.

I tried emerging it with/without the "-threads" USE flag, but the error persisted. I did this using MAKEOPTS="-j5" and when it failed, MAKEOPTS="-j3".

I tried to emerge it after re-emerging gcc, glibc, automake, autoconf, portage. No luck either.

Reproducible: Always

Steps to Reproduce:
1. run 'emerge tcl'

Actual Results:  
>>> Source compiled.
>>> Test phase [not enabled]: dev-lang/tcl-8.5.7

>>> Install tcl-8.5.7 into /var/tmp/portage/dev-lang/tcl-8.5.7/image/ category dev-lang
make -j5 DESTDIR=/var/tmp/portage/dev-lang/tcl-8.5.7/image/ install 
Making directory /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/lib
Making directory /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/bin
Installing message catalogs
/bin/sh: line 3: 11092 Segmentation fault      ./tclsh /var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7/unix/../tools/installData.tcl /var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7/unix/../library/msgs "/var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/lib/tcl8.5"/msgs
make: *** [install-msgs] Error 139
make: *** Waiting for unfinished jobs....
Installing libtcl8.5.so to /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/lib/
Installing tclsh as /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/bin/tclsh8.5
Installing tclConfig.sh to /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/lib/
Installing libtclstub8.5.a to /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/lib/
 * 
 * ERROR: dev-lang/tcl-8.5.7 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 2676:  Called die
 * The specific snippet of code:
 *       S= emake DESTDIR="${D}" install || die;
 *  The die message:
 *   (no error message)
 * 
 * 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/dev-lang/tcl-8.5.7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/tcl-8.5.7/temp/environment'.
 * 


Expected Results:  
TCL installed!
Comment 1 Luíza Utsch 2009-07-28 23:23:41 UTC
Created attachment 199494 [details]
Output of emerge --info
Comment 2 Luíza Utsch 2009-07-28 23:24:23 UTC
Created attachment 199496 [details]
Build log
Comment 3 Luíza Utsch 2009-07-28 23:28:24 UTC
Output of emerge --info:

Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.29-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-i686-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 28 Jul 2009 21:45:02 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r2, 2.6.2-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -fomit-frame-pointer -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.las.ic.unicamp.br/pub/gentoo/ http://gentoo.localhost.net.ar/ ftp://mirrors.localhost.net.ar/pub/mirrors/gentoo ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/local/portage/binaries"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/gentoo-br /usr/local/portage"
SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"
USE="X acl acpi alsa bash-completion bzip2 cddb cli consolekit cracklib crypt dbus dri fortran gdbm gnutls gpm gtk hal iconv ipv6 isdnlog java java6 jpeg log4j midi mp3 mudflap ncurses nls nptl nptlonly opengl openmp pam pcre perl png pppd python readline reflection sdl session spl sqlite sqlite3 ssl sysfs tcl tcpd threads timidity tk truetype unicode vim-syntax x86 xft xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev vesa vga intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Federico Ferri (RETIRED) gentoo-dev 2009-07-30 20:18:48 UTC
Not reproducible here. Are you able to compile a working version of tcl 8.5.7 manually?

If still exhibits the segfault, please post the backtrace or a core dump
Comment 5 Federico Ferri (RETIRED) gentoo-dev 2009-07-30 20:22:10 UTC
actually you can also run the tclsh compiled by portage.

after it stops due to the error:

# cd /var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7/unix/
# ./tclsh
% info tclversion
8.5
% 
Comment 6 Luíza Utsch 2009-07-30 20:37:00 UTC
I'm able to compile it manually and it compiles/installs/works properly. No segfault on the install phase.

Running the tclsh compiled by portage gives the following error:
pisslips unix # pwd
/var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7/unix
pisslips unix # ./tclsh
./tclsh: error while loading shared libraries: libtcl8.5.so: cannot open shared object file: No such file or directory

This lib exists on tclsh's directory.

I also tried exeucting the tclsh8.5 installed on /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/bin/. Same error (the libtcl8.5.so is installed on /var/tmp/portage/dev-lang/tcl-8.5.7/image//usr/lib/)
Comment 7 Federico Ferri (RETIRED) gentoo-dev 2009-07-30 21:59:43 UTC
yeah you have to add the directory with the libs to LD_LIBRARY_PATH
Comment 8 Luíza Utsch 2009-07-31 21:55:01 UTC
Execution of the tclsh from /var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7/unix/ also gives a SegFault.

I ran it on gdb after following the Gentoo Bug Reporting Guide and enabling FEATURES="nostrip" and adding -ggdb do CFLAGS, but the backtrack keeps not being very useful:


Starting program: /var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7/unix/tclsh 
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
warning: Cannot initialize thread debugging library: versions of libpthread and libthread_db do not match
(no debugging symbols found)
warning: Cannot initialize thread debugging library: versions of libpthread and libthread_db do not match
(no debugging symbols found)
warning: Cannot initialize thread debugging library: versions of libpthread and libthread_db do not match

Program received signal SIGSEGV, Segmentation fault.
0xb8004010 in ?? ()
(gdb) bt
#0  0xb8004010 in ?? ()
#1  0xb7ec85fc in __pthread_initialize_minimal_internal () from /usr/lib/libpthread.so.0
#2  0xb7ec7dc8 in _init () from /usr/lib/libpthread.so.0
#3  0xb7ff6e24 in ?? () from /lib/ld-linux.so.2
#4  0x00000001 in ?? ()
#5  0xbf8781b4 in ?? ()
#6  0xbf8781bc in ?? ()
#7  0xbf878140 in ?? ()
#8  0x080486a0 in Tcl_Init@plt ()
#9  0x00000001 in ?? ()
#10 0x00000024 in ?? ()
#11 0xb8005fc4 in ?? () from /lib/ld-linux.so.2
#12 0x00000000 in ?? ()
Comment 9 Federico Ferri (RETIRED) gentoo-dev 2009-08-01 11:31:20 UTC
there's no debug information in that trace!
have you enabled USE=debug?
Comment 10 Luíza Utsch 2009-08-03 20:32:12 UTC
I did, but it isn't working. I also enabled other things suggested on the Bug Reporting Guide (screenshot: http://img198.imageshack.us/img198/4788/200908031715351280x1024.png)
Comment 11 Federico Ferri (RETIRED) gentoo-dev 2009-08-05 00:10:12 UTC
your buildlog says

>>> Compiling source in /var/tmp/portage/dev-lang/tcl-8.5.7/work/tcl8.5.7 ...
./configure [...] --enable-threads --disable-symbols
                                   ^^^^^^^^^^^^^^^^^
indicating that you are building with -debug.
if it's a new build, doublecheck your new build log for --enable-symbols
Comment 12 Luíza Utsch 2009-08-07 20:44:32 UTC
ok, now this is getting awfully bizarre.
I decided to give up and inject tcl on my system, since I can compile it manually. I forgot to set the --prefix option on configure and tcl was installed on /usr/local instead of /usr as it should. But anyway, it installed properly, no segfault or anything.

Then I uninstalled it, so I could install it again with --prefix=/usr. It gave me the same segfault message on "make install" when I tried to recompile/install it.

I managed to compile the portage version with debug symbols now:

(gdb) bt
#0  0xb7f6b018 in ?? ()
#1  0xb7e2e5fc in __pthread_initialize_minimal_internal () from /usr/lib/libpthread.so.0
#2  0xb7e2ddc8 in _init () from /usr/lib/libpthread.so.0
#3  0xb7f5de24 in call_init (l=0xb7f6b638, argc=1, argv=0xbfff25f4, env=0xbfff25fc) at dl-init.c:70
#4  0xb7f5dfb6 in _dl_init (main_map=0xb7f6d660, argc=1, argv=0xbfff25f4, env=0xbfff25fc)
    at dl-init.c:100
#5  0xb7f4f92f in _dl_start_user () from /lib/ld-linux.so.2
Comment 13 Luíza Utsch 2009-09-08 20:43:04 UTC
Actually, it was a problem with glibc, not tcl.
The outcome is here: http://forums.gentoo.org/posting.php?mode=reply&t=784928