Skip to content

Conversation

@grigorye
Copy link
Contributor

@grigorye grigorye commented Aug 2, 2023

This should address the workaround for fat binaries stored instead of thinned build products, on CreateUniversalBinary step producing fat binary with duplicate symbols in certain scenarios.

Basically there are two bugs in calculation of libtool inputs, that in turn affect calculation of TARGET_TEMP_DIR, that in turn affects missing the cache in CreateUniversalBinary, that in turn breaks the workaround, making the "default" libtool merging two fat binaries (vs thin ones expected by default/generated without the cache), that results in duplicate symbols error on attempt to link with the result of the merge.

Leaving aside handling of -static, I'm not 100% sure, but I feel like any scenario that involves redirection from libtool to CreateUniversalBinary that is affected by 5741297, making xclibtool "always miss the cache" - so probably it's worth fixing it in general. Btw, I notice that ProcessInfo().arguments is probably misinterpreted (making executable name treated as an input) at least for lipo as well (I'm not sure about the effect though) - probably it's worth checking it in other places as well.

Copy link
Collaborator

@polac24 polac24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks. Indeed, feeding the inputLibraries is too liberal and probably we should find a better way for identifying valid archive/binary.

This change is a temp workaround, we can apply a valid fix in a follow-up PR.

@polac24 polac24 merged commit ed25623 into spotify:master Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants