From: Alan Grunwald on
I've been using TDBC happily (on ubuntu 8.04 LTS) for over a year now.
I've just done a 'teacup update', and now

% package require tdbc::mysql

complains that TclOO isn't present or is incomplete.

% package present TclOO

reveals that I have TclOO 0.6.1 loaded and

% package version TclOO

shows that there is a TclOO 0.6.2 around.

% package forget TclOO
% package require TclOO 0.6.2

segfaults.

How can I get my tdbc::mysql back?
--
Alan
From: Andreas Kupries on
Alan Grunwald <alan.via.aioe(a)nurdglaw.demon.co.uk> writes:

> I've been using TDBC happily (on ubuntu 8.04 LTS) for over a year
> now. I've just done a 'teacup update', and now
>
> % package require tdbc::mysql
>
> complains that TclOO isn't present or is incomplete.
>
> % package present TclOO
>
> reveals that I have TclOO 0.6.1 loaded and
>
> % package version TclOO
>
> shows that there is a TclOO 0.6.2 around.
>
> % package forget TclOO
> % package require TclOO 0.6.2
>
> segfaults.

Does TclOO 0.6.2 segfault if you start from a fresh tclsh which did
not have TclOO loaded already ?

The 'package forget' tells Tcl only to disregard that it has TclOO
already loaded. This does not (IIRC) unload the loaded TclOO. In other
words, you might still have 0.6.1 in memory, and then the 0.6.2 dumps
all over it, causing the crash.

So, if using a fresh tclsh works for TclOO 0.6.2, then maybe the
tdbc(mysql) as well.

>
> How can I get my tdbc::mysql back?

I am guessing that your tdbc::mysql is installed somewhere under [info
library]/lib, and not in your local teapot repository ?

In that case
teacup remove tdbc::mysql
teacup remove tdbc

should uninstall the packages from the TEApot, and Tcl should happily
use your own tdbc(mysql) again.

If your own tdbc(mysql) also resides in the local teapot, then I would
guess that you are using a version older than 1.0b15, which is what is
provided through ActiveState's teapot.

In that case

teacup list --at-default tdb

should show all the tdbc packages installed in the teapot, allowing
you to exactly

teacup remove tdbc::mysql 1.0b15
teacup remove tdbc 1.0b15

leaving the older packages installed.


> --
> Alan

--
So long,
Andreas Kupries <akupries(a)shaw.ca>
<http://www.purl.org/NET/akupries/>
Developer @ <http://www.activestate.com/>
-------------------------------------------------------------------------------
From: Alan Grunwald on
Andreas Kupries wrote:
> Alan Grunwald <alan.via.aioe(a)nurdglaw.demon.co.uk> writes:
>
<snip>
A tail of woe about how he (I) can no longer package require tdbc::mysql

</snip>

>
> Does TclOO 0.6.2 segfault if you start from a fresh tclsh which did
> not have TclOO loaded already ?
>
> The 'package forget' tells Tcl only to disregard that it has TclOO
> already loaded. This does not (IIRC) unload the loaded TclOO. In other
> words, you might still have 0.6.1 in memory, and then the 0.6.2 dumps
> all over it, causing the crash.
>
> So, if using a fresh tclsh works for TclOO 0.6.2, then maybe the
> tdbc(mysql) as well.
>

A fresh tclsh already has TclOO 0.6.1 present

>> How can I get my tdbc::mysql back?
>
> I am guessing that your tdbc::mysql is installed somewhere under [info
> library]/lib, and not in your local teapot repository ?
>
> In that case
> teacup remove tdbc::mysql
> teacup remove tdbc
>
> should uninstall the packages from the TEApot, and Tcl should happily
> use your own tdbc(mysql) again.
>
> If your own tdbc(mysql) also resides in the local teapot, then I would
> guess that you are using a version older than 1.0b15, which is what is
> provided through ActiveState's teapot.
>
> In that case
>
> teacup list --at-default tdb
>
> should show all the tdbc packages installed in the teapot, allowing
> you to exactly
>
> teacup remove tdbc::mysql 1.0b15
> teacup remove tdbc 1.0b15
>
> leaving the older packages installed.
>
I've been beating myself up about this since I got up this morning. I
think the answer is that yo shouldn't post about problems late at night.

I am currently running ActiveTcl8.6.0.0b1 - info patchlevel returns 8.6.1b1.

I strongly suspect that version has TclOO 0.6.1 built in to tclsh and
that I need to upgrade to the latest ActiveTcl8.6.0.0b3. I'm doing that
now and will report back on how that pans out.

