Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Errors with 2.4.0 #116

Open
sepw opened this issue Feb 7, 2023 · 6 comments
Open

Build Errors with 2.4.0 #116

sepw opened this issue Feb 7, 2023 · 6 comments

Comments

@sepw
Copy link

sepw commented Feb 7, 2023

I use SwiftAA as a dependency in my Swift package. Today I updated my dependencies and SwiftAA was updated to 2.4.0 (it was previously 2.3.2).

I now cannot build my project (2.3.2 compiled fine), with the compilation of SwiftAA failing with the following errors:

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetaryPhenomena2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetPerihelionAphelion2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPhases2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPerigeeApogee2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonNodes2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

The errors appear to occur when building AA+. The checkout directory indeed doesn't contain aaplus-v2.08 files. Instead, it contains a checkout for aaplus-v2.44:

> cd <project>/SourcePackages/checkouts/SwiftAA/Sources/
> ls -la
total 0
drwxr-xr-x    6 user  staff   192 Feb  7 12:28 .
drwxr-xr-x   18 user  staff   576 Feb  7 12:28 ..
lrwxr-xr-x    1 user  staff    12 Feb  7 12:28 AA+ -> aaplus-v2.44
drwxr-xr-x   61 user  staff  1952 Feb  7 12:28 ObjCAA
drwxr-xr-x   46 user  staff  1472 Feb  7 12:28 SwiftAA
drwxr-xr-x  129 user  staff  4128 Feb  7 12:28 aaplus-v2.44

The complete build output is:

Build target AAplus with configuration Debug

CompileC <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetaryPhenomena2.o <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetaryPhenomena2.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'AAplus' from project 'SwiftAA')
    cd <project>/SourcePackages/checkouts/SwiftAA
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-macos10.13 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++1z -fmodules -gmodules -fmodules-cache-path\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=AAplus -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path <project>/Index.noindex/DataStore -I<project>/Build/Products/Debug/include -I<project>/SourcePackages/checkouts/SwiftAA/Sources/AA+/include -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources-normal/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources -F<project>/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetaryPhenomena2.d --serialize-diagnostics <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetaryPhenomena2.dia -c <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetaryPhenomena2.cpp -o <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetaryPhenomena2.o -index-unit-output-path /SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetaryPhenomena2.o

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetaryPhenomena2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetaryPhenomena2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

CompileC <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetPerihelionAphelion2.o <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetPerihelionAphelion2.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'AAplus' from project 'SwiftAA')
    cd <project>/SourcePackages/checkouts/SwiftAA
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-macos10.13 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++1z -fmodules -gmodules -fmodules-cache-path\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=AAplus -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path <project>/Index.noindex/DataStore -I<project>/Build/Products/Debug/include -I<project>/SourcePackages/checkouts/SwiftAA/Sources/AA+/include -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources-normal/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources -F<project>/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetPerihelionAphelion2.d --serialize-diagnostics <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetPerihelionAphelion2.dia -c <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetPerihelionAphelion2.cpp -o <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetPerihelionAphelion2.o -index-unit-output-path /SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAPlanetPerihelionAphelion2.o

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetPerihelionAphelion2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAPlanetPerihelionAphelion2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

CompileC <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPhases2.o <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPhases2.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'AAplus' from project 'SwiftAA')
    cd <project>/SourcePackages/checkouts/SwiftAA
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-macos10.13 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++1z -fmodules -gmodules -fmodules-cache-path\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=AAplus -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path <project>/Index.noindex/DataStore -I<project>/Build/Products/Debug/include -I<project>/SourcePackages/checkouts/SwiftAA/Sources/AA+/include -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources-normal/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources -F<project>/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPhases2.d --serialize-diagnostics <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPhases2.dia -c <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPhases2.cpp -o <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPhases2.o -index-unit-output-path /SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPhases2.o

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPhases2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPhases2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

CompileC <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPerigeeApogee2.o <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPerigeeApogee2.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'AAplus' from project 'SwiftAA')
    cd <project>/SourcePackages/checkouts/SwiftAA
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-macos10.13 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++1z -fmodules -gmodules -fmodules-cache-path\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=AAplus -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path <project>/Index.noindex/DataStore -I<project>/Build/Products/Debug/include -I<project>/SourcePackages/checkouts/SwiftAA/Sources/AA+/include -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources-normal/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources -F<project>/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPerigeeApogee2.d --serialize-diagnostics <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPerigeeApogee2.dia -c <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPerigeeApogee2.cpp -o <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPerigeeApogee2.o -index-unit-output-path /SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonPerigeeApogee2.o

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPerigeeApogee2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonPerigeeApogee2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

CompileC <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonNodes2.o <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonNodes2.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'AAplus' from project 'SwiftAA')
    cd <project>/SourcePackages/checkouts/SwiftAA
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-macos10.13 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu++1z -fmodules -gmodules -fmodules-cache-path\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/<user>/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -fmodule-name\=AAplus -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -DSWIFT_PACKAGE -DDEBUG\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -index-store-path <project>/Index.noindex/DataStore -I<project>/Build/Products/Debug/include -I<project>/SourcePackages/checkouts/SwiftAA/Sources/AA+/include -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources-normal/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources/arm64 -I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources -F<project>/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -DXcode -MMD -MT dependencies -MF <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonNodes2.d --serialize-diagnostics <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonNodes2.dia -c <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonNodes2.cpp -o <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonNodes2.o -index-unit-output-path /SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/AAMoonNodes2.o

error: Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonNodes2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'AAplus' from project 'SwiftAA')

Build input file cannot be found: '<project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/AAMoonNodes2.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

Build failed    07.02.23, 12:28    2.9 seconds

(<project> in the above refers to /Users/<user>/Library/Developer/Xcode/DerivedData/<package>).

It appears SwiftAA is checking out AA+ v2.44 but the build scripts are referencing v2.08 for some reason. ObjCAA.podspec that is checked out references AA+ 2.44 as expected:

Pod::Spec.new do |s|

  s.name         = "ObjCAA"
  s.version      = "2.4.0"
  s.summary      = "The most comprehensive and accurate collection of astronomical algorithms in Objective-C."

  s.description  = <<-DESC
ObjCAA aims to provide the most comprehensive collection of accurate astronomical algorithms in Objective-C.
That is, based on the reference textbook "Astronomical Algorithms" by Jean Meeus, ObjCAA provides modern
APIs about all things astronomical. It is based on the C++ layer developed since many years by J.P. Naughter.
ObjCAA is built upon this C++ layer (respecting strictly the lower APIs). It is the base upon which SwiftAA
is crafted.
                   DESC

  s.homepage     = "https://www.onekiloparsec.dev/SwiftAA"
  s.license      = { :type => "MIT", :file => "LICENSE" }

  s.author             = { "onekiloparsec (a.k.a. Cédric Foellmi)" => "cedric@onekiloparsec.dev" }
  s.social_media_url   = "http://twitter.com/onekiloparsec"

  #  When using multiple platforms
  s.ios.deployment_target = "12.0"
  s.osx.deployment_target = "10.13"
  # s.watchos.deployment_target = "6.0"
  # s.tvos.deployment_target = "9.0"

  s.source       = { :git => "https://github.com/onekiloparsec/SwiftAA.git", :tag => "#{s.version}" }

  s.framework    = "Foundation"
  s.swift_version = "5"

  s.name          = "ObjCAA"
  s.source_files  = "Sources/ObjCAA", "Sources/ObjCAA/**/*.{h,cpp}", "Sources/aaplus-v2.44", "Sources/aaplus-v2.44/**/*.{h,cpp}"
  s.public_header_files = "Sources/ObjCAA/include/*.h"
  s.exclude_files = "Sources/aaplus-v2.44/AATest.cpp", "Sources/aaplus-v2.44/include/AAVSOP2013.h", "Sources/aaplus-v2.44/AAVSOP2013.cpp"
  
  s.library = 'c++'
  s.xcconfig = {
       'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
       'CLANG_CXX_LIBRARY' => 'libc++'
  }

end

I have searched the files in my checkout for references to 2.08 but cannot find any, yet the paths passed to CompileC clearly reference aaplus-v2.08:

-x c++ 
-target arm64-apple-macos10.13 
-std\=gnu++1z 
-fmodules 
-gmodules 
-fmodule-name\=AAplus 
-DSWIFT_PACKAGE 
-DDEBUG\=1 
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk 
-I<project>/Build/Products/Debug/include 
-I<project>/SourcePackages/checkouts/SwiftAA/Sources/AA+/include 
-I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources-normal/arm64 
-I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources/arm64 
-I<project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/DerivedSources 
-F<project>/Build/Products/Debug 
-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks 
-DXcode 
-MF <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/stdafx.d 
--serialize-diagnostics <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/stdafx.dia 
-c <project>/SourcePackages/checkouts/SwiftAA/Sources/aaplus-v2.08/stdafx.cpp 
-o <project>/Build/Intermediates.noindex/SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/stdafx.o 
-index-unit-output-path /SwiftAA.build/Debug/AAplus.build/Objects-normal/arm64/stdafx.o

(A number of lines were omitted from the above in the interest of brevity).

I have no idea where these references to aaplus-v2.08 come from, but presume they're generated at some point during checkout/build?

I will implement a workaround to fix my SwiftAA dependency at v2.3.2, but I would prefer to use v2.4 and newer if possible at some point in the future. Any help would be appreciated.

@onekiloparsec
Copy link
Owner

Hm, that's very strange. It looks like some kind of cache. Indeed, there is no reference to aaplus-2.08 in the code itself. The swift package manager provide some commands like swift package purge-clean or swift package reset . Maybe that's worth trying (I don't have much experience with it).

@sepw
Copy link
Author

sepw commented Feb 12, 2023

@onekiloparsec Many thanks for the suggestions.

I tried resetting the package caches using both the command line and Xcode (using File > Packages > Reset Package Caches) but I got the same errors after cleaning the build folder and rebuilding.

So I followed the instructions from this Stack Overflow article and completely deleted the SPM cache and configuration folders (having first closed Xcode):

rm -rf ~/Library/Caches/org.swift.swiftpm
rm -rf ~/Library/org.swift.swiftpm

I then re-opened my project in Xcode, reset the project's package caches (File > Packages > Reset Package Caches), cleaned the build folder and rebuilt. At this point SwiftAA finally built correctly.

I hope this information helps anyone else with this issue.

@sepw sepw closed this as completed Feb 13, 2023
@sepw sepw reopened this Feb 13, 2023
@sepw
Copy link
Author

sepw commented Feb 13, 2023

I reopened my project today, made some changes and suddenly started receiving the same build errors, despite the project building fine the day before. Very strange.

I have reverting to 2.3.2 as a workaround.

@onekiloparsec
Copy link
Owner

That's really weird!

@tobiasleissner
Copy link

I reopened my project today, made some changes and suddenly started receiving the same build errors, despite the project building fine the day before. Very strange.

I have reverting to 2.3.2 as a workaround.

Try to download the whole package, unzip it to a folder nearby and reference to the package as a local package (instead of using Swift Package Manager and the GitHub URL).
Will it compile then?

@onekiloparsec
Copy link
Owner

No news or new info, over here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants