[MacPorts] #46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl
#46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl --------------------+-------------------------------- Reporter: mta@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.99 Keywords: | Port: --------------------+-------------------------------- When I ran restore_ports.tcl after upgrading to Yosemite it failed with the error {{{ expected integer but got "-exclusive" obtaining lock on /opt/local/var/macports/registry/.registry.lock while executing "registry::exclusive_lock" (procedure "mportexec" line 32) invoked from within "mportexec $workername $install_target" Unable to execute target 'install' for port 'fftw-3-single': expected integer but got "-exclusive" obtaining lock on /opt/local/var/macports/registry/.registry.lock while executing "install_ports $operationList" (file "restore_ports/restore_ports.tcl" line 300) }}} I tracked this down to the fact that there are two definitions of the flock TCL command installed as part of MacPorts. One is defined in TclX_FlockObjCmd which is in base/vendor/tclx8.4/generic/tclXflock.c. The other is defined in FlockCmd which is in base/src/pextlib1.0/flock.c. Macports seems to want, and get, the latter one. For some reason restore_ports sometimes, but not always, gets the other. Commenting out the call to TclX_FlockInit in Tclxcmd_Init which is in base/vendor/tclx8.4/generic/tclXinit.c seems to have fixed the problem. Unfortunately this isn't all that easy to do as part of the build since these files are installed unchanged from vendor archives. Perhaps a new archive with the appropriate change needs to be part of the MacPorts package. -- Ticket URL: <https://trac.macports.org/ticket/46733> MacPorts <https://www.macports.org/> Ports system for OS X
#46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl ---------------------+-------------------------------- Reporter: mta@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ---------------------+-------------------------------- Comment (by cal@…): The problem really is the order, in which we load the packages. I'm not sure why it differs randomly on some occasions. Instead of patching TclX, we should just rename our local copy of flock (that has different semantics from the TclX one). If you want to build a patch, it's in base/src/pextlib1.0/flock.c, I think. Alternatively, we could get rid of our own implementation and use TclX' flock instead, but that requires rewriting due to the different usage. -- Ticket URL: <https://trac.macports.org/ticket/46733#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl ---------------------+-------------------------------- Reporter: mta@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ---------------------+-------------------------------- Comment (by emer@…): Same thing happened to me with 10.11 - I'm looking to see if the fixes you describe work. Making a change from flock to flockmp, I'll let you know if it works. -- Ticket URL: <https://trac.macports.org/ticket/46733#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl ---------------------+-------------------------------- Reporter: mta@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: base | Version: 2.3.99 Resolution: | Keywords: Port: | ---------------------+-------------------------------- Comment (by emer@…): Totally worked. I'll post a patch tonight. -- Ticket URL: <https://trac.macports.org/ticket/46733#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl ---------------------+-------------------------------- Reporter: mta@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.99 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Changes (by cal@…): * status: new => closed * resolution: => fixed * milestone: => MacPorts Future Comment: Fixed in r138165. I'd backport this to the 2.3.x branch, but it seems we're going to do a feature release sooner than that, so I'll leave that be for now. -- Ticket URL: <https://trac.macports.org/ticket/46733#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#46733: Multiple definitons of flock TCL command cause problems, e.g., with restore_ports.tcl ---------------------+-------------------------------- Reporter: mta@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: 2.3.99 Resolution: fixed | Keywords: Port: | ---------------------+-------------------------------- Comment (by jmr@…): The 2.3 series doesn't include TclX, so no backport is necessary. -- Ticket URL: <https://trac.macports.org/ticket/46733#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts