Opened 15 years ago

Closed 14 years ago

#24599 closed defect (fixed)

zlib destroot fails with cp usage message when Xcode is too old

Reported by: trichard@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: landonf (Landon Fuller)
Port: zlib

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello,

i just set up a new imac with all up to date Apple software (10.6.3, Macports 1.8.2) and tried to install mysql on the system.

I received the following error:

--->  Computing dependencies for mysql5
--->  Staging zlib into destroot
Error: Target org.macports.destroot returned: 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/make install prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/destroot/opt/local " returned error 2
Command output: cp libz.a /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/destroot/opt/local/lib
cp  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/destroot/opt/local/lib
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make: *** [install-libs] Error 64

Error: The following dependencies failed to build: openssl zlib readline
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.

then I tried to install ffmpeg or ImageMagick and i allways encountered the same message.

so i tried to install zlib... same message.

I've checked the permissions in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5 and /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/destroot/opt/local

everything seems to be ok.

What's going wrong with the zlib installation?

Thanks in advance

Thomas

Change History (8)

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

Cc: landonf@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…
Port: zlib added
Status: newassigned
Summary: Error 2 while trying to install zlib on OS X 10.6.3zlib destroot fails with cp usage message

Please remember WikiFormatting and to Cc the port's maintainers.

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

It looks like while it's having no trouble with the static library, it's having problems installing the shared library; looks like the Makefile variable SHAREDLIBV is empty for some reason.

Please clean and try again and use the debug switch:

sudo port clean zlib
sudo port -d install zlib 2>&1 | tee ~/Desktop/zlib.txt

Assuming it fails again, please attach the file zlib.txt from your desktop to this ticket so I can see everything that's going on.

comment:3 in reply to:  2 Changed 15 years ago by trichard@…

Replying to ryandesign@…:

Please clean and try again and use the debug switch:

sudo port clean zlib

That was the solution.

Don't know where it lost the variable

Thanks a lot, ticket can be closed.

comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: assignedclosed

Ok, glad you got it working.

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

This problem was also reported in #24896.

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

Has duplicate #25125.

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

Resolution: worksforme
Status: closedreopened

Through discussion in #25125 I believe this problem occurs when users try installing zlib while a too-old version of Xcode is installed (e.g. Xcode < 3.2 on Snow Leopard), then upgrade Xcode, then continue trying to install zlib without first cleaning zlib.

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

Resolution: fixed
Status: reopenedclosed
Summary: zlib destroot fails with cp usage messagezlib destroot fails with cp usage message when Xcode is too old

Fixed in r68569 by checking that a valid Xcode version is installed. MacPorts 1.9.0 will also fix this problem because it has such checks built in for all ports.

Note: See TracTickets for help on using tickets.