Opened 2 years ago

Closed 2 years ago

#66118 closed defect (worksforme)

TeXShop @5.03 fails to build on macOS 13 (Ventura)

Reported by: mcmara (Jack McMara) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: ventura Cc:
Port: TeXShop

Description

I'm unable to build TeXShop @5.03 on Ventura. Some basic system info:

$ xcodebuild -version
Xcode 14.1
Build version 14B47b

$ uname -a
Darwin mbp-151-gm1-4.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9
20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

Procedure:

$ sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.8.0 installed,
MacPorts base version 2.8.0 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated

$ sudo port clean TeXShop
--->  Cleaning TeXShop

$ sudo port install TeXShop
--->  Computing dependencies for TeXShop
--->  Fetching archive for TeXShop
--->  Attempting to fetch TeXShop-5.03_0.darwin_22.x86_64.tbz2 from https://packages.macports.org/TeXShop
--->  Attempting to fetch TeXShop-5.03_0.darwin_22.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/TeXShop
--->  Attempting to fetch TeXShop-5.03_0.darwin_22.x86_64.tbz2 from https://mse.uk.packages.macports.org/TeXShop
--->  Fetching distfiles for TeXShop
--->  Verifying checksums for TeXShop
--->  Extracting TeXShop
--->  Configuring TeXShop
--->  Building TeXShop
Error: Failed to build TeXShop: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port TeXShop failed

Log attached. it seems to have some xcode-related workspace creation error and aborting after this:

...
:info:build ** INTERNAL ERROR: Uncaught exception **
:info:build Uncaught Exception: *** -[NSArray arrayByAddingObject:]: object cannot be nil
...

Attachments (1)

main.log (38.1 KB) - added by mcmara (Jack McMara) 2 years ago.

Download all attachments as: .zip

Change History (12)

Changed 2 years ago by mcmara (Jack McMara)

Attachment: main.log added

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

Owner: set to Schamschula
Port: TeXShop added
Status: newassigned

comment:2 Changed 2 years ago by Schamschula (Marius Schamschula)

Hmm. I did install it on my Ventura machine.

