vlc-android building contribs problem

*nix specific usage questions
bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

vlc-android building contribs problem

Postby bero7 » 18 Oct 2011 15:06

Hello,

I'm having problems building the contribs for vlc for android.
I followed the procedure
1. install sdk
2. unpack ndk
3. install eclipse and ADT
4. get source from git

..and the thing breaks at building contribs, specifically libz.
cp libz.a /home/.... - that goes ok but then
cp /home/....
cp: missing destination file operand after '/home...'

It's trying to copy nothing to my project folder. I don't know what it is actually and why is it not building.

Anyone had a similar problem or has some clue about this?
I'm using Fedora.

Thanks!


P.S. I have installed wget ,autotools, libtool, cmake, subversion.

bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

Re: vlc-android building contribs problem

Postby bero7 » 18 Oct 2011 16:38

hm, ok... "make clean" seems to have done the trick for this but, now a new problem :(

error while building faad2 lib

Code: Select all

configure.in:14: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.
Any ideas, please? Thanks for the help

Diamanter
New Cone
New Cone
Posts: 6
Joined: 19 Oct 2011 08:49

Re: vlc-android building contribs problem

Postby Diamanter » 19 Oct 2011 09:07

Do you have libtool installed on your system?

bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

Re: vlc-android building contribs problem

Postby bero7 » 19 Oct 2011 10:23

Yes, I have all the tools. Libtool, autoconf, automake, cmake, wget, subversion, pkgconfig, gettext......

That's why I don't understand..the error's like there would be no libtool but it was even used previously for other libs..

bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

Re: vlc-android building contribs problem

Postby bero7 » 19 Oct 2011 11:43

btw, I googled out the exact same output I get, here:

http://pastebin.com/3M24DVhK

but no solution...Anyone ?

Diamanter
New Cone
New Cone
Posts: 6
Joined: 19 Oct 2011 08:49

Re: vlc-android building contribs problem

Postby Diamanter » 19 Oct 2011 11:50

I had this problem and solved it by installing libtool.

bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

Re: vlc-android building contribs problem

Postby bero7 » 19 Oct 2011 16:13

autoreconf --verbose --install solved the faad2 problem..

I managed to get to the part where configure.sh is run

Code: Select all

extras/package/android/configure.sh
BUT

a new error (of course) and no clue on this one.

Code: Select all

checking media/stagefright/OMXClient.h usability... no checking media/stagefright/OMXClient.h presence... no checking for media/stagefright/OMXClient.h... no configure: error: "Could not find IOMX headers"
where are these headers supposed to be?


EDIT:

If I specify --disable-iomx (which I'm not sure is smart but just to get going) then configure finishes BUT it doesn't compile.. :/

Code: Select all

../../extras/package/android/../../../src/posix/thread.c: In function 'vlc_set_priority': ../../extras/package/android/../../../src/posix/thread.c:833: warning: unused parameter 'th' ../../extras/package/android/../../../src/posix/thread.c: In function 'vlc_cancel': ../../extras/package/android/../../../src/posix/thread.c:866: error: implicit declaration of function 'pthread_cancel' ../../extras/package/android/../../../src/posix/thread.c: In function 'vlc_savecancel': ../../extras/package/android/../../../src/posix/thread.c:883: error: implicit declaration of function 'pthread_setcancelstate' ../../extras/package/android/../../../src/posix/thread.c:883: error: 'PTHREAD_CANCEL_DISABLE' undeclared (first use in this function) ../../extras/package/android/../../../src/posix/thread.c:883: error: (Each undeclared identifier is reported only once ../../extras/package/android/../../../src/posix/thread.c:883: error: for each function it appears in.) ../../extras/package/android/../../../src/posix/thread.c: In function 'vlc_restorecancel': ../../extras/package/android/../../../src/posix/thread.c:903: error: 'PTHREAD_CANCEL_DISABLE' undeclared (first use in this function) ../../extras/package/android/../../../src/posix/thread.c: In function 'vlc_testcancel': ../../extras/package/android/../../../src/posix/thread.c:920: error: implicit declaration of function 'pthread_testcancel' ../../extras/package/android/../../../src/posix/thread.c:1223:5: warning: #warning "vlc_GetCPUCount is not implemented for your platform" make[4]: *** [posix/thread.lo] Error 1
so, now if anyone can help here I'd be grateful. Thanks

bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

Re: vlc-android building contribs problem

Postby bero7 » 21 Oct 2011 14:34

Ok, android's Bionic C library comes with its own pthread implementation bundled in.
It does not support pthread_cancel or similar...

But ok, I still don't know how to get around this issue.
So vlc is trying to build thread.c from vlc/src/posix and it's relying on pthread.h which is in android-ndk, which of course does not have the needed definitions.


Did anyone here building vlc for android have these issues? Any advice on this? Thanks!

billbylake
New Cone
New Cone
Posts: 5
Joined: 18 Aug 2011 22:07
Operating System: Linux
Location: Finland Salo

Re: vlc-android building contribs problem

Postby billbylake » 21 Oct 2011 21:57

Wondering if you were trying to manually execute step by step according to the install.sh?
I got exactly the same problem - after one failure and tried to continue to compile on a new terminal - by omitting the pre evious successful step according install.sh. My problem was I forgot to export 2 env variable in the new terminal:

export ANDROID_SYS_HEADERS=${PWD}/android-headers
export ANDROID_LIBS=${PWD}/android-libs

after I export them then I can pass this step but I still got JNI compilation error:
=== Building libvlcjni with neon ===
make[1]: Entering directory `/home/zbgh/android/android/vlc-android'
Compile thumb : vlcjni <= libvlcjni.c
Compile thumb : vlcjni <= aout.c
Compile thumb : vlcjni <= thumbnailer.c
SharedLibrary : libvlcjni.so
../vlc/android/modules/audio_filter/.libs/libspeex_resampler_plugin.a(libspeex_resampler_plugin_la-speex.o): In function `Close':
speex.c:(.text+0x2a0): undefined reference to `speex_resampler_destroy'
../vlc/android/modules/audio_filter/.libs/libspeex_resampler_plugin.a(libspeex_resampler_plugin_la-speex.o): In function `Open':
speex.c:(.text+0x418): undefined reference to `speex_resampler_init'
speex.c:(.text+0x420): undefined reference to `speex_resampler_strerror'
../vlc/android/modules/audio_filter/.libs/libspeex_resampler_plugin.a(libspeex_resampler_plugin_la-speex.o): In function `Resample':
speex.c:(.text+0x5fc): undefined reference to `speex_resampler_set_rate'
speex.c:(.text+0x600): undefined reference to `speex_resampler_process_interleaved_int'
speex.c:(.text+0x608): undefined reference to `speex_resampler_process_interleaved_float'
speex.c:(.text+0x618): undefined reference to `speex_resampler_strerror'
collect2: ld returned 1 exit status
make[1]: *** [/home/zbgh/android/android/vlc-android/obj/local/armeabi/libvlcjni.so] Error 1
make[1]: Leaving directory `/home/zbgh/android/android/vlc-android'
make: *** [vlc-android/libs/armeabi/libvlcjni.so] Error 2

still having the headache...

Rémi Denis-Courmont
Developer
Developer
Posts: 15248
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc-android building contribs problem

Postby Rémi Denis-Courmont » 21 Oct 2011 22:28

Android Bionic does not come with POSIX threads. It provides an insufficient subset (for VLC, but evidently not for the Dalvik VM) of POSIX threads.

A new VLC threading backend dedicated for Android would be required, which has yet to be written. In the mean time, there is only a an ugly brittle patch that [imostly[/i] works floating around. It should already be in the vlc-android git tree.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

billbylake
New Cone
New Cone
Posts: 5
Joined: 18 Aug 2011 22:07
Operating System: Linux
Location: Finland Salo

Re: vlc-android building contribs problem

Postby billbylake » 22 Oct 2011 07:09

Thanks for the prompt response!
There are currently two git trees for vlc android:
git://git.videolan.org/vlc-ports/android.git
and
git://git.videolan.org/vlc/vlc-android.git
I am using the 1st one. You say that the workaround is in the vlc-android git tree, so i suppose you mean the 2nd one?
I am going to try it...

Rémi Denis-Courmont
Developer
Developer
Posts: 15248
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc-android building contribs problem

Postby Rémi Denis-Courmont » 22 Oct 2011 12:57

It should be in both. I know neither of them.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

billbylake
New Cone
New Cone
Posts: 5
Joined: 18 Aug 2011 22:07
Operating System: Linux
Location: Finland Salo

Re: vlc-android building contribs problem

Postby billbylake » 23 Oct 2011 12:31

Tried with latest git, still fails at the same place...
So the ugly patch doesn't seem to work for me, or, how can i make sure if that patch has applied or not?
Another thing i can do is that since speex is causing the problem and it is only an audio coding, so i suppose i can exclude it from the build, but how? There is a "enable-speex" in the configure file. shall i just remove it from there?

bero7
Blank Cone
Blank Cone
Posts: 25
Joined: 11 May 2011 16:06

Re: vlc-android building contribs problem

Postby bero7 » 24 Oct 2011 13:39

billbylake, thanks soo much for the heads up! Indeed, exporting ANDROID_LIBS and HEADERS was in the script but it wasn't executed for some reason :roll:
I was also trying to build step by step , but never started from the first step actually cause I thought everything up to "make" completed successfully.

P.S. try --disable-speex

cheers

billbylake
New Cone
New Cone
Posts: 5
Joined: 18 Aug 2011 22:07
Operating System: Linux
Location: Finland Salo

Re: vlc-android building contribs problem

Postby billbylake » 29 Oct 2011 23:54

bero7, after --disable-speex, plus a bug fix on vlc-network.h I finally got vlc compiled. Thanks!
But the build with default configuration does not seem to include many things in so it does not play a .mp4 file
LogCat says: No access module matching the "file" could be loaded.
Mmm... I need to enable something still...


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests