Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#27682 closed defect (invalid)

Zlib fails to install

Reported by: pierrelouis.peeters@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description

Hello,

I've got an error when I try to install zlib. Here it is :

sudo port install zlib
Error: Unable to open port: couldn't change working directory to "/opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib": no such file or directory
To report a bug, see <http://guide.macports.org/#project.tickets>

Already tried to 'ports sync'. Any solution ?

Change History (16)

comment:1 in reply to:  description Changed 14 years ago by pierrelouis.peeters@…

Replying to pierrelouis.peeters@…:

Hello,

I've got an error when I try to install zlib. Here it is :

sudo port install zlib
Error: Unable to open port: couldn't change working directory to "/opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib": no such file or directory
To report a bug, see <http://guide.macports.org/#project.tickets>

Already tried to 'ports sync'. Any solution ?

Hem... I just re-tried and the sync apparently fixed the problem this time, but I came up with another one this time :

--->  Extracting zlib
Error: Target org.macports.extract returned: 2010-12-15 15:11:52.089 defaults[60096:903] 
The domain/default pair of (/Developer/Applications/Xcode.app/Contents/Info, CFBundleShortVersionString) does not exist
Log for zlib is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

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

Cc: ryandesign@… added
Priority: HighNormal

What version of Mac OS X are you using, and what version of Xcode is installed? It sounds like either you don't have Xcode installed at all, or it's a version that's too old, or you've installed Xcode in a nonstandard location and you haven't informed MacPorts what that nonstandard location is via the developer_dir variable in macports.conf.

comment:3 Changed 14 years ago by pierrelouis.peeters@…

I'm on Mac OS X 10.6.5. I just reinstalled the last version of Xcode, that solved this problem. Now I've got this :

--->  Extracting zlib
--->  Applying patches to zlib
Error: Target org.macports.patch returned: shell command failed (see log for details)
Error: Failed to install zlib
Log for zlib is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/main.log
Error: The following dependencies were not installed: openssl zlib
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Here's the log :

version:1
:debug:main Executing org.macports.main (zlib)
:debug:main Skipping completed org.macports.fetch (zlib)
:debug:main Skipping completed org.macports.checksum (zlib)
:debug:main setting option extract.cmd to /usr/bin/bzip2
:msg:main --->  Extracting zlib
:debug:extract extract phase started at Wed Dec 15 20:24:18 CET 2010
:debug:extract Executing proc-pre-org.macports.extract-extract-0
:debug:extract Executing org.macports.extract (zlib)
:info:extract --->  Extracting zlib-1.2.5.tar.bz2
:debug:extract setting option extract.args to '/opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2'
:debug:extract Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:extract Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work" && /usr/bin/bzip2 -dc '/opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2' | /usr/bin/gnutar --no-same-owner -xf -'
:info:extract bzip2: Can't open input file /opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2: No such file or directory.
:debug:patch patch phase started at Wed Dec 15 20:24:19 CET 2010
:debug:patch Executing org.macports.patch (zlib)
:msg:patch --->  Applying patches to zlib
:info:patch --->  Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib/files/patch-Makefile.in.diff
:debug:patch Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/patch -p0'
:info:patch sh: line 0: cd: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5: No such file or directory
:info:patch shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib/files/patch-Makefile.in.diff'" returned error 1
:error:patch Target org.macports.patch returned: shell command failed (see log for details)
:debug:patch Backtrace: shell command failed (see log for details)
    while executing
"command_exec patch "" "< '$patch'""
    (procedure "portpatch::patch_main" line 35)
    invoked from within
"$procedure $targetname"
:info:patch Warning: the following items did not execute (for zlib): org.macports.activate org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install
:error:patch Failed to install zlib
:notice:patch Log for zlib is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/main.log
 

comment:4 in reply to:  2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

It sounds like either you don't have Xcode installed at all [...] or you've installed Xcode in a nonstandard location

I've changed the xcodeversion portgroup in r74403 so that it checks for the existence of Xcode first (before checking its version) and prints a better error message when Xcode is not found.

comment:5 in reply to:  3 ; Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to pierrelouis.peeters@…:

:info:extract bzip2: Can't open input file /opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2: No such file or directory.

Could it be that you initially tried to install zlib without using "sudo", and are now using "sudo"? Try this:

port clean --all zlib
sudo port clean --all zlib
sudo port install zlib

Remember to always use "sudo" when trying to install or uninstall ports.

comment:6 in reply to:  5 Changed 14 years ago by pierrelouis.peeters@…

Replying to ryandesign@…:

Replying to pierrelouis.peeters@…:

:info:extract bzip2: Can't open input file /opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2: No such file or directory.

Could it be that you initially tried to install zlib without using "sudo", and are now using "sudo"? Try this:

port clean --all zlib
sudo port clean --all zlib
sudo port install zlib

Remember to always use "sudo" when trying to install or uninstall ports.

I do :) But I indeed had a problem with it and that's probably causing it.

But anyway, option "port clean --all zlib" gets me an error : "global does not accept --clean". It's the same with sudo

comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Please verify you typed "port clean --all zlib" and "sudo port clean --all zlib" and not "--clean" something.

comment:8 Changed 14 years ago by pierrelouis.peeters@…

God I'm stupid ! Always verify the command is typed right... Thanks a lot !

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

Glad you got that working. This "Can't open input file" problem was supposed to have been solved in MacPorts 1.9.2 but I've seen several reports of the problem since then. Please verify you are actually running MacPorts 1.9.2? (Type "port version".) If you are, did you recently update to it?

comment:10 Changed 14 years ago by pierrelouis.peeters@…

I just installed it today. Checked anyway, and it's 1.9.2 :)

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

That's very good to know. So you've never had an earlier version of MacPorts than 1.9.2?

comment:12 Changed 14 years ago by pierrelouis.peeters@…

Nope.

comment:13 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

That settles it: then we definitely didn't fix it! I've reopened #25937.

Can you recall the commands you typed that led to the problem?

When I mentioned using sudo, you said "I do :) But I indeed had a problem with it and that's probably causing it." Could you describe the problem you had?

comment:14 Changed 14 years ago by pierrelouis.peeters@…

Uhm... I'm going to try to remember :P

I think it was an extraction problem, so I looked up zlib in Spotlight. When I found it I deleted the tar.gz thinking it would solve the problem. After that it came with another error I don't remember. What I did afterwards is delete everything related to zlib on my Mac.

That's all I remember, hope it helps ;)

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

Resolution: invalid
Status: newclosed

OK, so don't delete distfiles manually, use clean --dist or --all. Deleting "everything related to zlib" is a really bad idea BTW since zlib is part of the OS.

comment:16 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Admittedly, Spotlight won't find the components of zlib that are part of the OS, nor the ones installed by MacPorts, though it might find a distfile in ~/.macports. (I'm not sure; I don't have distfiles there and don't use Spotlight.)

But yes, MacPorts first fetches a distfile, then verifies its integrity by computing and verifying its checksums, then extracts it. If you had a problem extracting the port, then manually deleted the distfile, then told MacPorts to try again, without telling it to first clean the port (which would have told it to start the phases from the beginning instead of trying to continue where it left off), it's not surprising it failed to find the distfile in the extract phase. So this is not #25937, just a misunderstanding about how MacPorts works.

It might still be interesting to know what problem you experienced during the extract phase, but we can also just consider the matter resolved for now.

Note: See TracTickets for help on using tickets.