--
Alan
From: Alan Grunwald on
Alan Grunwald wrote:
> Andreas Kupries wrote:
>> Alan Grunwald <alan.via.aioe(a)nurdglaw.demon.co.uk> writes:
>>
> <snip>
> A tail of woe about how he (I) can no longer package require tdbc::mysql
>
> </snip>
>
>>
>> Does TclOO 0.6.2 segfault if you start from a fresh tclsh which did
>> not have TclOO loaded already ?
>>
>> The 'package forget' tells Tcl only to disregard that it has TclOO
>> already loaded. This does not (IIRC) unload the loaded TclOO. In other
>> words, you might still have 0.6.1 in memory, and then the 0.6.2 dumps
>> all over it, causing the crash.
>>
>> So, if using a fresh tclsh works for TclOO 0.6.2, then maybe the
>> tdbc(mysql) as well.
>>
>
> A fresh tclsh already has TclOO 0.6.1 present
>
>>> How can I get my tdbc::mysql back?
>>
>> I am guessing that your tdbc::mysql is installed somewhere under [info
>> library]/lib, and not in your local teapot repository ?
>>
>> In that case
>> teacup remove tdbc::mysql
>> teacup remove tdbc
>>
>> should uninstall the packages from the TEApot, and Tcl should happily
>> use your own tdbc(mysql) again.
>>
>> If your own tdbc(mysql) also resides in the local teapot, then I would
>> guess that you are using a version older than 1.0b15, which is what is
>> provided through ActiveState's teapot.
>>
>> In that case
>>
>> teacup list --at-default tdb
>>
>> should show all the tdbc packages installed in the teapot, allowing
>> you to exactly
>>
>> teacup remove tdbc::mysql 1.0b15
>> teacup remove tdbc 1.0b15
>>
>> leaving the older packages installed.
>>
> I've been beating myself up about this since I got up this morning. I
> think the answer is that yo shouldn't post about problems late at night.
>
> I am currently running ActiveTcl8.6.0.0b1 - info patchlevel returns
> 8.6.1b1.
>
> I strongly suspect that version has TclOO 0.6.1 built in to tclsh and
> that I need to upgrade to the latest ActiveTcl8.6.0.0b3. I'm doing that
> now and will report back on how that pans out.
>

Thanks for the response Andreas - sorry, should have said that earlier :-)

I've now upgraded to ActiveTcl 8.6.0.0b3. As part of the installation I
said to discard the existing teapot and use the seed one from the
installation (approximately; I can't remember exactly what the question
was about, I'm sure I said to use the seed version rather than the
existing one, or attempt a merge.)

I then did

sudo teacup update-self; and
sudo teacup update

This has successfully given me access to TclOO 0.6.2, but I still can't
package require tdbc::mysql. The error is:

"Can't find a usable tdbcmysql.tcl in the following directories:",
followed by a list of directories and a note that this probably means
that tdbcmysql (sic) wasn't installed properly.

I checked the output from sudo update and found that tdbc::mysql hadn't
been installed.

I did 'find /opt/ActiveTcl-8.6 -name tdbcmysql.tcl' and found various
earlier versions that I had installed and a copy in

/opt/ActiveTcl8.6/lib/teapot-old/package/linux-glibc2.3/lib/tdbc_mysql1.0b15

I then tried to verify my teapot with

sudo /opt/ActiveTcl-8.6/bin/teacup verify

This displayed

Checking /opt/ActiveTcl-8.6/lib/teapot ...
Bad version "tcl1.0"
while executing
"# Compiled -- no source code available
error "called a copy of a compiled script""
(procedure "ExtractInstanceFromPath" line 1)
invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script""
(procedure "::repository::localma::Snit_methodVerify" line 1)
invoked from within
"::repository::client::localma1 Verify {command ::repository::api::DONE}
{::snit::RT.CallInstance ::repository::client::Snit_inst1 VerifyDevNull}"
("after" script)

(Reformatted slightly to reduce line-wraps - each line above was
prefixed by "INTERNAL ERROR (BACKGROUND) | ")

I then did

sudo /opt/ActiveTcl8.6/bin/teacup get tdbc::mysql

This appeared to attempt to retrieve a number of flavours of
tdbc::mysql, displayed errors that I needed a licence for some of them
and retrieved, amongst other things

Retrieving package tdbc::mysql 1.0b15 linux-glibc2.3-ix86 ...@
http://teapot.activestate.com ... Ok

I then started a new tclsh but still can't package require tdbc::mysql.
It displays the same error message, but now there is a tdbcmysql.tcl in
one of the listed directories.

If I source the tdbcmysql.tcl that is now in the teapot, then it doesn't
display any error message, but repeating the package require tdbc::mysql
still fails with the same error message.

If, despite this, I do

set db [tdbc::mysql::connection new -db test -user tester -password tester]

I get 'wrong # args: should be "tdbc::mysql::connection new"'

Sorry this has got a bit long. I hope there's something relevant in the
details above. If you'd rather take this to some other medium -
email/wiki/chat, just say so.

Any help gratefully (and I hope gracefully) received.
--
Alan
From: Andreas Kupries on
Alan Grunwald <alan.via.aioe(a)nurdglaw.demon.co.uk> writes:

> A fresh tclsh already has TclOO 0.6.1 present

Ah. You are running an older Tcl 8.6, which has TclOO built in. I
thought that you were running an 8.5 where you have to require it.

>>> How can I get my tdbc::mysql back?

> I've been beating myself up about this since I got up this morning. I
> think the answer is that yo shouldn't post about problems late at
> night.
>
> I am currently running ActiveTcl8.6.0.0b1 - info patchlevel returns 8.6.1b1.

> I strongly suspect that version has TclOO 0.6.1 built in to tclsh and
> that I need to upgrade to the latest ActiveTcl8.6.0.0b3. I'm doing
> that now and will report back on how that pans out.

Ok.

--
So long,
Andreas Kupries <akupries(a)shaw.ca>
<http://www.purl.org/NET/akupries/>
Developer @ <http://www.activestate.com/>
-------------------------------------------------------------------------------