Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Doesn't build for latest XCode (11.4)
#18
Finally some news on this, though not good ones. Apple gave a rather unhelpful response to my initial bug report:

[Image: 0To2pU2.png]

Needless to say, disabling bitcode does not actually solve anything: the linker still hangs. This is easily reproducible using the test project I sent them, so I think they didn't even test their own advice.

Even in the hypothetical case that setting bitcode = NO did allow the build to finish, then it would be impossible to actually publish anything since bitcode is mandatory when submitting to the store. So back to square one.

Just to test Apple's theory ("it didn't hang, its just that bitcode takes a lot of time to link, try disabling it"), I left it running for about 3 hours with bitcode disabled, hoping it would change anything. After that time the ld process (linker) had consumed about 15,4 Gb of ram so I had to kill it.  But while it was running, I sampled the process to obtain stack traces at different times. These are the last lines of the stack 1 minute after starting ld, and also 3 hours later:

Code:
26 llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level)  (in libLTO.dylib) + 2208  [0x107e82090]
                                           + 20 (anonymous namespace)::DAGCombiner::AddToWorklist(llvm::SDNode*)  (in libLTO.dylib) + 721,1,...  [0x107e811e1,0x107e80f11,...]
                                           + 6 (anonymous namespace)::DAGCombiner::AddToWorklist(llvm::SDNode*)  (in libLTO.dylib) + 221  [0x107e80fed]
                                           +   6 llvm::detail::DenseMapPair<llvm::SDNode*, unsigned int>* llvm::DenseMapBase<llvm::DenseMap<llvm::SDNode*, unsigned int, llvm::DenseMapInfo<llvm::SDNode*>, llvm::detail::DenseMapPair<llvm::SDNode*, unsigned int> >, llvm::SDNode*, unsigned int, llvm::DenseMapInfo<llvm::SDNode*>, llvm::detail::DenseMapPair<llvm::SDNode*, unsigned int> >::InsertIntoBucketImpl<llvm::SDNode*>(llvm::SDNode* const&, llvm::SDNode* const&, llvm::detail::DenseMapPair<llvm::SDNode*, unsigned int>*)  (in libLTO.dylib) + 20,10,...  [0x107e82a44,0x107e82a3a,...]
                                           13 llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level)  (in libLTO.dylib) + 2236  [0x107e820ac]
                                           + 13 (anonymous namespace)::DAGCombiner::AddToWorklist(llvm::SDNode*)  (in libLTO.dylib) + 360,140,...  [0x107e81078,0x107e80f9c,...]
                                           1 llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*, llvm::CodeGenOpt::Level)  (in libLTO.dylib) + 1122  [0x107e81c52]
                                             1 (anonymous namespace)::DAGCombiner::recursivelyDeleteUnusedNodes(llvm::SDNode*)  (in libLTO.dylib) + 4  [0x107e83284]

So it seems it is forever stuck in a recursive traversal of a dependency DAG (directed acrylic graph) of some sort. 100% sure this is a bug in Xcode now. Exact same lib code compiles and links fine in Eclipse, Visual Studio (MSVCPP), Code::Blocks (MinGW), and all previous Xcode versions.

I've answered to them, with this additional info. Will keep you informed.
Reply


Messages In This Thread
RE: Doesn't build for latest XCode (11.4) - by josemendez - 11-04-2020, 12:20 PM