Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2024 - tcl-8.3.3.ebuild and tk-8.3.3.ebuild shouldn't cause tcl and tk to be threaded
Summary: tcl-8.3.3.ebuild and tk-8.3.3.ebuild shouldn't cause tcl and tk to be threaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Stanislav Brabec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 17181
  Show dependency tree
 
Reported: 2002-04-23 02:11 UTC by kevin
Modified: 2022-09-11 20:00 UTC (History)
6 users (show)

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


Attachments
tcl ebuild with threads USE flag (tcl-8.4.3.ebuild,3.33 KB, text/plain)
2003-10-22 12:15 UTC, Lee Denison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kevin 2002-04-23 02:11:04 UTC
the tcl-8.3.3.ebuild and tk-8.3.3.ebuild automatically cause the
--enable-threads  flag on the ./configure line. (not affected by USE)

I was trying to install lavaps-1.20
(http://www.isi.edu/~johnh/SOFTWARE/LAVAPS/index.html) which uses tcl/tk.

lavaps built fine but crashed when trying to create a tcl intrepreter.

I hacked the ebuilds for tcl and tk to not add the --enable-threads flag,
emerged them again, rebuilt lavaps and it worked fine. I think the 2 ebuilds
should be changed so that the use of the --enable-threads can be controlled by
the USE environment variable. when tk was configuring, it even warns that
enabling threads isn't a good idea.

here's a stack dump from gdb when tcl/tk had threads enabled:
11:44pm1raven:/tmp/lavaps-1.20>gdb ./lavaps
GNU gdb 5.1.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run
Starting program: /tmp/lavaps-1.20/./lavaps 

Program received signal SIG32, Real-time event 32.
0x40300ad9 in sigsuspend () from /lib/libc.so.6
(gdb) where
#0  0x40300ad9 in sigsuspend () from /lib/libc.so.6
#1  0x4040ef59 in pthread_kill_other_threads_np () from /lib/libpthread.so.0
#2  0x4040e24b in pthread_create () from /lib/libpthread.so.0
#3  0x4014ac5d in Tcl_CreateThread () from /usr/lib/libtcl.so
#4  0x4014b21f in Tcl_InitNotifier () from /usr/lib/libtcl.so
#5  0x4012cc0a in TclInitNotifier () from /usr/lib/libtcl.so
#6  0x4010f9aa in TclInitSubsystems () from /usr/lib/libtcl.so
#7  0x400f3532 in Tcl_CreateInterp () from /usr/lib/libtcl.so
#8  0x0804f4ef in tcl_blob::init () at tcl_blob.cc:335
#9  0x0804b4b1 in main (argc=1, argv=0xbffff9e4) at main.cc:127
#10 0x402ef3c1 in __libc_start_main () from /lib/libc.so.6
(gdb) The program is running.  Exit anyway? (y or n) y
Comment 1 Daniel Robbins (RETIRED) gentoo-dev 2002-04-23 17:05:08 UTC
sounds like we should disable threads with tcl/tk
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-04-24 14:06:23 UTC
Disabled in tcl-8.3.3; will be a use flag later on when we have a consistent
policy for handling ebuild-specific use flags.
Comment 3 Ian Leitch (RETIRED) gentoo-dev 2003-10-19 17:36:46 UTC
Disabling threads blocks the aolserver (bug #17181) from being submited to
portage because it requires tcl to be built with --enable-threads. Perhaps
we could use an internal USE flag for the time being?
Comment 4 Lee Denison 2003-10-22 12:15:29 UTC
Created attachment 19633 [details]
tcl ebuild with threads USE flag

I've attached the modified tcl ebuild I'm using which has a 'threads' USE
flag
just in case its useful to anyone else.  It makes merging <a
href="http://bugs.gentoo.org/show_bug.cgi?id=17181">aolserver</a> easier.
Comment 5 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2003-11-03 10:29:20 UTC
Sorry. I don't have capacity to deal with the tcl and tk stuff anymore.
Comment 6 Seemant Kulleen (RETIRED) gentoo-dev 2003-11-21 23:03:35 UTC
Stanislav, thoughts?
Comment 7 Ian Leitch (RETIRED) gentoo-dev 2004-01-10 18:04:52 UTC
Stanislav, if you don't have any objections I'm going to go with the local USE flag. This bug is holding up 4 others. 
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2004-01-11 02:43:31 UTC
so we could make "threads" as global flag
it's also used in
dev-lang/perl:threads - Enable Perl threads, has some compatibility problems
Comment 9 Matthew Kennedy (RETIRED) gentoo-dev 2004-01-11 16:13:50 UTC
dev-lisp/clisp and dev-lisp/sbcl are two more ebuilds which can use a threads flag
Comment 10 Aron Griffis (RETIRED) gentoo-dev 2004-01-17 10:32:01 UTC
I'd vote for a global threads flag.  With the upcoming portage it could even be set per-package.
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2004-01-17 10:38:48 UTC
seemant: what do you think about a global threads USE-flag ?
Comment 12 Seemant Kulleen (RETIRED) gentoo-dev 2004-01-17 10:42:39 UTC
marty, I don't know -- I think perl uses that -- but it's sort of a hidden flag because it could lead to dangerous things -- maybe sommething similar here?
Comment 13 Martin Holzer (RETIRED) gentoo-dev 2004-01-17 11:03:50 UTC
perl team, please tell us about the threads flag a little more
Comment 14 Eric Sammer (RETIRED) gentoo-dev 2004-01-18 03:03:31 UTC
Threads in perl will cause a number of compatibility problems as most people know. This is even more problematic in terms of things like mod_perl-like environments, from what I've heard. Very few perl apps or modules make use of threads due to their buggy nature and I think most people are willing to hold out for perl6 for a decent thread implementation.

As long as it's not on by default, a threads USE flag is fine, but I wouldn't be surprised if we see a slight upswing in perl bugs because of it. I believe that the perl ebuild currently uses a env variable to handle enabling and disabling of threads - maybe this could be used for tcl as well?

My concern is that someone will enable a threads use flag for tcl and all of sudden have wacky problems with perl.
Comment 15 Ian Leitch (RETIRED) gentoo-dev 2004-04-15 04:32:44 UTC
If nobody has any objections, I'm going to goahead with this. I think i'll accompany a paused warning too. 
Anyone mind if I get rid of a few old ebuilds while I'm at it? 
Comment 16 Ian Leitch (RETIRED) gentoo-dev 2004-04-24 12:04:34 UTC
in CVS.