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

an error occurred in building for iOS #4888

Closed
KawhiZhuuu opened this issue Sep 18, 2017 · 9 comments
Closed

an error occurred in building for iOS #4888

KawhiZhuuu opened this issue Sep 18, 2017 · 9 comments

Comments

@KawhiZhuuu
Copy link

mpv version and platform

the last version, 0.27.0-UNKNOWN
I built mpv for iOS(last iOS11) on my mac(Sierra 10.12.6)

Reproduction steps

At first, I configured some environment like:
export PATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/:$PATH"
export SDKPATH="$(xcodebuild -sdk iphoneos -version Path)"
export CFLAGS="-isysroot $SDKPATH -arch arm64 -mios-version-min=9.0.0 -fembed-bitcode"
export LDFLAGS="-isysroot $SDKPATH -arch arm64 -Wl,-ios_version_min,9.0.0 -lbz2"

Then, ./waf configure --disable-cplayer --disable-lcms2 --disable-lua --enable-libmpv-static --enable-ios-gl --enable-gl

Finally, ./waf build ,and error occurred.

Expected behavior

built success and generated static library.

Actual behavior

building failed

Log file

../video/out/opengl/video.c:984:34: warning: suggest braces around initialization of subobject [-Wmissing-braces]
*vimg = (struct video_image){0};
^
{}
../video/out/opengl/video.c:984:34: warning: suggest braces around initialization of subobject [-Wmissing-braces]
*vimg = (struct video_image){0};
^
{}
../video/out/opengl/video.c:1149:28: warning: suggest braces around initialization of subobject [-Wmissing-braces]
struct vertex va[6] = {0};
^
{}
../video/out/opengl/video.c:1149:28: warning: suggest braces around initialization of subobject [-Wmissing-braces]
struct vertex va[6] = {0};
^
{}
../video/out/opengl/video.c:3162:45: warning: suggest braces around initialization of subobject [-Wmissing-braces]
*out = (struct voctrl_performance_data){0};
^
{}
5 warnings generated.

../player/playloop.c:696:19: error: 'system' is unavailable: not available on iOS
(void)system(opts->heartbeat_cmd);
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/include/stdlib.h:195:6: note: 'system' has been explicitly marked unavailable here
int system(const char *) __DARWIN_ALIAS_C(system);
^
1 error generated.

Waf: Leaving directory `/Users/admin-5/mpv_git/mpv/build'
Build failed
-> task in 'mpv' failed with exit status 1 (run with -v to display more information)
qq20170918-182424 2x

@ghost
Copy link

ghost commented Sep 18, 2017

Strange, I'm sure this worked for other people who built it for iOS.

Anyway, can be solved by removing the old heartbeat option, which I will do some time this week I guess.

@ghost ghost closed this as completed in 80e3173 Sep 18, 2017
@ghost
Copy link

ghost commented Sep 18, 2017

Actually did it right now.

@KawhiZhuuu
Copy link
Author

@wm4 it worked!!! Thank you very very much~~~

@KawhiZhuuu
Copy link
Author

@wm4 Would you tell me how can I build other architectures , just like armv7?

@KawhiZhuuu
Copy link
Author

@wm4 emmmm, sadly, I build failed.Is there any possibility that I have generated a wrong or half-baked static library.
qq20170919-115636 2x
Non-fat file: /Users/admin-5/yhtx_ios/Developer/chainebox/ThirdPartyLib/lib/mpv/libmpv.a is architecture: arm64
And I make sure that I have imported libmpv.a into my project.

@skrew
Copy link

skrew commented Oct 14, 2017

@wm4 Just for info, "system" have been deprecated since iOS 8 and removed in xCode 9, that's why it worked before.

@K1NXZ
Copy link

K1NXZ commented Feb 14, 2018

@zSwitch Hey, did you find a solution to this problem? I have the exact same issue.

Undefined symbols for architecture arm64: "_mpv_create", referenced from: -[ViewController viewDidLoad] in ViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

@antonz0319
Copy link

@AngeloWalczak , Did you find a solution?

@K1NXZ
Copy link

K1NXZ commented Jul 31, 2020

@AngeloWalczak , Did you find a solution?

I don't remember, it was 2 years ago. But the project spec changed and we moved on with something else.

This issue was closed.
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

No branches or pull requests

4 participants