Opened 9 years ago

Closed 6 years ago

Last modified 5 years ago

#34547 closed defect (fixed)

python27: Failed to locate 'xz' in path

Reported by: fgermano@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone: MacPorts 2.3.4
Component: base Version: 2.3.3
Keywords: Cc: boris.w.lau@…, ryandesign (Ryan Schmidt), Ionic (Mihai Moldovan), umang.ipu@…, hapaguy (Brian Kurt Fujikawa)
Port: python27

Description (last modified by ryandesign (Ryan Schmidt))

following set up git mercurial for mac instructions
git-core fails to install
failed to locate xz in path
installed python 2.7.3 directly
reran port for git-core

--->  Computing dependencies for git-core
--->  Dependencies to be installed: python27 rsync popt
--->  Extracting python27
Error: org.macports.extract for port python27 returned: Failed to locate 'xz' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
Error: Failed to install python27
Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log
Error: The following dependencies were not installed: python27 rsync popt
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port git-core failed

Attachments (1)

python27-main.log (1.7 KB) - added by boris.w.lau@… 8 years ago.
main.log debug message in python install -d python27

Download all attachments as: .zip

Change History (21)

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

Description: modified (diff)
Keywords: git-core python removed
Owner: changed from macports-tickets@… to jwa@…
Port: python27 added
Summary: git-core faiis to install on mac 10.7; python issuepython27: Failed to locate 'xz' in path

Is the xz port in fact installed? It should be, since it's listed as a dependency of python27. Please "sudo port clean python27" and try again, then attach the main.log file if it fails again.

Remember to use WikiFormatting when writing in Trac.

comment:2 Changed 9 years ago by ryandesign (Ryan Schmidt)

fgermano, did my suggestions above help?

comment:3 in reply to:  2 Changed 9 years ago by cmanbrown@…

Replying to ryandesign@…:

fgermano, did my suggestions above help?

ryandesign, I also hit this problem on my system. I was attempting to install via the commands below. Please see the entire CLI with the output:

$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg
--->  Computing dependencies for gmake
--->  Cleaning gmake
--->  Computing dependencies for libsdl
--->  Dependencies to be installed: xorg-libXext xorg-libX11 xorg-libxcb python27 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-xextproto xorg-libXrandr xorg-randrproto xrender xorg-renderproto
--->  Fetching archive for python27
--->  Attempting to fetch python27-2.7.3_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/python27
--->  Fetching distfiles for python27
--->  Verifying checksum(s) for python27
--->  Extracting python27
Error: org.macports.extract for port python27 returned: Failed to locate 'xz' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
Error: Failed to install python27
Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log
Error: The following dependencies were not installed: xorg-libXext xorg-libX11 xorg-libxcb python27 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-xextproto xorg-libXrandr xorg-randrproto xrender xorg-renderproto
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libsdl failed

I tried your suggestion to "sudo port clean python27"and try again but I still hit the problem. What I did next was to "sudo install xz" and then retried my original install command and it worked.

I'm seeing some other errors related to failed dependencies... Could the dependency checker/installer be broken?

I've tried to attach the latest log but it appears to be empty.

Thanks!

comment:4 Changed 9 years ago by cmanbrown@…

Update,

I got around the error again by manually installing all of the dependencies.

Sounds like the dependencies aren't automatically getting installed for some reason. Is there specific commands/flags that should be passed in order to do this?

comment:5 Changed 9 years ago by jyrkiwahlstedt

