Help with android build

Topics regarding RTMPDump.
divingmule
Posts: 3
Joined: Tue Feb 05, 2013 5:00 pm

Help with android build

Postby divingmule » Tue Feb 05, 2013 5:31 pm

Hi, I've successfully built both S74ck3r/rtmpdump and svnpenn/rtmpdump static version via stream recorder instructions -> http://stream-recorder.com/forum/showpo ... stcount=31

What I'm after is the shared libs (librtmp) from svnpenn/rtmpdump but make fails with 'SHARED=' -

Code: Select all

make[1]: Entering directory `/c/Users/divingmule/Documents/GitHub/rtmpdump/librtmp'
arm-linux-androideabi-gcc   -o librtmp rtmp.o log.o amf.o hashswf.o parseurl.o  -lpolarssl -lz
c:/mingw/msys/1.0/my-android-toolchain/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: c:/mingw/msys/1.0/my-android-toolchain/bin/../sysroot/usr/lib/crtbegin_dynamic.o: in function _start:crtbrand.c(.text+0x78): error: undefined reference to 'main'
collect2: ld returned 1 exit status
make[1]: *** [librtmp] Error 1
make[1]: Leaving directory `/c/Users/divingmule/Documents/GitHub/rtmpdump/librtmp'
make: *** [librtmp/librtmp.a] Error 2


Any help is appreciated!

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: Help with android build

Postby svnpenn » Tue Feb 05, 2013 5:51 pm

divingmule wrote:Hi, I've successfully built both S74ck3r/rtmpdump and svnpenn/rtmpdump static version via stream recorder instructions -> http://stream-recorder.com/forum/showpo ... stcount=31
What I'm after is the shared libs (librtmp) from svnpenn/rtmpdump but make fails with 'SHARED=' -


If you want shared library, then you must leave off the SHARED=

divingmule
Posts: 3
Joined: Tue Feb 05, 2013 5:00 pm

Re: Help with android build

Postby divingmule » Tue Feb 05, 2013 10:10 pm

I'm sorry. That should have read "make fails without "SHARED='"

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: Help with android build

Postby svnpenn » Tue Feb 05, 2013 10:31 pm

divingmule wrote:I'm sorry. That should have read "make fails without "SHARED='"


Try to build with official master and post your findings.

divingmule
Posts: 3
Joined: Tue Feb 05, 2013 5:00 pm

Re: Help with android build

Postby divingmule » Tue Feb 05, 2013 11:48 pm

Same as above with the official master, successful with static, fails with the same error if 'SHARED=' is not used.

I can successfully compile S74ck3r/rtmpdump with the shared libs but, it seems that the source doesn't have the same updates/patches. I'm particularly looking for support for the -jtv option in librtmp.

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: Help with android build

Postby svnpenn » Wed Feb 06, 2013 7:50 am

divingmule wrote:Same as above with the official master, successful with static, fails with the same error if 'SHARED=' is not used.
I can successfully compile S74ck3r/rtmpdump with the shared libs but, it seems that the source doesn't have the same updates/patches. I'm particularly looking for support for the -jtv option in librtmp.


Sadly I have no interest in downloading the 312 MB Android NDK. Perhaps "S74ck3r" could shed some light on your issues.

S74ck3r
Posts: 21
Joined: Fri Feb 01, 2013 8:31 am

Re: Help with android build

Postby S74ck3r » Wed Feb 06, 2013 8:50 am

I'll admit C really isn't my thing so I'm not sure what's wrong. There are a couple of things I can think of, the first being that I'm using version r7 of the NDK and GCC compiler version 4.4.3 whereas you appear to be using GCC 4.6.

Also I had to make a couple of minor changes to the build. I needed to add -lm to the build command using the XLIBS flag as the maths library wasn't linked automatically. Also I needed to change the path to wait.h in parseurl.c from <wait.h> to <sys/wait.h>.

These could just be to do with my setup though.

I can tell you that it does build ok though and there are binaries here https://bitbucket.org/S74ck3r/rtmpdump- ... /downloads

If you're just after the binaries with librtmp.so.0 then grab the archive with svnpenn shared in the filename.
If you want the librtmp.a and other build artefacts so you can link against them in your own project then grab the archive titled local.7z.

hope that helps.
Richard

RedPenguin
Posts: 20
Joined: Mon Mar 25, 2013 5:25 am

Re: Help with android build

Postby RedPenguin » Tue Mar 26, 2013 4:38 am

Maybe S74ck3r or someone else can help me on this one. I have a weird thing going on.

I am attempting to cross-compile using Cygwin + Android NDK on Win 8, very similar to how I did for iOS and others.

Anyway, my buddy's Nexus 7 is running with XBMC experimental for hardware acceleration.

Everything is working fine out of the box except the common thing that the librtmp shipped with XBMC doesn't do redirects, have mips/uflash/etc fixes.

I noticed the default librtmp.so included is like 1.xMB which is far bigger than any other XBMC one I've seen.

Yet every single librtmp.so that I make either from S74ck3r's git or the official git, it all just crashes XBMC claiming it can't load "libcurl.so" yet I never touched said file. Plus my files generally come to to about 4xx KB not even close to the same file size as the original.

S74ck3r
Posts: 21
Joined: Fri Feb 01, 2013 8:31 am

Re: Help with android build

Postby S74ck3r » Tue Mar 26, 2013 5:23 pm

I'll have a go at recreating this when I get home. In the mean time is it possible to get a copy of the logcat with the error?

thanks
Richard

RedPenguin
Posts: 20
Joined: Mon Mar 25, 2013 5:25 am

Re: Help with android build

Postby RedPenguin » Tue Mar 26, 2013 10:32 pm

S74ck3r wrote:I'll have a go at recreating this when I get home. In the mean time is it possible to get a copy of the logcat with the error?

thanks
Richard


No problem on my end but it will be a while until I can get a hold of my friend who actually has the Android to give you the logcat.
EDIT:
Here's the main part of his log:

V/XBMC ( 2079): 19:24:02 T:1665961568 DEBUG: Loading: /data/app-lib/org.xbmc.xbmc-2/libcurl.so
V/XBMC ( 2079): xb_dlopen: Error from dlopen(/data/app-lib/org.xbmc.xbmc-2/librtmp.so): Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "sqrt" referenced by "librtmp.so"...
V/XBMC ( 2079): xb_dlopen: Error from dlopen(/data/app-lib/org.xbmc.xbmc-2/libcurl.so): Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "librtmp.so" needed by "libcurl.so"; caused by find_library(linker.cpp:889): "librtmp.so" failed to load previously
V/XBMC ( 2079): 19:24:02 T:1665961568 ERROR: Unable to load /data/app-lib/org.xbmc.xbmc-2/libcurl.so, reason: (null)

At least now I understand the libcurl error but how does one fix this sqrt problem? That seems to indicate some issue in compiling it, to me anyway.


Return to “RTMPDump Specific”

Who is online

Users browsing this forum: No registered users and 1 guest