Opened 5 months ago

Last modified 5 weeks ago

#61568 assigned defect

pinentry-mac @0.9.4 has still problems to build on Big Sur

Reported by: ballapete (Peter Dyballa) Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur Cc: mascguy (Christopher Nielsen)
Port: pinentry-mac

Description

Xcode a few times reports Unable to create or You don\U2019t have permission. Since the original Main.log file was removed on successful build I am copying excerpts from the *compilation* buffer in GNU Emacs without windows, i.e. in Terminal.

Build settings from command line:
    ARCHS = x86_64
    CLANG_CXX_LIBRARY = libc++
    GCC_VERSION = com.apple.compilers.llvm.clang.1_0
    INSTALL_PATH = /Applications/MacPorts
    MACOSX_DEPLOYMENT_TARGET = 11.0
    OBJROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/
    SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
    SYMROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/

2020-11-19 21:38:01.012 xcodebuild[61130:8115125] [MT] IDELogStore: Failed to open log store at /opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build
2020-11-19 21:38:01.012 xcodebuild[61130:8115125] [MT] IDELogStore: Failed to open Build log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build': (513) You don\U2019t have permission to save the file \U201cBuild\U201d in the folder \U201cLogs\U201d.";
}.
2020-11-19 21:38:01.022 xcodebuild[61130:8115125] [MT] IDELogStore: Failed to open log store at /opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package
2020-11-19 21:38:01.022 xcodebuild[61130:8115125] [MT] IDELogStore: Failed to open Package log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package': (513) You don’t have permission to save the file “Package” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package': (513) You don’t have permission to save the file “Package” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package': (513) You don\U2019t have permission to save the file \U201cPackage\U201d in the folder \U201cLogs\U201d.";
}.
2020-11-19 21:38:01.029 xcodebuild[61130:8115125] [MT] IDELogStore: Failed to open log store at /opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test
2020-11-19 21:38:01.029 xcodebuild[61130:8115125] [MT] IDELogStore: Failed to open Test log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test': (513) You don’t have permission to save the file “Test” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test': (513) You don’t have permission to save the file “Test” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test': (513) You don\U2019t have permission to save the file \U201cTest\U201d in the folder \U201cLogs\U201d.";
}.
2020-11-19 21:38:01.341 xcodebuild[61130:8115125] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17535/IDEFoundation/Buildables/IDEWorkspaceArena.m:1118
Details:  Failed to create workspace arena at <DVTFilePath:0x7fc0611abb20:'/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???'>: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “pinentry-mac-???” in the folder “DerivedData”." UserInfo={NSFilePath=/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/pinentry-mac-???, NSUnderlyingError=0x7fbff6cec230 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
Object:   <IDEWorkspaceArena: 0x7fbff6e942e0>
Method:   -createWorkspaceArenaFolderIfNecessary
Thread:   <NSThread: 0x7fc056e092a0>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
note: Using new build system
note: Planning build
note: Constructing build description
warning: Traditional headermap style is no longer supported; please migrate to using separate headermaps and set 'ALWAYS_SEARCH_USER_PATHS' to NO. (in target 'pinentry-mac' from project 'pinentry-mac')

...

** BUILD SUCCEEDED **

...

./var/spool missing (created)
./www missing (created)
DEBUG: Executing org.macports.destroot (pinentry-mac)
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4" && /usr/bin/xcodebuild -UseNewBuildSystem=NO  -target "pinentry-mac" -configuration Release install INSTALL_PATH=/Applications/MacPorts  OBJROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/" SYMROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/" MACOSX_DEPLOYMENT_TARGET=11.0 ARCHS=x86_64 SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk" GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY="libc++"  DSTROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/destroot"'
DEBUG: system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4" && /usr/bin/xcodebuild -UseNewBuildSystem=NO  -target "pinentry-mac" -configuration Release install INSTALL_PATH=/Applications/MacPorts  OBJROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/" SYMROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/" MACOSX_DEPLOYMENT_TARGET=11.0 ARCHS=x86_64 SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk" GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY="libc++"  DSTROOT="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/destroot"
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -UseNewBuildSystem=NO -target pinentry-mac -configuration Release install INSTALL_PATH=/Applications/MacPorts OBJROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/ SYMROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/ MACOSX_DEPLOYMENT_TARGET=11.0 ARCHS=x86_64 SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY=libc++ DSTROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/destroot

User defaults from command line:
    UseNewBuildSystem = NO

Build settings from command line:
    ARCHS = x86_64
    CLANG_CXX_LIBRARY = libc++
    DSTROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/destroot
    GCC_VERSION = com.apple.compilers.llvm.clang.1_0
    INSTALL_PATH = /Applications/MacPorts
    MACOSX_DEPLOYMENT_TARGET = 11.0
    OBJROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/
    SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
    SYMROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_pinentry-mac/pinentry-mac/work/pinentry-mac-0.9.4/build/

