Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Trusted Contributor
cjonesy
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: ffmpeg compile issue

thanks mreed, please see output below. (The app is actualy called finaltest, i removed final from earlier post), also this output is with the includes removed as i think it will show the problem.

 

Thank again.

 

 


**** Build of configuration Default for project finaltest ****

make all
make -j 1 -Carm -fMakefile all
make[1]: Entering directory `C:/ndk-2.1.0-workspace/finaltest/arm'
make -j 1 -Co.le-v7 -fMakefile all
make[2]: Entering directory `C:/ndk-2.1.0-workspace/finaltest/arm/o.le-v7'
C:/bbndk-2.1.0-beta1/host/win32/x86/usr/bin/qcc -Vgcc_ntoarmv7 -c -O -Wc,-Wall -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -frecord-gcc-switches -DNDEBUG -I. -IC:/ndk-2.1.0-workspace/finaltest/arm/o.le-v7 -IC:/ndk-2.1.0-workspace/finaltest/arm -IC:/ndk-2.1.0-workspace/finaltest -IC:/bbndk-2.1.0-beta1/target/qnx6/usr/include/freetype2 -IC:/bbndk-2.1.0-beta1/target/qnx6/../target-override/usr/include -IC:/ndk-2.1.0-workspace/finaltest/ffmpeg/include -IC:/ndk-2.1.0-workspace/finaltest/public -IC:/bbndk-2.1.0-beta1/target/qnx6/usr/include -EL -DVARIANT_le -DVARIANT_v7 -DBUILDENV_qss C:/ndk-2.1.0-workspace/finaltest/main.c
make[2]: *** No rule to make target `libavformat.a', needed by `C:/ndk-2.1.0-workspace/finaltest/arm/o.le-v7/finaltest'. Stop.
make[2]: Leaving directory `C:/ndk-2.1.0-workspace/finaltest/arm/o.le-v7'
make[1]: *** [all] Error 2
make[1]: Leaving directory `C:/ndk-2.1.0-workspace/finaltest/arm'
make: *** [all] Error 2

**** Build Finished ****

 

USEFILE=

# Extra include path for libfreetype and for target overrides and patches
EXTRA_INCVPATH+=$(QNX_TARGET)/usr/include/freetype2 \
$(QNX_TARGET)/../target-override/usr/include \
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/include
# Extra library search path for target overrides and patches
EXTRA_LIBVPATH+=$(QNX_TARGET)/../target-override/$(CPUVARDIR)/lib \
$(QNX_TARGET)/../target-override/$(CPUVARDIR)/usr/lib \
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/lib

# Compiler options for enhanced security and recording the compiler options in release builds
CCFLAGS+=-fstack-protector-all -D_FORTIFY_SOURCE=2 \
$(if $(filter g so shared,$(VARIANTS)),,-fPIE) \
$(if $(filter g,$(VARIANTS)),,-frecord-gcc-switches)

# Linker options for enhanced security
LDFLAGS+=-Wl,-z,relro -Wl,-z,now $(if $(filter g so shared,$(VARIANTS)),,-pie)

# Add your required library names, here
LIBS += bps pps screen m avformat avcodec avutil
ARCH = armle-v7

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: ffmpeg compile issue

Just double checking, but are the .SO files directly under C:/ndk-2.1.0-workspace/finaltest/ffmpeg/lib

 

example:
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/lib/libavformat.so
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/lib/libavcodec.so
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/lib/libavutil.so

 

Please use plain text.
Trusted Contributor
cjonesy
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: ffmpeg compile issue

the .so files are in C:\ndk-2.1.0-workspace\finaltest2\ffmpeg\lib\gpl\qnx\armle-v7 and there are other folders contaiing .a files.

 

Am i doing something stupid?

Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: ffmpeg compile issue

[ Edited ]

The path needs to point directly to the folder holding the lib files.

 

From my example on github:

-L../ffmpeg/lib/{gpl|lgpl}/qnx/$${ARCH}

...you have to choose between gpl or lpgl (license):
-L../ffmpeg/lib/gpl/qnx/$${ARCH}

$${ARCH} is controlled by the ARCH variable, which I only have in there to switch between device and simulator. So for device it would be converted to:
-L../ffmpeg/lib/gpl/qnx/armle-v7

Please use plain text.
Trusted Contributor
cjonesy
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: ffmpeg compile issue

paths now look like 

 

# Extra include path for libfreetype and for target overrides and patches
EXTRA_INCVPATH+=$(QNX_TARGET)/usr/include/freetype2 \
$(QNX_TARGET)/../target-override/usr/include \
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/include
# Extra library search path for target overrides and patches
EXTRA_LIBVPATH+=$(QNX_TARGET)/../target-override/$(CPUVARDIR)/lib \
$(QNX_TARGET)/../target-override/$(CPUVARDIR)/usr/lib \
C:/ndk-2.1.0-workspace/finaltest/ffmpeg/lib/gpl/qnx/armle-v7

 

but still same issue. Regarding 

Including FFmpeg in the BAR

 

Is that relevent here?  I copied and paste the contents below that header in read me to my bar descriptor and changed paths to gpl where relevent. Just cant think of anything else to try.

 

 

 

Please use plain text.
Trusted Contributor
cjonesy
Posts: 160
Registered: ‎09-13-2012
My Device: 9900
My Carrier: vodafone

Re: ffmpeg compile issue

I am going back to trying to compile ffmpeg with ndk 2.1 as I'm thinking you are right about the files not being compatible for ndk 2.1 as they were built with ndk 10.

 

I clone ffmpeg and have this in myconfig 

 

./configure --enable-cross-compile --cross-prefix=arm-unknown-nto-qnx6.5.0eabi- --arch=armv7 --enable-debug --disable-optimizations --disable-asm --disable-static --enable-shared --target-os=qnx --disable-ffplay --disable-ffserver

 

It seems fine and all i get is 

 

WARNING: arm-unknown-nto-qnx6.5.0eabi-pkg-config not found, library detection may fail.
WARNING: Compiler does not indicate floating-point ABI, guessing soft

 

So then i try install and the first error i get is 

library.mak:95: *** missing separator. Stop.

 

which is this line in library.mak $(eval $(RULES)) so i change it top $(eval : $(RULES)) and it gets past the error and starts a long list of .o files.

 

It then outputs..

 

/options_table.h:149:1: warning: 'luma_elim_threshold' is deprecated (declared at ./libavcodec/avcodec.h:1733) [-Wdeprecated-declarations]
./libavcodec/options_table.h:150:1: warning: 'chroma_elim_threshold' is deprecated (declared at ./libavcodec/avcodec.h:1740) [-Wdeprecated-declarations]
./libavcodec/options_table.h:284:1: warning: 'color_table_id' is deprecated (declared at ./libavcodec/avcodec.h:1979) [-Wdeprecated-declarations]
./libavcodec/options_table.h:307:1: warning: 'inter_threshold' is deprecated (declared at ./libavcodec/avcodec.h:2042) [-Wdeprecated-declarations]
./libavcodec/options_table.h:312:1: warning: 'quantizer_noise_shaping' is deprecated (declared at ./libavcodec/avcodec.h:2049) [-Wdeprecated-declarations]
HOSTLD doc/print_options.exe
GENTEXI doc/avoptions_format.texi
GENTEXI doc/avoptions_codec.texi
POD doc/ffmpeg.pod
POD doc/ffprobe.pod
TXT doc/fate.txt
make: *** [doc/fate.txt] Error 2

 

Any ideas?

Please use plain text.