[MacPorts] #43194: Failed to initialize Macports
#43194: Failed to initialize Macports -----------------------------+-------------------------------- Reporter: awil1026.1090@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: port file6 | Port: -----------------------------+-------------------------------- My port command does not function at all. Here is the output i get when using s simple port command: %% sudo port error reading "file6": illegal operation on a directory while executing "gets $f" (procedure "auto_load_index" line 23) invoked from within "auto_load_index" (procedure "auto_load" line 30) invoked from within "auto_load $name [uplevel 1 {::namespace current}]" (autoloading "::tcl::tm::UnknownHandler") (procedure "::unknown" line 30) invoked from within "::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 444) invoked from within "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, error reading "file6": illegal operation on a directory I've searched the for a fix, but can't find anything -- Ticket URL: <https://trac.macports.org/ticket/43194> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Changes (by cal@…): * keywords: port file6 => * owner: macports-tickets@… => cal@… * component: ports => base Old description:
My port command does not function at all. Here is the output i get when using s simple port command:
%% sudo port error reading "file6": illegal operation on a directory while executing "gets $f" (procedure "auto_load_index" line 23) invoked from within "auto_load_index" (procedure "auto_load" line 30) invoked from within "auto_load $name [uplevel 1 {::namespace current}]" (autoloading "::tcl::tm::UnknownHandler") (procedure "::unknown" line 30) invoked from within "::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 444) invoked from within "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, error reading "file6": illegal operation on a directory
I've searched the for a fix, but can't find anything
New description: My port command does not function at all. Here is the output i get when using s simple port command: {{{ %% sudo port error reading "file6": illegal operation on a directory while executing "gets $f" (procedure "auto_load_index" line 23) invoked from within "auto_load_index" (procedure "auto_load" line 30) invoked from within "auto_load $name [uplevel 1 {::namespace current}]" (autoloading "::tcl::tm::UnknownHandler") (procedure "::unknown" line 30) invoked from within "::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 444) invoked from within "mportinit ui_options global_options global_variations" Error: /opt/local/bin/port: Failed to initialize MacPorts, error reading "file6": illegal operation on a directory }}} I've searched the for a fix, but can't find anything -- Comment: Please use WikiFormatting when posting in Trac. I'm not sure why `auto_load_index` is trying to read a directory named `file6` from some path where it probably shouldn't be, but I think the error might also be occurring because of Tcl 8.6. Please provide the output of {{{ head -n4 /opt/local/bin/port echo 'puts [info patchlevel]' | /usr/bin/tclsh }}} -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by awil1026.1090@…): here is the output of that command: {{{ #!/bin/sh # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c -basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # Run the Tcl interpreter \ exec /usr/bin/tclsh "$0" "$@" iMac:~ imac$ echo 'puts [info patchlevel]' | /usr/bin/tclsh 8.5.9 }}} -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by cal@…): OK, so the problem isn't with the version of Tcl used, but it seems there's a file or directory in one of the paths referenced by your `$auto_path` variable that shouldn't be there. What are the contents of `/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts`? Do you have a file called `tclIndex` there? Also, does `tm.tcl` exist in this directory and does that file contain `proc ::tcl::tm::UnknownHandler`? From the error message and reading the source code it seems that in one of the directories printed by {{{ echo 'puts $auto_path' | /usr/bin/tclsh }}} there is a '''directory''' called `tclIndex`. Is that correct? -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by awil1026.1090@…): Yes, I have the tclIndex and the tm.tcl with the line proc ::tcl::tm::UnknownHandler {original name args} in the /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts directory. The last question: there is a '''directory''' called tclIndex, are you asking if there is a tclIndex folder within the /usr/bin/tclsh directory? The answer to that question would be no, but if you are reemphasizing whether I had the tclIndex folder within the /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts directory, then yes as stated above. -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by cal@…): Replying to [comment:4 awil1026.1090@…]:
Yes, I have the tclIndex and the tm.tcl with the line proc ::tcl::tm::UnknownHandler {original name args} in the /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts directory. OK. `tm.tcl` obviously is a file, but is `tclIndex` a file aswell, or is it a directory? It should be a file, if it's a directory your Tcl installation is broken.
The last question: there is a '''directory''' called tclIndex, are you asking if there is a tclIndex folder within the /usr/bin/tclsh directory? No, I'm not asking if there's a `tclIndex` folder in `/usr/bin/tclsh`, because `/usr/bin/tclsh` is a file.
The answer to that question would be no, but if you are reemphasizing whether I had the tclIndex folder within the /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts directory, then yes as stated above. Yeah, so that's the problem here. I'm not sure how you ended up with a folder called `tclIndex` in this system directory. Maybe your filesystem is flipping some bits it shouldn't? Try running repair from Disk Utility, and if that doesn't fix it, do the following:
- Move `/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tclIndex` aside, e.g. to `tclIndex.bak` - Recreate the `tclIndex` file by running `cd /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts && echo 'auto_mkindex .' | sudo /usr/bin/tclsh` - Make sure the new `tclIndex` file has the correct permissions (rw for root, readable by group and world). -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by awil1026.1090@…): I made a mistake, the tclIndex is a file (and not a folder as I previously said) in that location. I typed tclIndex folder unintentionally. -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by cal@…): I have attached a script. Please download it, make it executable, run it and paste its output. It recreates the steps that fail in auto_load_index and prints some debugging information that should easily pinpoint the problem. -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by awil1026.1090@…): here is the output I got from terminal[[BR]] iMac:Downloads imac$ tclsh find_the_culprit.tcl file /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tclIndex none /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex[[BR]] none /usr/local/lib/tclIndex[[BR]] none ~/Library/Tcl/tclIndex[[BR]] none /Library/Tcl/tclIndex[[BR]] none /System/Library/Tcl/tclIndex[[BR]] none ~/Library/Frameworks/tclIndex[[BR]] none /Library/Frameworks/tclIndex[[BR]] none /System/Library/Frameworks/tclIndex[[BR]] none /Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/tclIndex[[BR]] none /Library/Tcl/teapot/package/tcl/lib/tclIndex[[BR]] -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by cal@…): OK, so the problem isn't in any of the default entries of `$auto_path`. IIRC MacPorts adds a directory to the `$auto_path` variable during initialization, so maybe that one's the culprit. That directory would be `/opt/local/share/macports/Tcl`. Do you have a directory called `tclIndex` there? -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by awil1026.1090@…): Nope, no tclIndex in that directory either -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: | Keywords: Port: | ------------------------------+------------------- Comment (by cal@…): I'm not sure where to go from there then. You could try installing the 2.3 beta over your current installation, that might fix things. There's not much MacPorts can do about this, though -- we rely on a working Tcl installation, and yours doesn't appear to be. -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#43194: Failed to initialize Macports ------------------------------+-------------------- Reporter: awil1026.1090@… | Owner: cal@… Type: defect | Status: closed Priority: Normal | Milestone: Component: base | Version: 2.2.1 Resolution: worksforme | Keywords: Port: | ------------------------------+-------------------- Changes (by cal@…): * status: new => closed * resolution: => worksforme -- Ticket URL: <https://trac.macports.org/ticket/43194#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts