alternative for github clone with submodules -> make: *** [install] Error 71

Ryan Schmidt ryandesign at macports.org
Fri May 8 07:35:15 UTC 2020



> On May 7, 2020, at 11:11, macports at parvis.nl wrote:
> 
> 
>> On 2020-05-07, at 17:46, Christopher Jones wrote:
>> 
>> On 7 May 2020, at 4:41 pm, macports at parvis.nl wrote:
>>> ...
>>> 
>>> but now destroot fails.
>>> 
>>> log:
>>> ----
>>> 
>>> make: Entering directory `/opt/local/var/macports/build/_usr_local_macports_hfsinspect_sysutils_hfsinspect/hfsinspect/work/hfsinspect-02e0853'
>>> + echo 'Installing hfsinspect in /usr/local'
>>> Installing hfsinspect in /usr/local
>>> + mkdir -p /usr/local/bin
>>> + install build/Darwin-x86_64/hfsinspect /usr/local/bin
>>> install: /usr/local/bin/hfsinspect: Operation not permitted
>>> make: *** [install] Error 71
>>> 
>>> 
>>> what should i do now?
>> 
>> Any reference to /usr/local is wrong, macports does not use that location. The port file needs to configure the build to install to ${prefix} (which in default installations points to /opt/local).
> 
> typical OOPS moment. 
> changed Portfile: build.cmd make PREFIX=${prefix}

You should not override build.cmd just to add args (like PREFIX=${prefix}). Instead, leave build.cmd alone and set build.args PREFIX=${prefix} (if you need to set those args). But instead you may want to user the makefile 1.0 portgroup which looks like it sets that for you.


> make: Entering directory `/opt/local/var/macports/build/_usr_local_macports_hfsinspect_sysutils_hfsinspect/hfsinspect/work/hfsinspect-02e0853'
> + echo 'Installing hfsinspect in /opt/local'
> Installing hfsinspect in /opt/local
> + mkdir -p /opt/local/bin
> + install build/Darwin-x86_64/hfsinspect /opt/local/bin
> install: /opt/local/bin/hfsinspect: Operation not permitted
> make: *** [install] Error 71

According to the Makefile

https://github.com/ahknight/hfsinspect/blob/master/Makefile

it should only be printing "Installing hfsinspect in ..." if you ran "make install", which should only be happening in the destroot phase, not the build phase.

The Makefile doesn't seem to support DESTDIR, so you'll need to address that as well, for example using "makefile.has_destdir no" after you've included the makefile 1.0 portgroup.



More information about the macports-dev mailing list