Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 104769

Summary: [dev-lang/tcl] TCL_LIBRARY env variable needs to be setup in /etc/env.d
Product: Gentoo Linux Reporter: Michal Slonina <af1n>
Component: [OLD] DevelopmentAssignee: TCL/TK Project <tcltk>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
URL: http://www.google.com
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 77197    

Description Michal Slonina 2005-09-03 23:51:34 UTC
TCL embeded interpreter needs to know where the tcl files are.

If TCL_LIBRARY path is not set up the following test program dies in pain on
Tcl_Init(interp) :

#  include <tcl.h>
int main() {
    Tcl_Interp *interp;
    interp = Tcl_CreateInterp();
    if (Tcl_Init(interp) == TCL_ERROR) {
        return 1;
    }
}

This is a serious bug, affecting many autoconf scripts.

Sugested fix:

diff -u tcl-8.4.9.ebuild.old tcl-8.4.9.ebuild
--- tcl-8.4.9.ebuild.old        2005-09-04 08:54:36.000000000 +0200
+++ tcl-8.4.9.ebuild    2005-09-04 08:43:02.000000000 +0200
@@ -86,6 +86,9 @@

        cd ${S}
        dodoc README changes license.terms
+
+       dodir /etc/env.d
+       echo >${D}/etc/env.d/50tcl 'TCL_LIBRARY="/usr/lib/tcl8.4"'
 }

 pkg_postinst() {

Other versions of tcl in portage are also affected, but fixing 8.4.9 should be
enough :]


Reproducible: Always
Steps to Reproduce:
Comment 1 Michal Slonina 2005-09-04 08:33:58 UTC
Temporary workaround:

su
echo /etc/env.d/50tcl 'TCL_LIBRARY="/usr/lib/tcl8.4"'
env-update
source /etc/profile
Comment 2 Michal Slonina 2005-09-04 08:34:54 UTC
ops, should be:
echo >/etc/env.d/50tcl 'TCL_LIBRARY="/usr/lib/tcl8.4"' 
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2006-06-03 11:53:10 UTC
the test program works fine without TCL_LIBRARY on my env.

$ gcc -ltcl test.c
$ ./a.out
$

Could you put your emerge info here?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-09-10 14:13:28 UTC
This bug is awaiting user response...