Opened 2 years ago

Closed 2 years ago

#66414 closed defect (invalid)

Failed to patch libffi: can't read "patch.cmd"

Reported by: programmingkidx Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: snowleopard Cc:
Port: libffi

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

When trying to install libffi on Mac OS 10.6.8 I see this error:

--->  Applying patches to libffi
Error: Failed to patch libffi: can't read "patch.cmd": Failed to locate 'patch' 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?

Attachments (1)

main.log (12.2 KB) - added by programmingkidx 2 years ago.

Download all attachments as: .zip

Change History (13)

Changed 2 years ago by programmingkidx

Attachment: main.log added

comment:1 Changed 2 years ago by jmroot (Joshua Root)

If you don't have /usr/bin/patch, then you have an incomplete OS installation.

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

Description: modified (diff)
Keywords: snowleopard added; libffi snow leopard patch can't find removed
Version: 2.8.0

comment:3 Changed 2 years ago by programmingkidx

'which patch' returns /usr/local/bin/patch.

comment:4 Changed 2 years ago by programmingkidx

@jmroot, you are right, there is no /usr/bin/patch.

comment:5 Changed 2 years ago by programmingkidx

After creating a symbolic link to /usr/local/bin/patch in /usr/bin/ I was able to install libffi. I don't know why libffi's installation has to only use /usr/bin/patch. I thought using any version of the patch command would be ok. Maybe one day the strict requirement to use only /usr/bin/patch can be removed.

comment:6 Changed 2 years ago by kencu (Ken)

the question is why is your system broken? You should reinstall it?

$ uname -a
Darwin KensMacBookPro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
$ ls -la /usr/bin/patch
-rwxr-xr-x  1 root  wheel  201424  4 Apr  2011 /usr/bin/patch

comment:7 Changed 2 years ago by kencu (Ken)

Summary: Failed to patch libffi: can't read "patch.cmd"Failed to patch libffi: can't read "patch.cmd" when /usr/bin/patch is missing from OS installation

comment:8 Changed 2 years ago by programmingkidx

Summary: Failed to patch libffi: can't read "patch.cmd" when /usr/bin/patch is missing from OS installationFailed to patch libffi: can't read "patch.cmd"

Maybe I removed the system-supplied patch command to use a newer version of it somewhere else. I can't remember.

comment:9 Changed 2 years ago by jmroot (Joshua Root)

Sounds like you didn't select UNIX subsystem (or whatever the installer calls it) when installing the OS.

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

Actually I misremembered, that was no longer an option in the installer by 10.6. So no idea how you got into this state, but it's going to be a serious problem if parts of the base OS are missing. We can't possibly support such a configuration.

comment:11 Changed 2 years ago by programmingkidx

This issue has been resolved for me. Feel free to close the ticket.

comment:12 Changed 2 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.