2020-11-19 21:38:19.118 xcodebuild[61210:8116300] [MT] IDELogStore: Failed to open log store at /var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build
2020-11-19 21:38:19.118 xcodebuild[61210:8116300] [MT] IDELogStore: Failed to open Build log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Build': (513) You don\U2019t have permission to save the file \U201cBuild\U201d in the folder \U201cLogs\U201d.";
}.
2020-11-19 21:38:19.126 xcodebuild[61210:8116300] [MT] IDELogStore: Failed to open log store at /var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package
2020-11-19 21:38:19.126 xcodebuild[61210:8116300] [MT] IDELogStore: Failed to open Package log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package': (513) You don’t have permission to save the file “Package” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package': (513) You don’t have permission to save the file “Package” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Package': (513) You don\U2019t have permission to save the file \U201cPackage\U201d in the folder \U201cLogs\U201d.";
}.
2020-11-19 21:38:19.131 xcodebuild[61210:8116300] [MT] IDELogStore: Failed to open log store at /var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test
2020-11-19 21:38:19.131 xcodebuild[61210:8116300] [MT] IDELogStore: Failed to open Test log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test': (513) You don’t have permission to save the file “Test” in the folder “Logs”." UserInfo={NSLocalizedDescription=Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test': (513) You don’t have permission to save the file “Test” in the folder “Logs”.}. User info: {
    NSLocalizedDescription = "Unable to create log store directory at '/var/root/Library/Developer/Xcode/DerivedData/pinentry-mac-???/Logs/Test': (513) You don\U2019t have permission to save the file \U201cTest\U201d in the folder \U201cLogs\U201d.";
}.
Prepare build
note: The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Project Settings.
=== BUILD TARGET pinentry-mac OF PROJECT pinentry-mac WITH CONFIGURATION Release ===

Check dependencies

...

** INSTALL SUCCEEDED **

Another report:

2020-11-19 21:38:04.425 ibtoold[61151:8115884] CoreText note: Client requested name ".LucidaGrandeUI", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-11-19 21:38:04.425 ibtoold[61151:8115884] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.

Change History (11)

comment:1 Changed 5 months ago by ryandesign (Ryan Schmidt)

If it installed successfully, then we don't really need to do anything, do we?

The permission errors with derived data are covered in #57137. By all means file a bug report with Apple and ask them to fix xcodebuild so that it respects the HOME environment variable, which would fix it.

comment:2 Changed 5 months ago by mf2k (Frank Schima)

Cc: ionic@… removed
Owner: set to Ionic
Status: newassigned

comment:3 in reply to:  1 Changed 5 months ago by ballapete (Peter Dyballa)

Replying to ryandesign:

The permission errors with derived data are covered in #57137. By all means file a bug report with Apple and ask them to fix xcodebuild so that it respects the HOME environment variable, which would fix it.

Done: https://feedbackassistant.apple.com/feedback/8909205.

comment:4 Changed 2 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:5 Changed 2 months ago by mascguy (Christopher Nielsen)

This failure is also occurring on macOS 10.12, so it's not limited to Big Sur:

https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/135633/steps/install-port/logs/stdio

When recently setting up a macOS 10.12 VM for testing, I saw the same issue. After a few minutes of head-scratching, I tried launching the Xcode IDE once, to allow the one-time Xcode setup to occur. After that, it worked.

Does anyone know precisely what Xcode is doing during that setup, and whether it can be initiated from the command-line?

comment:6 Changed 2 months ago by svalgaard (Jens Svalgaard Kohrt)

A have the same build error on a new MacBook Pro M1.

After running Xcode with GUI for the first time, where it asks me to allow it to install "additional components", the installation succeeds.

comment:7 in reply to:  6 Changed 2 months ago by mascguy (Christopher Nielsen)

Replying to svalgaard:

A have the same build error on a new MacBook Pro M1.

After running Xcode with GUI for the first time, where it asks me to allow it to install "additional components", the installation succeeds.

Given that this fix works for both macOS 10.12 and Big Sur, are we 100% certain that the HOME environment variable is the sole issue?

Ryan, do you know whether the Xcode IDE has been launched at least once for, within each of our builders? If not, would it be feasible to do this, as annoying as that prospect is?

Version 0, edited 2 months ago by mascguy (Christopher Nielsen) (next)

comment:8 Changed 2 months ago by ballapete (Peter Dyballa)

I got the impression that port @2.6.4 does not understand that Xcode 12.x actually is installed completely. I do remember that I received reports about missing command line components although they were installed before…

comment:9 in reply to:  8 Changed 8 weeks ago by ballapete (Peter Dyballa)

Replying to ballapete:

From trying to build new release of AUCTeX which leads to upgrading everything, I think:

DEBUG: Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_auctex/auctex/work /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/editors/auctex/work
DEBUG: dropping privileges: euid changed to 501, egid changed to 20.
DEBUG: Starting logging for auctex
DEBUG: macOS 11.2 (darwin/20.3.0) arch i386
DEBUG: MacPorts 2.6.4
DEBUG: Xcode 12.4
DEBUG: SDK 11.2
DEBUG: MACOSX_DEPLOYMENT_TARGET: 11.2
Warning: The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.
DEBUG: epoch: in tree: 0 installed: 0
root 88 /\ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
pete 327 /\ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

comment:10 Changed 5 weeks ago by eejd

I am trying to develop a Portfile for ZeroTier One and am encountering the same problem. In my case, if I run

make -w all

as a normal user, the compile goes through without errors. If I compile via

sudo port build zerotier

I get the same errors seen here (i.e. dropping privileges to the normal user fails to build).

xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

for both sudo and base user. Have you identified a workaround?

comment:11 in reply to:  10 Changed 5 weeks ago by ballapete (Peter Dyballa)

Replying to eejd:

xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Port reports on Big Sur that Xcode is not correctly installed. This seems to be a bug in port IMO.

Note: See TracTickets for help on using tickets.