Error Compiling LibVLC for Android

让人想犯罪 __ 提交于 2019-12-12 05:23:58

问题


i tried to compile LibVLC for android on ubuntu 16.04 and got the follwing error:

priv.c:122: error: undefined reference to 'hw_get_module'

clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [private_libs/obj/local/armeabi-v7a/libanw.10.so] Error 1

Have latest vlc - android from git and android sdk 23, android ndk 13.

My first attempt was to add APP_STL := stlport_static to the Application.mk but this didnt fix the problem.

Please, can someone help?

Kind regards


回答1:


Leaving some tips for people going through the same hell(I compile on ubuntu 16.04):

  1. Make sure you have dependencies and everything is up to date.
    It's superbly annoying but missing dependencies surface as a totally irrelevant error.

    sudo apt-get install automake ant autopoint cmake build-essential libtool patch pkg-config protobuf-compiler ragel subversion unzip git openjdk-8-jre openjdk-8-jdk 
    sudo apt-get upgrade ant autoconf automake autopoint cmake gawk gcc g++ libtool m4 patch pkg-config libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler ragel subversion unzip
    

    protobuf and gettext are not in the above since you can't install the latest versions via apt, so you should download and compile them.

  2. Delete contrib folders if it fails to compile for some reason
    Sadly compile.sh is far from perfect and assumes sub modules are built fine as long as folders are there.
  3. Failing to download gradle zip file once causes the script to download the file in endless loop
    The script does not overwrite the zip file it first downloaded, so once it fails and unless you manually remove it, the script looks only at that failed zip download and exits.
  4. compile.sh fails
    Re-run the script until the same error appears.


来源:https://stackoverflow.com/questions/40437692/error-compiling-libvlc-for-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!