The only difference I see is in the Xcode version (I've got 14B5033e). I generally rename and Xcode Beta to Xcode to prevent an older version (in this case Xcode 14.0) from providing the wrong toolset.

comment:3 Changed 2 years ago by mcmara (Jack McMara)

I'm using the latest (as of today) packages from Apple Developer website, which are:

  • Xcode 14.1 Release Candidate 2, October 24, 2022
  • Command Line Tools for Xcode 14.1 Release Candidate 2, October 24, 2022

Also:

$ ls  /Applications/ | grep code
Xcode.app

Tried to remove Xcode and CommandLineTools and reinstall everything, re-fetching the macport package, but the build error is still there:

$ sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.8.0 installed,
MacPorts base version 2.8.0 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated

$ sudo port clean TeXShop 
--->  Cleaning TeXShop

$ sudo rm /opt/local//var/macports/distfiles/TeXShop/texshopsource503.zip 

$ sudo port install TeXShop
--->  Computing dependencies for TeXShop
--->  Fetching archive for TeXShop
--->  Attempting to fetch TeXShop-5.03_0.darwin_22.x86_64.tbz2 from https://packages.macports.org/TeXShop
--->  Attempting to fetch TeXShop-5.03_0.darwin_22.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/TeXShop
--->  Attempting to fetch TeXShop-5.03_0.darwin_22.x86_64.tbz2 from https://mse.uk.packages.macports.org/TeXShop
--->  Fetching distfiles for TeXShop
--->  Attempting to fetch texshopsource503.zip from https://distfiles.macports.org/TeXShop/
--->  Attempting to fetch texshopsource503.zip from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/TeXShop/
--->  Attempting to fetch texshopsource503.zip from https://ywg.ca.distfiles.macports.org/mirror/macports/distfiles/TeXShop/
--->  Attempting to fetch texshopsource503.zip from http://pages.uoregon.edu/koch/texshop/texshop-64
--->  Verifying checksums for TeXShop                                                
--->  Extracting TeXShop
--->  Configuring TeXShop
--->  Building TeXShop
Error: Failed to build TeXShop: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port TeXShop failed

comment:4 Changed 2 years ago by Schamschula (Marius Schamschula)

I'll check on a work machine tomorrow. It has the same toolchain as your machine.

comment:5 Changed 2 years ago by Schamschula (Marius Schamschula)

On my work Mac mini (Intel) running

Xcode 14.1
Build version 14B47

and Darwin 22.1.0, I get a clean build.

Are you sure that you installed the additional tools after installing Xcode? I.e. the macOS SDK.

comment:6 Changed 2 years ago by mcmara (Jack McMara)

Thanks for verifying that. After migrating to Ventura, I did a fresh install of the following ports:

sudo port install bash bash-completion cmake coreutils getopt git +bash_completion gnupg2 gsed  boost doxygen eigen3 ffmpeg +gpl +postproc +lame +theora +libogg +vorbis +xvid +x264 +a52 +faac +faad +dts +nonfree freeglut ftgl gl2ps gnuplot xmlstarlet xorg-server xrandr texlive texlive-bibtex-extra texlive-fonts-extra texlive-latex-extra texlive-publishers TeXShop asymptote tk 

I do get a clean build of all of them with my setup except TeXShop and Asymptote (asymptote ticket is #66100). I'll dig in more to understand what is happening.

Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 2 years ago by Schamschula (Marius Schamschula)

The problem with asy isn't related to that of TeXShop.

TeXShop is the only package you listed that actually uses the macOS SDK. I'm suspecting that you didn't open up the Xcode App after you installed it, and therefore haven't installed the macOS 13 SDK.

comment:8 Changed 2 years ago by mcmara (Jack McMara)

Good hint. However, macOS 13 SDK is installed. I have macOS SDK 13.0 (22A372). In fact, if I build TexShop manually, it succeeds:

$ cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03" 

$ sudo -u macports /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -UseNewBuildSystem=NO -project TeXShop.xcodeproj -target TeXShop -configuration Release build INSTALL_PATH=/Applications/MacPorts OBJROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/ SYMROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/ MACOSX_DEPLOYMENT_TARGET=13.0 ARCHS=x86_64 SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY=libstdc++ FRAMEWORK_SEARCH_PATHS=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03 CONFIGURATION_BUILD_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build CODE_SIGN_IDENTITY=
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -UseNewBuildSystem=NO -project TeXShop.xcodeproj -target TeXShop -configuration Release build INSTALL_PATH=/Applications/MacPorts OBJROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/ SYMROOT=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/ MACOSX_DEPLOYMENT_TARGET=13.0 ARCHS=x86_64 SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk GCC_VERSION=com.apple.compilers.llvm.clang.1_0 CLANG_CXX_LIBRARY=libstdc++ FRAMEWORK_SEARCH_PATHS=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03 CONFIGURATION_BUILD_DIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build CODE_SIGN_IDENTITY=

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES
    UseNewBuildSystem = NO

Build settings from command line:
    ARCHS = x86_64
    CLANG_CXX_LIBRARY = libstdc++
    CODE_SIGN_IDENTITY = 
    CONFIGURATION_BUILD_DIR = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build
    FRAMEWORK_SEARCH_PATHS = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03
    GCC_VERSION = com.apple.compilers.llvm.clang.1_0
    INSTALL_PATH = /Applications/MacPorts
    MACOSX_DEPLOYMENT_TARGET = 13.0
    OBJROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/
    SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk
    SYMROOT = /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/

note: Using codesigning identity override: 
Computing target dependency graph and provisioning inputs

Create build description
Build description signature: 8524520a36f9cc23f57aca91149d2233
Build description path: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_TeXShop/TeXShop/work/TeXShop-5.03/build/XCBuildData/8524520a36f9cc23f57aca91149d2233-desc.xcbuild

warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
warning: CLANG_CXX_LIBRARY is set to 'libstdc++': The 'libstdc++' C++ Standard Library is no longer available, and this setting can be removed.
warning: CLANG_CXX_LIBRARY is set to 'libstdc++': The 'libstdc++' C++ Standard Library is no longer available, and this setting can be removed. (in target 'TeXShop' from project 'TeXShop')
warning: Couldn't load spec with identifier 'com.apple.compilers.gcc.4_2' in domain 'macosx' (in target 'TeXShop' from project 'TeXShop')
warning: TeXShop isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it. (in target 'TeXShop' from project 'TeXShop')
** BUILD SUCCEEDED **

But if I build it using macports (sudo port install texshop) I get weird errors in the log file:

:info:build 2022-10-31 21:21:56.450 xcodebuild[3218:50395] [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/TeXShop-alabyoqoygcuerfcddjvyedxupgi/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/TeXShop-alabyoqoygcuerfcddjvyedxupgi/Logs/Build': (513) You don’t have permission to save the file “Build” in the folder “Logs”.}. User info: {
:info:build     NSLocalizedDescription = "Unable to create log store directory at '/opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/TeXShop-alabyoqoygcuerfcddjvyedxupgi/Logs/Build': (513) You don\U2019t have permission to save the file \U201cBuild\U201d in the folder \U201cLogs\U201d.";
:info:build }.

Basically xcode cannot write anything insode /opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/. Note that to get the manual build to succeed I used sudo -u macports. Tried also to delete the whole /opt/local/var/macports/home/Library/ and have it re-created by xcode with no luck.

Is you macmini on Ventura as well?

Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 in reply to:  8 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to mcmara:

Basically xcode cannot write anything insode /opt/local/var/macports/home/Library/Developer/Xcode/DerivedData/.

That's #57137. Not sure why nobody has fixed that yet in a general way.

comment:10 Changed 2 years ago by mcmara (Jack McMara)

It was indeed xcode related. The version of Xcode 14.1 published yesterday November 1, 2022, with the new command line tools released in the same day, solved the problem for me. TeXShop now builds cleanly. I believe this ticked can be closed.

comment:11 Changed 2 years ago by Schamschula (Marius Schamschula)

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.