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

swift build fixes #5516

Merged
merged 3 commits into from Feb 12, 2018
Merged

swift build fixes #5516

merged 3 commits into from Feb 12, 2018

Conversation

Akemi
Copy link
Member

@Akemi Akemi commented Feb 12, 2018

No description provided.

configure failed because of a wrong check. fix the check and also only
check for swift on macOS.
python3 returns bytes instead of str, unlike python2. explicitly decode
the output.
the swift version string on major versions only has two components,
major and minor, the third one is missing.
@kevmitch kevmitch merged commit 8762818 into mpv-player:master Feb 12, 2018
@Hamuko
Copy link

Hamuko commented Feb 13, 2018

Have you tested building with --enable-libmpv-shared? I tried updating mpv through Homebrew yesterday and ran into issues when Homebrew tried to compile mpv.

[416/419] Linking build/libmpv.dylib
[417/419] Linking build/mpv
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$__TtC11macOS_swift7CocoaCB", referenced from:
      objc-class-ref in macosx_application.m.26.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Waf: Leaving directory `/private/tmp/mpv-20180213-10122-1pg8azd/build'
Build failed

I then grabbed the git master onto my machine and compiled it with no options. Worked fine. Got a build, watched some videos with it fine (as long as I used --vo=opengl-cb).

Then I tried tacking on some options to the configuration phase from the Homebrew formula. Running python3 waf distclean && python3 waf configure --enable-libmpv-shared && python3 waf resulted in the same issue as when Homebrew tried to build mpv. As far as I could tell, c82fed8 is the first commit that resulted in the same error.

[415/417] Linking build/mpv
[416/417] Linking build/libmpv.dylib
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$__TtC11macOS_swift7CocoaCB", referenced from:
      objc-class-ref in macosx_application.m.26.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

git bisect fingered 235eb60 as the absolute first bad commit when I ran git bisect run sh -c "python3 waf distclean && python3 waf configure --enable-libmpv-shared && python3 waf", but there the build fails when it can't find ffmpeg.

Tested on a Hackintosh with 10.13.2 and on a late 2016 MacBook Pro with 10.13.3. Both hated using --enable-libmpv-shared but compiled without it.

@Akemi
Copy link
Member Author

Akemi commented Feb 13, 2018

#4833 (comment)
#4833 (comment)
yeah i am aware of those issues.

@Akemi
Copy link
Member Author

Akemi commented Feb 13, 2018

i will try to fix them shortly. probably after dinner since i just came home.

i wasn't yet able to reproduce the ffmpeg linking issue, but @AirPort fixed them by disabling libsoxr and libtheora in ffmpeg.

@Akemi
Copy link
Member Author

Akemi commented Feb 13, 2018

i fixed the linking error with libmpv with the second commit on #5517. would be nice if you could confirm this issue fixed. also it would be nice if any other issue persist that a new issue is opened, otherwise i might lose the overview of the various issues i caused with this.

@Hamuko
Copy link

Hamuko commented Feb 13, 2018

Yeah, builds just fine now. Enabled all of the options that the Homebrew formula enables and got a working build out of it.

@Akemi
Copy link
Member Author

Akemi commented Feb 13, 2018

great.

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.

None yet

3 participants