Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#36638 closed defect (invalid)

Failed to initialize MacPorts

Reported by: platipodium (Carsten Lemmen) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.2
Keywords: Cc: cooljeanius (Eric Gallager)
Port:

Description

For no particular reason, the base system stopped working completely. Entering "port" on the Command line gives the following Tcl error:

sh-3.2# port
invalid command name "::tcl::tm::UnknownHandler"
    while executing
"::tcl::tm::UnknownHandler  {::tcl::MacOSXPkgUnknown ::tclPkgUnknown} msgcat 0-"
    ("package unknown" script)
    invoked from within
"package require msgcat"
    (file "/opt/local/share/macports/Tcl/registry2.0/registry.tcl" line 40)
    invoked from within
"source /opt/local/share/macports/Tcl/registry2.0/registry.tcl"
    ("package ifneeded registry 1.0" script)
    invoked from within
"package require registry 1.0"
    (procedure "mportinit" line 485)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, invalid command name "::tcl::tm::UnknownHandler"
sh-3.2# port -vvv
invalid command name "::tcl::tm::UnknownHandler"
    while executing
"::tcl::tm::UnknownHandler  {::tcl::MacOSXPkgUnknown ::tclPkgUnknown} msgcat 0-"
    ("package unknown" script)
    invoked from within
"package require msgcat"
    (file "/opt/local/share/macports/Tcl/registry2.0/registry.tcl" line 40)
    invoked from within
"source /opt/local/share/macports/Tcl/registry2.0/registry.tcl"
    ("package ifneeded registry 1.0" script)
    invoked from within
"package require registry 1.0"
    (procedure "mportinit" line 485)
    invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, invalid command name "::tcl::tm::UnknownHandler"

My system is a MacBook (mid-2009) running MountainLion and XCode with all current updates.

I have tried to

  • reinstall MacPorts from the installer
  • reinstall MacPorts from the source

Both installation and compilation of MacPorts works correctly, but the command "port" keeps failing with the above error.

Change History (8)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: Tcl removed
Priority: HighNormal

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Does package require msgcat work in /usr/bin/tclsh?

comment:3 Changed 12 years ago by platipodium (Carsten Lemmen)

/usr/bin/tclsh
% package require msgcat
invalid command name "::tcl::tm::UnknownHandler"

No, it does not.

comment:4 Changed 12 years ago by platipodium (Carsten Lemmen)

This is a problem with tcl, not macports. I resolved it by editing /opt/local/bin/port and hardcoding an alternative tclsh in line 4

s#/usr/bin/tclsh#/sw/bin/tclsh#

That breaks on every port selfupdate, but it's a temporary fix. I wonder whether there could be a run time option which Tcl to use (i.e. an environment variable or a configuration setting within macports)

comment:5 in reply to:  1 ; Changed 12 years ago by platipodium (Carsten Lemmen)

Replying to ryandesign@…: Keyword Tcl should be restored.

comment:6 in reply to:  5 Changed 12 years ago by larryv (Lawrence Velázquez)

Replying to carsten@…:

Keyword Tcl should be restored.

Unnecessary, since “tcl” appears elsewhere in the ticket.

comment:7 Changed 11 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed

So basically your tcl standard library is broken somehow. We can't do anything about that.

comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.