ccache problem

Ryan Schmidt ryandesign at macports.org
Mon Apr 11 07:58:55 UTC 2022


On Apr 9, 2022, at 14:33, Werner LEMBERG wrote:

>>> ```
>>> ccache /opt/local/bin/clang-mp-13 ... conftest.c >&5
>>> ccache: error: Failed to create temporary file for
>>>  /run/user/507/ccache-tmp/tmp.cpp_stdout.RTVNqj: Operation not permitted
>>> ```
>>> 
>>> What's the reason that `port` tries to use
>>> `/run/user/507/ccache-tmp/` (uid 507 = macports) instead of the
>>> default ccache dir?
>> 
>> I've never heard of that happening before. macOS has never had a
>> /run directory.
> 
> Well, I'm not a MacOS user – except doing regular updates for MacPorts
> (and checking/adjusting the LilyPond port if necessary), this computer
> isn't used for anything else.
> 
>> Is a path beginning with /run/user familiar to you?
> 
> No.
> 
>> Do you have something special set on your system that uses such
>> paths?
> 
> No idea.  As mentioned in my previous e-mail, I haven't changed
> anything in the configuration.
> 
>> Does this happen with any other ports or just lilypond-devel?  Maybe
>> lilypond-devel's build system is doing something weird.
> 
> It seems to be a problem with the 'ccache' package/port on MacOS
> 10.7.5.  After updating to current git (and running `port sync`),
> `port upgrade outdated` just tried to compile emacs 28.1, and exactly
> the same problem happened.
> 
> How can I test most easily whether my assumption is correct?  What is
> the recommended way to install an older version of 'ccache'?


It looks like /run/user/<UID>/ccache-tmp is indeed a path hardcoded into the ccache program.


The documentation says:

https://ccache.dev/manual/4.6.html#config_temporary_dir

"The default is /run/user/<UID>/ccache-tmp if /run/user/<UID> exists, otherwise <cache_dir>/tmp."

If you are certain that /run/user/<UID> does not exist, then perhaps the detection of its existence is faulty on Mac OS X 10.7.5.


The changelog for 4.6 says:

https://ccache.dev/releasenotes.html#_bug_fixes

"Ccache now verifies that /run/user/<UID>/ccache-tmp is writable before using it for temporary files."

Perhaps that detection is faulty on Mac OS X 10.7.5 or something else was inadvertently changed/broken during the implementation of this fix.


To install an older version of a port, see https://trac.macports.org/wiki/howto/InstallingOlderPort






More information about the macports-users mailing list