Page 1 of 1

Building VLC-Android under OSX

Posted: 04 Jul 2015 04:13
by Entropeace
Hi,

I just want to see if there has been any success building VLC Android so far.

I had to make a dozen patches to the code (from <inttypes> inconsistencies to OpenGL not being loaded), but I still can get around it (now I'm stuck trying to figure out why libarchive doesn't get picked up by the linker).

Just making sure if my C skills are rustier than expected, or I should try on Ubuntu.

Thanks.

EDIT: Here is and extract of the latest build error I'm getting:

Code: Select all

../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_filter_lzma' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_filter_lzop' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_filter_none' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_filter_rpm' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_filter_uu' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_filter_xz' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_format_ar' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_format_cab' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_format_cpio' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_format_gnutar' ../../modules/access/archive/archive.c:109: error: undefined reference to 'archive_read_support_format_lha' .... ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glVertexPointer' ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glEnableClientState' ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glDisableClientState' ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glScalef' ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glColor4f' ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glNormalPointer' ../../modules/visualization/glspectrum.c:362: error: undefined reference to 'glPopMatrix' collect2: error: ld returned 1 exit status make: *** [jni/obj/local/armeabi/libvlcjni.so] Error 1 make: Leaving directory `/Users/zakelfassi/Desktop/VLC-A-1.4.1/libvlc' ndk-build failed

Re: Building VLC-Android under OSX

Posted: 10 Jul 2015 11:54
by Jean-Baptiste Kempf
You are missing some -l flags in the ANdroid.mk file.

Re: Building VLC-Android under OSX

Posted: 18 Jul 2015 04:27
by Entropeace
Well spotted! Had to add both -larchive and -lGLESv1_CM (and change <GL/gl.h> to <GLES/gl.h> in glspectrum.c).
Now I'm having a declaration conflict between libzip and libaccess:

Code: Select all

arm-linux-androideabi/bin/ld: error: VLC/.modules/build-android-arm-linux-androideabi/libzip_plugin.a(libzip_plugin_la-zipstream.o): multiple definition of 'StreamOpen' arm-linux-androideabi/bin/ld: VLC/.modules/build-android-arm-linux-androideabi/libaccess_archive_plugin.a(libaccess_archive_plugin_la-stream.o): previous definition here arm-linux-androideabi/bin/ld: error: VLC/.modules/build-android-arm-linux-androideabi/libzip_plugin.a(libzip_plugin_la-zipstream.o): multiple definition of 'StreamClose' arm-linux-androideabi/bin/ld: VLC/.modules/build-android-arm-linux-androideabi/libaccess_archive_plugin.a(libaccess_archive_plugin_la-stream.o): previous definition here
My question is, would building on Linux be much smoother than this?

Re: Building VLC-Android under OSX

Posted: 18 Jul 2015 20:02
by Jean-Baptiste Kempf
yes, it would.

Do you have objcopy on your OS X?

Re: Building VLC-Android under OSX

Posted: 07 Sep 2015 18:52
by Entropeace
Yes... But it turned out building on OSX isn't just hard, but would compromise most of the core code.
I just started fresh on a Ubuntu VM.
Thanks JB!