FYI, Xcode 10 caveat.


Alex Zavatone
 

In our iOS project, we have 15 Cococpods. 

Xcode 10 errors out on a build by creating a 383 KB export command prior to building where it adds a bunch of build flags repeatedly to the export, trying to add all of the flags for all of the cocoapods used into one line.

Of course this doesn’t happen in 9.4.1.  No idea what might be causing this, but it’s an export command and I’m seeing duplicate build flags, some repeated up to 12 times.  

Fun times.

There is clearly something wrong here in the creation of the build tasks within Xcode 10.  I have line feed formatted the export command and there are multiple cases of up to 4095 duplicates of individual parameters.  Enclosed document: Formatted Xcode 10 export output error.txt
64 cases: -Xcc -DDEBUG=1
4095 cases of: -Xcc -DPB_FIELD_32BIT=1
4095 cases of: -Xcc -DPB_NO_PACKED_STRUCTS=1
4095 cases of: -Xcc -DCOCOAPODS=1
4095 cases of: -Xcc -DPB_FIELD_32BIT=1

FIY, this is what happens at the start of the CompileSwiftSources phase.

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: XXXXXXX)
    cd /Users/azavatone/Developer-Test/YYYYYYYY
    export DEVELOPER_DIR=/Users/azavatone/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
    /Users/azavatone/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name XXXXXXX -Onone -enable-batch-mode -enforce-exclusivity=checked -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -sdk /Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -target x86_64-apple-ios9.0-simulator -g -module-cache-path /Users/azavatone/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -index-store-path…
 
Line feed formatted for your listening pleasure.
 
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: XXXXXXX)
    cd /Users/azavatone/Developer-Test/YYYYYYYY
    export DEVELOPER_DIR=/Users/azavatone/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
    /Users/azavatone/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
-incremental
-module-name XXXXXXX
-Onone
-enable-batch-mode
-enforce-exclusivity=checked
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-sdk /Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
-target x86_64-apple-ios9.0-simulator
-g
-module-cache-path /Users/azavatone/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
-Xfrontend
-serialize-debugging-options
-profile-coverage-mapping
-profile-generate
-enable-testing
-index-store-path…
 
And later on in the export…

300 KB of this…

-Xcc -DDEBUG=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1


-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1

Fun times indeed.

Alex Zavatone


Dave Fernandes
 

I haven’t been following this full thread, and not sure if it will help, but there is an option to use Legacy Build System under File > Project Settings. Might be worth trying.

On Sep 21, 2018, at 3:12 PM, Alex Zavatone via Groups.Io <zav@...> wrote:

In our iOS project, we have 15 Cococpods. 

Xcode 10 errors out on a build by creating a 383 KB export command prior to building where it adds a bunch of build flags repeatedly to the export, trying to add all of the flags for all of the cocoapods used into one line.

Of course this doesn’t happen in 9.4.1.  No idea what might be causing this, but it’s an export command and I’m seeing duplicate build flags, some repeated up to 12 times.  

Fun times.

There is clearly something wrong here in the creation of the build tasks within Xcode 10.  I have line feed formatted the export command and there are multiple cases of up to 4095 duplicates of individual parameters.  Enclosed document: Formatted Xcode 10 export output error.txt
64 cases: -Xcc -DDEBUG=1
4095 cases of: -Xcc -DPB_FIELD_32BIT=1
4095 cases of: -Xcc -DPB_NO_PACKED_STRUCTS=1
4095 cases of: -Xcc -DCOCOAPODS=1
4095 cases of: -Xcc -DPB_FIELD_32BIT=1

FIY, this is what happens at the start of the CompileSwiftSources phase.

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: XXXXXXX)
    cd /Users/azavatone/Developer-Test/YYYYYYYY
    export DEVELOPER_DIR=/Users/azavatone/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
    /Users/azavatone/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name XXXXXXX -Onone -enable-batch-mode -enforce-exclusivity=checked -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -sdk /Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -target x86_64-apple-ios9.0-simulator -g -module-cache-path /Users/azavatone/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -index-store-path…
 
Line feed formatted for your listening pleasure.
 
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: XXXXXXX)
    cd /Users/azavatone/Developer-Test/YYYYYYYY
    export DEVELOPER_DIR=/Users/azavatone/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
    /Users/azavatone/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
-incremental
-module-name XXXXXXX
-Onone
-enable-batch-mode
-enforce-exclusivity=checked
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-sdk /Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
-target x86_64-apple-ios9.0-simulator
-g
-module-cache-path /Users/azavatone/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
-Xfrontend
-serialize-debugging-options
-profile-coverage-mapping
-profile-generate
-enable-testing
-index-store-path…
 
And later on in the export…

300 KB of this…

-Xcc -DDEBUG=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1


-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1

Fun times indeed.

Alex Zavatone


Quincey Morris
 

On Sep 21, 2018, at 12:12 , Alex Zavatone via Groups.Io <zav@...> wrote:

Xcode 10 errors out on a build by creating a 383 KB export command prior to building where it adds a bunch of build flags repeatedly to the export, trying to add all of the flags for all of the cocoapods used into one line.

I’m not a user of Cocoapods, but based on what I see in the developer forums every time Xcode is released with an updated Swift compiler, I think existing Cocoapods need to be updated to be compatible with the new compiler. Just rebuilding the project isn’t enough.

This situation may be eased when Swift gets ABI stability and resilience in Swift 5 (or whenever), but for now CocoapodsLand is the Wild, Wild West.

One other thing that may help (other than using the legacy build system as Dave suggested) is to turn off the new batch compilation mode. You can use the older whole-module compilation mode, or the original single-file compilation mode. I think this is mentioned in the release notes.


Alex Zavatone
 

File > Project Settings?  

There is no Project Settings under file.

Ahhh, Workspace Settings.  This gets us past the error.

Thank you, Dave.  


The fact that there are multiple cases of 4095 repeats of several flags being added to an export command tell me that there are some serious problems with the new build system.  I’d like to know what Xcode thinks it is doing at that point, but that’s something that’s up to the team to fix.  

Cheers and thanks to you and Q for the heads up on the additional place to hide project/workspace specifics.  

Radar 44531084

Alex Zavatone

On Sep 21, 2018, at 2:42 PM, Dave Fernandes <dave.fernandes@...> wrote:

I haven’t been following this full thread, and not sure if it will help, but there is an option to use Legacy Build System under File > Project Settings. Might be worth trying.

On Sep 21, 2018, at 3:12 PM, Alex Zavatone via Groups.Io <zav@...> wrote:

In our iOS project, we have 15 Cococpods. 

Xcode 10 errors out on a build by creating a 383 KB export command prior to building where it adds a bunch of build flags repeatedly to the export, trying to add all of the flags for all of the cocoapods used into one line.

Of course this doesn’t happen in 9.4.1.  No idea what might be causing this, but it’s an export command and I’m seeing duplicate build flags, some repeated up to 12 times.  

Fun times.

There is clearly something wrong here in the creation of the build tasks within Xcode 10.  I have line feed formatted the export command and there are multiple cases of up to 4095 duplicates of individual parameters.  Enclosed document: Formatted Xcode 10 export output error.txt
64 cases: -Xcc -DDEBUG=1
4095 cases of: -Xcc -DPB_FIELD_32BIT=1
4095 cases of: -Xcc -DPB_NO_PACKED_STRUCTS=1
4095 cases of: -Xcc -DCOCOAPODS=1
4095 cases of: -Xcc -DPB_FIELD_32BIT=1

FIY, this is what happens at the start of the CompileSwiftSources phase.

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: XXXXXXX)
    cd /Users/azavatone/Developer-Test/YYYYYYYY
    export DEVELOPER_DIR=/Users/azavatone/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
    /Users/azavatone/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name XXXXXXX -Onone -enable-batch-mode -enforce-exclusivity=checked -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -D COCOAPODS -sdk /Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -target x86_64-apple-ios9.0-simulator -g -module-cache-path /Users/azavatone/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -profile-coverage-mapping -profile-generate -enable-testing -index-store-path…
 
Line feed formatted for your listening pleasure.
 
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: XXXXXXX)
    cd /Users/azavatone/Developer-Test/YYYYYYYY
    export DEVELOPER_DIR=/Users/azavatone/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
    /Users/azavatone/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
-incremental
-module-name XXXXXXX
-Onone
-enable-batch-mode
-enforce-exclusivity=checked
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-D COCOAPODS
-sdk /Users/azavatone/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
-target x86_64-apple-ios9.0-simulator
-g
-module-cache-path /Users/azavatone/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
-Xfrontend
-serialize-debugging-options
-profile-coverage-mapping
-profile-generate
-enable-testing
-index-store-path…
 
And later on in the export…

300 KB of this…

-Xcc -DDEBUG=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1


-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DCOCOAPODS=1
-Xcc -DCOCOAPODS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1
-Xcc -DPB_FIELD_32BIT=1
-Xcc -DPB_NO_PACKED_STRUCTS=1

Fun times indeed.

Alex Zavatone