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

WIP: Update openssl and ffmpeg version to fix build issues #562

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

Zen-CODE
Copy link
Member

This updates the openssl and ffmpeg recipes, mainly the fix the outdated entry point used by the current ffmpeg recipe.

Relates to this PR: #552

Informed by this patch: https://www.github.com/kivy/python-for-android/tree/develop/pythonforandroid%2Frecipes%2Fffmpeg%2Fpatches%2Fconfigure.patch

@Zen-CODE
Copy link
Member Author

I can confirm this works and builds successfully with Mac Catalina + XCode 11.2.1.

[DEBUG   ] New State: ffmpeg.install at 2020-10-31 11:34:39.107634
[DEBUG   ] New State: ffmpeg.build_all at 2020-10-31 11:34:39.110386

@Zen-CODE Zen-CODE changed the title WIP: Update openssl and ffmpeg version to fix build issues Update openssl and ffmpeg version to fix build issues Oct 31, 2020
@Zen-CODE
Copy link
Member Author

Zen-CODE commented Nov 1, 2020

Trying to run the app, it generates the following error.

Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      _getstr8 in libavformat.a(mpegts.o)
      _avcodec_decode_subtitle2 in libavcodec.a(decode.o)
     (maybe you meant: _SDL_iconv, _SDL_iconv_open , _SDL_iconv_string , _SDL_iconv_close )
  "_iconv_close", referenced from:
      _getstr8 in libavformat.a(mpegts.o)
      _avcodec_decode_subtitle2 in libavcodec.a(decode.o)
      _avcodec_open2 in libavcodec.a(utils.o)
     (maybe you meant: _SDL_iconv_close)
  "_iconv_open", referenced from:
      _getstr8 in libavformat.a(mpegts.o)
      _avcodec_decode_subtitle2 in libavcodec.a(decode.o)
      _avcodec_open2 in libavcodec.a(utils.o)
     (maybe you meant: _SDL_iconv_open)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Zen-CODE
Copy link
Member Author

Zen-CODE commented Nov 1, 2020

Version n3.4.8 - ERROR: openssl not found
Version n2.6.3 / n2.8.17 - STDOUT: Unknown option "--disable-x86asm".
Version n4.3.1 - Builds but running fails with:

Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      _avcodec_decode_subtitle2 in libavcodec.a(decode.o)
      _getstr8 in libavformat.a(mpegts.o)
     (maybe you meant: _SDL_iconv_open, _SDL_iconv , _SDL_iconv_string , _SDL_iconv_close )
  "_iconv_close", referenced from:
      _avcodec_decode_subtitle2 in libavcodec.a(decode.o)
      _avcodec_open2 in libavcodec.a(utils.o)
      _getstr8 in libavformat.a(mpegts.o)
     (maybe you meant: _SDL_iconv_close)
  "_iconv_open", referenced from:
      _avcodec_decode_subtitle2 in libavcodec.a(decode.o)
      _avcodec_open2 in libavcodec.a(utils.o)
      _getstr8 in libavformat.a(mpegts.o)
     (maybe you meant: _SDL_iconv_open)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Zen-CODE Zen-CODE changed the title Update openssl and ffmpeg version to fix build issues WIP: Update openssl and ffmpeg version to fix build issues Nov 1, 2020
@Cheaterman
Copy link
Contributor

Cheaterman commented Nov 1, 2020

@Zen-CODE sorry I never mentioned this - when I was fighting with Xcode 12, and I went back to Xcode 11 to get things working, I had to add "libiconv.tbd" (or something like that) to the list of "Frameworks" in the Xcode project - I did it in the GUI but I assume some automagic fix could be made in the Xcode project file?

EDIT: FWIW it works in the simulator, but I didn't have the opportunity to test on real device yet (or rather it crashes but I don't have logs so I don't know why).

@misl6
Copy link
Member

misl6 commented Dec 8, 2020

@Zen-CODE I have an upcoming PR to get this one working on Xcode 12.2 + a demo app, meanwhile can you please upgrade also hostopenssl to 1.1.1g?

@misl6 misl6 linked an issue Dec 8, 2020 that may be closed by this pull request
@Zen-CODE
Copy link
Member Author

Zen-CODE commented Dec 8, 2020

You don't want to do that as part of this PR? Is there a reason for that?

@misl6
Copy link
Member

misl6 commented Dec 8, 2020

You don't want to do that as part of this PR? Is there a reason for that?

For the hostopenssl upgrade part it absolutely makes sense to have that in this PR.�

The fixes that I made on the other upcoming PR are quite unrelated but at the same time also fixes an issue that was triggered while testing this PR, so I prefer to hold it separate for future maintenance.

@Zen-CODE
Copy link
Member Author

Zen-CODE commented Dec 8, 2020

Sure, makes sense. I'll prep and test that shortly...

@Zen-CODE
Copy link
Member Author

Zen-CODE commented Dec 8, 2020

@misl6 Merged those changes so you are unblocked asap. Let's hope it works 👍

@misl6
Copy link
Member

misl6 commented Dec 8, 2020

@Zen-CODE

With all the recent changes + #571 you should be able to run on both Simulator and real device a videoplayer demo app that uses ffmpeg4.3.1 + openssl1.1.1g on top of Xcode 12.2

Just for reference, I created a simple demo app for demonstrating / testing it.
https://gist.github.com/misl6/a6752029e6589c1e4f5a0d9ab4529907

I'm able to run it on Simulator + a real device with the latest iOS version.

@Zen-CODE
Copy link
Member Author

Zen-CODE commented Dec 9, 2020

It still gives an "OpenSSL not found" when building with the existing ffmpeg (Testing on XCode 12.1 first). Please could you change the version in the ffmpeg recipe to "n4.3.1" to fix that in this PR?

@dotrichard
Copy link

dotrichard commented Dec 9, 2020

Thanks for creating an app to test with, but I can't get it running for love or money. It builds, but gives me the attached permissions error when I try to run. Lots of googling + experiment get me nowhere...Building touchtracer works fine though, and it does build so it's still an improvement as the older ffmpeg does not! And I can't see that these changes would cause this.

Screenshot 2020-12-09 at 21 51 19

Copy link

@dotrichard dotrichard left a comment

Choose a reason for hiding this comment

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

Can confirm it fixes the build issues Xcode 11.2.1/Catalina

@Zen-CODE Zen-CODE merged commit e3d840b into master Dec 9, 2020
@Zen-CODE Zen-CODE deleted the fix/ffmpg branch December 9, 2020 20:31
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.

"ERROR: openssl not found" when trying to build ffmpeg or ffpyplayer
4 participants