This may be a bug somewhere in the system:( 'xz' is mentioned as 'Extract Dependency', and according to the documentation this information is not stored in registry, and above python27 will be installed from pre-built archive, so there may be a slight gap somewhere, so that this dependency is required, though it apparently shouldn't be (the source archive for python27 is in xz-format, so it needs this) Good to know that installing xz manually is a workaround, it shouldn't be needed, though…

comment:6 in reply to:  5 Changed 9 years ago by ironfrost@…

I got the same problem - MacPorts couldn't install glib2 (which was being automatically installed as a dependency for ImageMagick), because it couldn't locate xz. Port install xz fixed the problem.

Posting here because the dependency problem seems to be wider than just Python 2.7.

comment:7 in reply to:  5 Changed 9 years ago by jmroot (Joshua Root)

Replying to jwa@…:

This may be a bug somewhere in the system:( 'xz' is mentioned as 'Extract Dependency', and according to the documentation this information is not stored in registry, and above python27 will be installed from pre-built archive, so there may be a slight gap somewhere, so that this dependency is required, though it apparently shouldn't be (the source archive for python27 is in xz-format, so it needs this)

Extract dependencies don't need to be stored in the registry. Also, the extract phase is not run when installing from an archive, plus archives are all tbz2 on our server anyway.

As nobody has yet attached debug output / main.log, there is no possibility of figuring out the cause of the problem.

comment:8 Changed 8 years ago by boris.w.lau@…

Cc: boris.w.lau@… added

Cc Me!

Changed 8 years ago by boris.w.lau@…

Attachment: python27-main.log added

main.log debug message in python install -d python27

comment:9 Changed 8 years ago by boris.w.lau@…

Attached main.log and messages

$ port install -d python27 | tee port-debug.log
--->  Computing dependencies for python27
--->  Extracting python27
Error: org.macports.extract for port python27 returned: Failed to locate 'xz' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port python27 failed

New to macports but xz does seems to be part of the dependency.

port deps python27
Full Name: python27 @2.7.3_0
Extract Dependencies: xz
Library Dependencies: gettext, zlib, openssl, sqlite3, db46, ncurses, bzip2,
                      libedit
Runtime Dependencies: python_select

Workaround: Installing xz before python27 works.

-boris

Last edited 8 years ago by boris.w.lau@… (previous) (diff)

comment:10 Changed 8 years ago by jmroot (Joshua Root)

The attached log is not complete, so it still doesn't show the dependencies being checked. To generate a complete log you have to start from a clean state.

comment:11 Changed 6 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added
Resolution: worksforme
Status: newclosed

It's been years and nobody has provided a complete log, without which we cannot figure out what went wrong, and we cannot reproduce the problem on our own machines either, so I'm going to close this. If someone still experiences this problem and can provide a complete log, please do so and re-open the ticket.

comment:12 Changed 6 years ago by Ionic (Mihai Moldovan)

Cc: ionic@… added
Resolution: worksforme
Status: closedreopened
Version: 2.1.12.3.3

Has duplicate #48254.

Btw, I've already tried debugging that once for a user on the mailing list - to no avail. I even had the debug logs, but couldn't for my life figure out what was going on.

comment:13 Changed 6 years ago by Ionic (Mihai Moldovan)

Cc: umang.ipu@… added

comment:14 Changed 6 years ago by Ionic (Mihai Moldovan)

Previously, the error was fixed by cleaning and re-installing, though: http://article.gmane.org/gmane.os.apple.macports.user/38040

Does that also help in your case?

port -v clean python27
port -v install root6

Add variants to the install call as needed.

Last edited 6 years ago by Ionic (Mihai Moldovan) (previous) (diff)

comment:15 Changed 6 years ago by jmroot (Joshua Root)

I’m pretty sure this is a simple TOCTOU error. We calculate dependencies differently based on whether an archive is available. If one is, we don’t need build-time dependencies because we won’t be building. If an archive is found to be available but then fails to download for whatever reason though (e.g. internet connection goes down briefly), we get in trouble. We fall back to building from source, but we’re potentially missing some of the required dependencies.

The basic troubleshooting steps in wiki:FAQ#buildfails will fix the problem if you get into this state. I’ve also added a check in r138461 to make the installation fail early if we found an archive but then failed to download it.

comment:16 Changed 6 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: reopenedclosed

comment:17 Changed 6 years ago by jmroot (Joshua Root)

Component: portsbase

comment:18 Changed 6 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: brian.fujikawa@… added

Cc Me!

comment:19 Changed 5 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.3.4

comment:20 Changed 5 years ago by ryandesign (Ryan Schmidt)

Has duplicates #34749, #46483, #48947.

Note: See TracTickets for help on using tickets.