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

Add dependencies on GCDWebServer and PINCache #787

Merged

Conversation

twogood
Copy link
Contributor

@twogood twogood commented Nov 3, 2021

Trying to fix part of #714

To be more exact, try to fix this error message, which sometimes also lists GCDWebServer:

    Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_PINCache", referenced from:
          objc-class-ref in CacheManager.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

@jhomlala
Copy link
Owner

jhomlala commented Nov 7, 2021

@twogood Before merging this PR I need to know when does this problem occur. Can you prepare some reproducible example?

@twogood
Copy link
Contributor Author

twogood commented Nov 7, 2021

You know the old saying:

| The definition of insanity is doing the same thing over and over again and expecting a different result.

The client project that me and my team have inherited and are currently working on failed on compile most of the time before adding these as explicit dependencies. We have spent many hours trying to figure out why. With this patch it works every time.

Linkers are a species of their own. There is even a "classic" book called "Linkers and loaders" for those who want to know more how linkers work.

But I digress. I don't have an isolated example but as the better player code explicitly references these pods they should also be explicit references from the better player pod. It is unwise to depend on transitive dependencies.

@twogood
Copy link
Contributor Author

twogood commented Nov 7, 2021

This article shows a cocoa pods example for specifying the same dependency on different levels in the dependency tree with proper version resolving:

https://link.medium.com/9xXAjB5cZkb

@twogood
Copy link
Contributor Author

twogood commented Nov 7, 2021

Here is an example that (sometimes) fails the same way:

https://github.com/twogood/better_player_pr787

Can happen with "Play" button in XCode, also with flutter build ios or flutter build ipa

image

@twogood
Copy link
Contributor Author

twogood commented Nov 7, 2021

image

@twogood
Copy link
Contributor Author

twogood commented Nov 7, 2021

And sometimes... "Build succeeded"

@ndahlquist
Copy link

For what it's worth, I also experienced this error yesterday (and then it resolved itself after a clean build). Seems like a good idea to explicitly add the transitive dependencies if it can make the build more reliable!

@twogood
Copy link
Contributor Author

twogood commented Nov 9, 2021

Actually they are also direct dependencies in the source code:

image

@aignerjo
Copy link

+1

@twogood's solution works.

@ndahlquist
Copy link

I added this patch too! No more linker errors :)

@garlicPasta
Copy link

It also fixed the error for me when building for a real device 👍
Simulator was not having this error.

@windows7lake
Copy link

It’s help

@jhomlala jhomlala changed the base branch from master to feature/december_2021_changes December 29, 2021 08:44
@jhomlala
Copy link
Owner

LGTM, thanks.

@jhomlala jhomlala merged commit 0608143 into jhomlala:feature/december_2021_changes Dec 29, 2021
jhomlala added a commit that referenced this pull request Dec 29, 2021
* Updated dependencies

* Fix bug where a render error can occur if the width of the player is less than 240 pixels. (#810)

* Updated changelog

* Switch from jcenter to mavenCentral (#798)

* Updated changelog

* Fixed badState error (#796)

* Add dependencies on GCDWebServer and PINCache (#787)

Trying to fix part of #714

* Updated changelog

* Lint & format changes

* Updated installation documentation page

* Updated installation documentation page

* Updated installation documentation page

Co-authored-by: Alan <adman1108@gmail.com>
Co-authored-by: Peter Majchrak <pm@lix.com>
Co-authored-by: masoudk2000 <52602761+masoudk2000@users.noreply.github.com>
Co-authored-by: David Eriksson <david@activout.se>
jhomlala added a commit that referenced this pull request Dec 29, 2021
* Updated dependencies

* Fix bug where a render error can occur if the width of the player is less than 240 pixels. (#810)

* Updated changelog

* Switch from jcenter to mavenCentral (#798)

* Updated changelog

* Fixed badState error (#796)

* Add dependencies on GCDWebServer and PINCache (#787)

Trying to fix part of #714

* Updated changelog

* Lint & format changes

* Updated installation documentation page

* Updated installation documentation page

* Updated installation documentation page

* Fixed full screen button padding in material controls.

* Added setBetterPlayerControlsConfiguration method

* Added `setOverriddenFit` in `BetterPlayerController`.

* Added `setOverriddenFit` in `BetterPlayerController`.

* General refactor

* Format

Co-authored-by: Alan <adman1108@gmail.com>
Co-authored-by: Peter Majchrak <pm@lix.com>
Co-authored-by: masoudk2000 <52602761+masoudk2000@users.noreply.github.com>
Co-authored-by: David Eriksson <david@activout.se>
geriby23 pushed a commit to threadable/betterplayer that referenced this pull request Jul 16, 2024
* Updated dependencies

* Fix bug where a render error can occur if the width of the player is less than 240 pixels. (jhomlala#810)

* Updated changelog

* Switch from jcenter to mavenCentral (jhomlala#798)

* Updated changelog

* Fixed badState error (jhomlala#796)

* Add dependencies on GCDWebServer and PINCache (jhomlala#787)

Trying to fix part of jhomlala#714

* Updated changelog

* Lint & format changes

* Updated installation documentation page

* Updated installation documentation page

* Updated installation documentation page

Co-authored-by: Alan <adman1108@gmail.com>
Co-authored-by: Peter Majchrak <pm@lix.com>
Co-authored-by: masoudk2000 <52602761+masoudk2000@users.noreply.github.com>
Co-authored-by: David Eriksson <david@activout.se>
geriby23 pushed a commit to threadable/betterplayer that referenced this pull request Jul 16, 2024
* Updated dependencies

* Fix bug where a render error can occur if the width of the player is less than 240 pixels. (jhomlala#810)

* Updated changelog

* Switch from jcenter to mavenCentral (jhomlala#798)

* Updated changelog

* Fixed badState error (jhomlala#796)

* Add dependencies on GCDWebServer and PINCache (jhomlala#787)

Trying to fix part of jhomlala#714

* Updated changelog

* Lint & format changes

* Updated installation documentation page

* Updated installation documentation page

* Updated installation documentation page

* Fixed full screen button padding in material controls.

* Added setBetterPlayerControlsConfiguration method

* Added `setOverriddenFit` in `BetterPlayerController`.

* Added `setOverriddenFit` in `BetterPlayerController`.

* General refactor

* Format

Co-authored-by: Alan <adman1108@gmail.com>
Co-authored-by: Peter Majchrak <pm@lix.com>
Co-authored-by: masoudk2000 <52602761+masoudk2000@users.noreply.github.com>
Co-authored-by: David Eriksson <david@activout.se>
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.

6 participants