tomcat.exe
tomcat.exe

Reputation: 95

Error Compiling LibVLC for Android

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

Upvotes: 0

Views: 575

Answers (1)

TastyCatFood
TastyCatFood

Reputation: 1762

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.

Upvotes: 2

Related Questions