Im trying to compile ffmpeg for Tizen TV as a static library using toolchains.
This is the script I'm using:
#!/bin/bash
function buildme
{
./configure --prefix=$PREFIX \
--target-os=linux \
--arch=$ARCH \
--cpu=armv7-a \
--enable-runtime-cpudetect \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--enable-cross-compile \
--enable-optimizations \
--disable-ffprobe \
--disable-devices \
--disable-avdevice \
--disable-debug \
--enable-pic \
--disable-shared \
--enable-gpl \
--enable-static \
--sysroot=/path-to-tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/arm-tizen-linux-gnueabi \
--cross-prefix=${PLATFORM}/bin/$PLATFORM_PREFIX \
--extra-cflags="-O3 -std=c++11 -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -fpic $OPTIMIZE_CFLAGS" \
--enable-asm \
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/lib -L$PLATFORM/lib -nostdlib" \
--cc=${CCOMPILER} \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make V=1
make install
}
echo configuring....
PLATFORM=/path-to-tizen-studio/tools/arm-linux-gnueabi-gcc-6.2
PREFIX='pwd'/thridParty
PLATFORM_PREFIX=arm-linux-gnueabi-
ARCH=arm
CCOMPILER=${PLATFORM}/bin/arm-linux-gnueabi-g++
OPTIMIZE_CFLAGS="-marm"
buildme
echo end
And I obtain this error:
/path-to-tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/arm-tizen-linux-gnueabi/include/c++/6.2.1/arm-tizen-linux-gnueabi/bits/os_defines.h:39:22:
fatal error: features.h: No such file or directory
#include <features.h>
Instead Tizen gbs build would be helpful if we can setup tizen env.
I've verified builds using
Env: https://docs.tizen.org/platform/developing/building/
Source code: https://git.tizen.org/cgit/platform/upstream/ffmpeg/
Related
I'm trying to run a makefile and came across two errors. When I run make I get this:
$ make
mpif90 -xHost -ip -fpp -O3 -align -I/include/intel64/lp64 -I/include/fftw -c integ-Coul.F
make: mpif90: Command not found
make: *** [makefile:181: integ-Coul.o] Error 127
So, I already have installed openmpi-devel and the file mpif90 it's in the /usr/lib64/openmpi/bin folder, but the error keeps reocurring.
This is the makefile
#
.SUFFIXES:
.SUFFIXES: .f .F .for .cpp .F90 .cu .o
#FC=ifort -xHost -ip -fpp
FC = mpif90 -xHost -ip -fpp
FREE = -free
# use this flag for debugging and coding up
SAFE = #-g -traceback -check all #-fstack-protector -assume protect_parens -implicitnone -warn all
FFLAGS1 = -O3 -align
FFLAGS2 = -O2 -align -qopenmp -parallel $(FREE) $(SAFE)
LDFLAGS = -static-intel
CXX = icpc -std=c++11
SAFE_CXX = #-g -traceback
CFLAGS = -O2 -align -xHost -ip -qopenmp -fno-exceptions -restrict $(SAFE_CXX)
# MKLROOT = If MKLROOT is not defined in your environment, edit and uncomment this line
LIB_BLAS = -lmkl_blas95_lp64
LIB_LAPACK = -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
LIB_OMP = -liomp5 -lpthread
INCS_MKL = -I$(MKLROOT)/include/intel64/lp64 -I$(MKLROOT)/include/fftw
# Uncomment the lines below when compiling for GPUs
# GPU_DEFS options:
# -DGPU_TIMING : Print timings (CPU/GPU)
# -DUSE_GPU : Compile with GPU support
# -DGPU_DEBUG : Print some debug messages
# -DGPU_SYGVDM_VER : Use multi-gpu version of SYGVD (faster than single-gpu even with 1 gpu)
# -DGPU_SYGVD2S_VER : Use two stage version of SYGVD (faster, but needs more memory)
# -DGPU_DONT_PIN_MEM : Don't use pinned memory for faster transfers (in Fortran code)
# -DGPU_PIN_MEM_WORK : Use pinned memory for work spaces (in C code)
#GPU_DEFS = -DUSE_GPU
#
ifneq (,$(findstring USE_GPU,$(GPU_DEFS)))
# CUDA compiler
NVCC = nvcc
# compute capality (depends on your GPU, check!)
SM = 35
#SAFE_NVCC = -g -lineinfo
NVCCFLAGS = -O3 -gencode arch=compute_${SM},code=sm_${SM} -Xcompiler "-fno-strict-aliasing -march=native -fno-exceptions" $(SAFE_NVCC)
# -fno-strict-aliasing
#
# CUDA and MAGMA paths:
CUDADIR = /usr/local/cuda
MAGMADIR = /opt/magma
#
# CUDA and MAGMA libs:
# dynamic linking:
#LIB_CUDA = -L$(CUDADIR)/lib64 -lcublas -lcusparse -lcudart
# static linking:
LIB_CUDA = -L$(CUDADIR)/lib64 -lcublas_static -lcusparse_static -lculibos -lcudart_static -ldl
LIB_MAGMA = $(MAGMADIR)/lib/libmagma.a
#
LIB_GPU = $(LIB_MAGMA) $(LIB_CUDA) -lstdc++
INCS_GPU = -I$(CUDADIR)/include -I$(MAGMADIR)/include
endif
LIB = $(LIB_GPU) $(LIB_BLAS) $(LIB_LAPACK) $(LIB_OMP) -lrt
INCS = $(INCS_MKL)
#-----------------------------------------------------------------------
# general rules
#-----------------------------------------------------------------------
#INCS1 = comun.inc integcoul.inc m2cdat.inc $(INCS)
SOURCE1 = integ-Coul.o \
Coul0sim.o \
m2caux3-Coul.o \
abcpes-Coul.o \
ckplm-Coul.o \
util-Coul.o
SOURCE2 = constants_m.o \
Matrix_math.o \
exec_time.o \
types_EHT.o \
types_MM.o \
parameters.o \
MPI_defs.o \
OPT_parent.o \
parameters_MM.o \
checklist.o \
allocation_m.o \
util.o \
EHT_input.o \
tuning.o \
IdentifyNonBonded.o \
babel_routines.o \
babel.o \
gmx2mdflex.o \
namd2mdflex.o \
structure.o \
md_read.o \
md_setup.o \
f_intra.o \
f_inter.o \
md_output.o \
pbc.o \
overlap_D.o \
STO.o \
multip_routines.o \
LCMO_Builder.o \
Coulomb.o \
DP_main.o \
td_dp.o \
DP_FMO.o \
dipole_phi.o \
EnvField.o \
polarizability.o \
hamiltonians.o \
QCModel_Huckel.o \
diabatic-Ehren.o \
HuckelForces.o \
Ehrenfest.o \
CoulInt_QMMM.o \
FMO.o \
electron_hole_DP.o \
AlphaPolar.o \
data_output.o \
backup_MM.o \
Berendsen.o \
NoseHoover.o \
NoseHoover_Reversible.o \
NVE.o \
VDOS_m.o \
MM_dynamics.o \
MM_driver.o \
film_STO.o \
DOS_m.o \
oscillator.o \
ga_QCModel.o \
cost_tuning_EH.o \
cost_tuning_MM.o \
nonlinearCG.o \
CG_class.o \
MM_ERG_class.o \
nonlinear-sidekick.o \
FF_OPT_class.o \
CG_EH_driver.o \
ga_routines.o \
CG_MM_driver.o \
vibes_driver.o \
solvated_M.o \
DOS_tool.o \
backup.o \
auto_correlation.o \
ElHl_schroedinger.o \
diagnostic.o \
qdynamics.o \
Taylor.o \
ElHl_Chebyshev.o \
ElHl_Chebyshev_GPU.o \
AO_adiabatic.o \
Chebyshev_driver.o \
eigen_driver.o \
ga_driver.o \
avrg_confgs.o \
main.o
SOURCE_GPU = GPU_Interface.o \
Taylor_gpu.o
# Chebyshev_gpu.o
ifneq (,$(findstring USE_GPU,$(GPU_DEFS)))
SOURCE_CUDA= Chebyshev_gpu_kernels.o \
dzgemv_kernels.o
endif
a: $(SOURCE1) $(SOURCE2) $(SOURCE_GPU) $(SOURCE_CUDA)
rm -f a
$(FC) $(INCS) $(LDFLAGS) -o a $(SOURCE1) $(SOURCE2) $(SOURCE_GPU) $(SOURCE_CUDA) $(LIB)
.F.o:
$(FC) $(FFLAGS1) $(INCS) -c $<
.f.o:
$(FC) $(FFLAGS2) $(INCS) $(GPU_DEFS) -c $<
.F90.o:
$(FC) $(FFLAGS1) $(INCS) $(GPU_DEFS) -c $<
.cpp.o:
$(CXX) $(CFLAGS) $(INCS_GPU) $(GPU_DEFS) -c $<
.cu.o:
$(NVCC) $(NVCCFLAGS) $(INCS_GPU) $(GPU_DEFS) -c $<
clean:
-rm -f a *.o *.mod; touch *.f
depend:
#echo -en "Searching module dependencies..."
#chmod +x ./makedepend.bsh
#./makedepend.bsh > dependencies.txt
#echo -en " done.\n"
## Dependency list:
-include dependencies.txt
I don't have much experience so I would really appreciate some help with this. Thank you all.
Ps.: my SO is Fedora 32
I'm using NDK tools to build ffmpeg shared lib which will be used in my
android rtsp project.All needed components are compiled/linked as seperate
static libs, and at last these libs will be linked as a single shared lib.
Everything goes well except the last step. error happens when linking
libavdevice, all symbols in NDK camera and media can not be found, error
log:
libavdevice/android_camera.c:702: error: undefined reference
to 'ACameraCaptureSession_stopRepeating'
libavdevice/android_camera.c:706: error: undefined reference
to 'ACameraCaptureSession_close'
libavdevice/android_camera.c:711: error: undefined reference
to 'ACaptureRequest_removeTarget'
libavdevice/android_camera.c:712: error: undefined reference
to 'ACaptureRequest_free'
libavdevice/android_camera.c:717: error: undefined reference
to 'ACameraOutputTarget_free'
libavdevice/android_camera.c:722: error: undefined reference
to 'ACaptureSessionOutputContainer_remove'
libavdevice/android_camera.c:724: error: undefined reference
to 'ACaptureSessionOutput_free'
libavdevice/android_camera.c:729: error: undefined reference
to 'ANativeWindow_release'
libavdevice/android_camera.c:734: error: undefined reference
to 'ACaptureSessionOutputContainer_free'
libavdevice/android_camera.c:739: error: undefined reference
to 'ACameraDevice_close'
libavdevice/android_camera.c:744: error: undefined reference
to 'AImageReader_delete'
libavdevice/android_camera.c:749: error: undefined reference
to 'ACameraMetadata_free'
libavdevice/android_camera.c:756: error: undefined reference
to 'ACameraManager_delete'
libavdevice/android_camera.c:172: error: undefined reference
to 'ACameraDevice_getId'
libavdevice/android_camera.c:163: error: undefined reference
to 'ACameraDevice_getId'
libavdevice/android_camera.c:392: error: undefined reference
to 'AImageReader_acquireLatestImage'
libavdevice/android_camera.c:483: error: undefined reference
to 'AImage_delete'
libavdevice/android_camera.c:345: error: undefined reference
to 'AImage_getPlanePixelStride'
libavdevice/android_camera.c:346: error: undefined reference
to 'AImage_getPlaneData'
...
Here is my build script which is ran on my Windows 7 x86_64 PC.
#!/bin/bash
export TMPDIR=D:/other/AndroidDevelopment/ffmpeg-4.0.2/ffmpegtemp
NDK=D:/software/app/android_sdk/ndk-bundle
SYSROOT=$NDK/platforms/android-28/arch-x86_64/
TOOLCHAIN=$NDK/toolchains/x86_64-4.9/prebuilt/windows-x86_64
CPU=x86_64
PREFIX=./android/$CPU
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-static \
--enable-jni \
--enable-pthreads \
--enable-mediacodec \
--disable-asm \
--disable-shared \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-doc \
--disable-symver \
--cross-prefix=$TOOLCHAIN/bin/x86_64-linux-android- \
--target-os=android \
--arch=x86_64 \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags=" -isysroot $NDK/sysroot -I$NDK/sysroot/usr/include/x86_64-linux-android" \
--extra-ldflags=-pie
make clean
make -j4
make install
$TOOLCHAIN/bin/x86_64-linux-android-ld \
-rpath-link=$SYSROOT/usr/lib64 \
-L$SYSROOT/usr/lib64 \
-L$PREFIX/lib \
-soname libffmpeg.so -shared -nostdlib -Bsymbolic --whole-archive --no- undefined -o \
$PREFIX/libffmpeg.so \
libavcodec/libavcodec.a \
libavfilter/libavfilter.a \
libswresample/libswresample.a \
libavformat/libavformat.a \
libavutil/libavutil.a \
libswscale/libswscale.a \
libavdevice/libavdevice.a \
-lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker \
$TOOLCHAIN/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a \
}
build_one
Your …-ld command needs explicit references to the Android native libraries:
-lcamera2ndk -lmediandk -lnativewindow
Actually, I don't understand this obsession with the build_one shell function. Here is the minimal script that works for me, with NDK r18b2 and ffmpeg 4.0.2:
export NDK=whatever
export CPU=x86_64
export CROSS=$NDK/toolchains/$CPU-4.9/prebuilt/darwin-x86_64/bin/$CPU-linux-android-
mkdir android_$CPU
cd android_$CPU
../configure --enable-static --enable-jni --enable-pthreads --enable-mediacodec \
--disable-asm --disable-shared --disable-doc --disable-ffmpeg --disable-ffplay \
--disable-ffprobe --disable-doc --disable-symver \
--cross-prefix=$CROSS --target-os=android --arch=$CPU --enable-cross-compile \
--sysroot=$NDK/platforms/android-28/arch-$CPU \
--extra-cflags="-isysroot $NDK/sysroot -I $NDK/sysroot/usr/include -I $NDK/sysroot/usr/include/$CPU-linux-android" \
--extra-ldflags="-pie -L$NDK/platforms/android-28/arch-$CPU/usr/lib64 -lc -lm" \
--ld=$CROSS-ld
make CONFIG_V4L2_OUTDEV=no
$CROSS-ld -soname libffmpeg.so -shared -nostdlib -Bsymbolic \
--whole-archive --no-undefined -o libffmpeg.so \
libavcodec/libavcodec.a libavfilter/libavfilter.a \
libswresample/libswresample.a libavformat/libavformat.a \
libavutil/libavutil.a libswscale/libswscale.a libavdevice/libavdevice.a \
-L$NDK/platforms/android-28/arch-$CPU/usr/lib64 \
-lc -lm -lz -lcamera2ndk -lmediandk -lnativewindow
Note that I disabled v4l2 output. My compilation failed for libavdevice/v4l2.c, because the NDK definition of ioctl() was not compatible with ffmpeg.
I'm trying to compile php 5.6 on OsX Mavericks but in the middle of linking process I am receiving this error and do not know what to do with it.
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_do_convert in gdkanji.o
_zif_iconv_substr in iconv.o
_zif_iconv_mime_encode in iconv.o
_php_iconv_string in iconv.o
__php_iconv_strlen in iconv.o
__php_iconv_strpos in iconv.o
_php_iconv_stream_filter_append_bucket in iconv.o
...
"_libiconv_close", referenced from:
_do_convert in gdkanji.o
_convert in encodings.o
"_libiconv_open", referenced from:
_do_convert in gdkanji.o
_convert in encodings.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1
This is my configure options:
sudo ./configure --prefix=/opt/local \
--mandir=/usr/share/man \
--enable-maintainer-zts \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/Library/Server/Web/Config/php \
--with-libxml-dir=/usr \
--with-openssl=/usr \
--with-kerberos=/usr \
--with-zlib=/usr \
--enable-bcmath \
--with-bz2=/usr \
--enable-calendar \
--disable-cgi \
--with-curl=/usr \
--enable-dba \
--enable-exif \
--enable-fpm \
--enable-ftp \
--with-gd \
--with-freetype-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.2~1/Root/usr/local \
--with-jpeg-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.2~1/Root/usr/local \
--with-png-dir=/BinaryCache/apache_mod_php/apache_mod_php-87.2~1/Root/usr/local \
--enable-gd-native-ttf \
--with-icu-dir=/usr \
--with-ldap=/usr \
--with-ldap-sasl=/usr \
--with-libedit=/usr \
--enable-mbstring \
--enable-mbregex \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pear \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/mysql/mysql.sock \
--with-readline=/usr \
--enable-shmop \
--with-snmp=/usr
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-tidy \
--enable-wddx\
--with-xmlrpc \
--with-iconv-dir=/usr \
--with-xsl=/usr \
--enable-zip \
--with-pcre-regex=/opt/local \
--with-vpx-dir=/usr/local/Cellar \
--with-xpm-dir=no
Any help determining the issue would be greatly appreciated. I have tried rebuilding libiconv with no success in fixing the issue. The backslashes on my configure options was put there to break up the really long line of options to make it more readable here so please dont correct me on that in the case that you think that might be the issue. Thanks in advance.
i have added a module to ns2 and i am compiling it when i get undefined reference error.
g++ -o ns \
-lXext -lX11 -lnsl -ldl -lm -lm -lrt -lneoclassic -lxml
maser/mamas.o: In function `mamasReasoner::mamasReasoner()':
mamas.cc:(.text+0x95): undefined reference to `NeoEnvironment::initFromNs(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&, int)'
maser/mamas.o: In function `mamasReasoner::build_ontology_tree(knBase&)':
mamas.cc:(.text+0x1c84): undefined reference to `NeoEnvironment::evaluateCommand(String const&)'
maser/mamas.o: In function `NeoEnvironment::readXmlFromMemory(char const*, char const*)':
mamas.cc:(.text._ZN14NeoEnvironment17readXmlFromMemoryEPKcS1_[NeoEnvironment::readXmlFromMemory(char const*, char const*)]+0x14): undefined reference to `Parser::readXmlFromMemory(char const*, char const*)'
collect2: ld returned 1 exit status
make: *** [ns] Error
the library which it is asking for is present at the /usr/local/lib/libneoclassic.so and the makefile can be seen here http://pastebin.com/NZWPxKht
which use the following code for linking.
LINK = g++
LDFLAGS = -lneoclassic -lrt -lxml2
LDOUT = -o $(BLANK)
LIB = \
-L/usr/local/lib -ltclcl -L/usr/local/lib -lotcl -L/usr/local/lib -ltk8.4 -L/usr/local/lib -ltcl8.4 \
-lXext -lX11 \
-lnsl -ldl \
-lm -lm
OBJ_CC = \
tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o \
common/scheduler.o common/object.o common/packet.o \
common/ip.o routing/route.o common/connector.o common/ttl.o \
trace/trace.o trace/trace-ip.o \
classifier/classifier.o classifier/classifier-addr.o \
classifier/classifier-hash.o \
classifier/classifier-virtual.o \
classifier/classifier-mcast.o \
classifier/classifier-bst.o \
classifier/classifier-mpath.o mcast/replicator.o \
classifier/classifier-mac.o \
classifier/classifier-qs.o \
classifier/classifier-port.o src_rtg/classifier-sr.o \
src_rtg/sragent.o src_rtg/hdr_src.o adc/ump.o \
qs/qsagent.o qs/hdr_qs.o \
apps/app.o apps/telnet.o tcp/tcplib-telnet.o \
tools/trafgen.o trace/traffictrace.o tools/pareto.o \
tools/expoo.o tools/cbr_traffic.o \
adc/tbf.o adc/resv.o adc/sa.o tcp/saack.o \
tools/measuremod.o adc/estimator.o adc/adc.o adc/ms-adc.o \
adc/timewindow-est.o adc/acto-adc.o \
adc/pointsample-est.o adc/salink.o adc/actp-adc.o \
adc/hb-adc.o adc/expavg-est.o\
adc/param-adc.o adc/null-estimator.o \
adc/adaptive-receiver.o apps/vatrcvr.o adc/consrcvr.o \
common/agent.o common/message.o apps/udp.o \
common/session-rtp.o apps/rtp.o tcp/rtcp.o \
common/ivs.o \
common/messpass.o common/tp.o common/tpm.o apps/worm.o \
tcp/tcp.o tcp/tcp-sink.o tcp/tcp-reno.o \
tcp/tcp-newreno.o \
tcp/tcp-vegas.o tcp/tcp-rbp.o tcp/tcp-full.o tcp/rq.o \
baytcp/tcp-full-bay.o baytcp/ftpc.o baytcp/ftps.o \
tcp/scoreboard.o tcp/scoreboard-rq.o tcp/tcp-sack1.o tcp/tcp-fack.o \
tcp/tcp-asym.o tcp/tcp-asym-sink.o tcp/tcp-fs.o \
tcp/tcp-asym-fs.o \
tcp/tcp-int.o tcp/chost.o tcp/tcp-session.o \
tcp/nilist.o \
sctp/sctp.o apps/sctp_app1.o\
sctp/sctp-timestamp.o sctp/sctp-hbAfterRto.o \
sctp/sctp-multipleFastRtx.o sctp/sctp-mfrHbAfterRto.o \
sctp/sctp-mfrTimestamp.o \
sctp/sctp-cmt.o \
sctp/sctpDebug.o \
tools/integrator.o tools/queue-monitor.o \
tools/flowmon.o tools/loss-monitor.o \
queue/queue.o queue/drop-tail.o \
adc/simple-intserv-sched.o queue/red.o \
queue/semantic-packetqueue.o queue/semantic-red.o \
tcp/ack-recons.o \
queue/sfq.o queue/fq.o queue/drr.o queue/srr.o queue/cbq.o \
queue/jobs.o queue/marker.o queue/demarker.o \
link/hackloss.o queue/errmodel.o queue/fec.o\
link/delay.o tcp/snoop.o \
gaf/gaf.o \
link/dynalink.o routing/rtProtoDV.o common/net-interface.o \
mcast/ctrMcast.o mcast/mcast_ctrl.o mcast/srm.o \
common/sessionhelper.o queue/delaymodel.o \
mcast/srm-ssm.o mcast/srm-topo.o \
routing/alloc-address.o routing/address.o \
$(LIB_DIR)int.Vec.o $(LIB_DIR)int.RVec.o \
$(LIB_DIR)dmalloc_support.o \
webcache/http.o webcache/tcp-simple.o webcache/pagepool.o \
webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o \
webcache/mcache.o webcache/webtraf.o \
webcache/webserver.o \
webcache/logweb.o \
empweb/empweb.o \
empweb/empftp.o \
realaudio/realaudio.o \
mac/lanRouter.o classifier/filter.o \
common/pkt-counter.o \
common/Decapsulator.o common/Encapsulator.o \
common/encap.o \
mac/channel.o mac/mac.o mac/ll.o mac/mac-802_11.o \
mac/mac-802_3.o mac/mac-tdma.o mac/smac.o \
mobile/mip.o mobile/mip-reg.o mobile/gridkeeper.o \
mobile/propagation.o mobile/tworayground.o \
mobile/antenna.o mobile/omni-antenna.o \
mobile/shadowing.o mobile/shadowing-vis.o mobile/dumb-agent.o \
common/bi-connector.o common/node.o \
common/mobilenode.o \
mac/arp.o mobile/god.o mobile/dem.o \
mobile/topography.o mobile/modulation.o \
queue/priqueue.o queue/dsr-priqueue.o \
mac/phy.o mac/wired-phy.o mac/wireless-phy.o \
mac/mac-timers.o trace/cmu-trace.o mac/varp.o \
mac/mac-simple.o \
satellite/sat-hdlc.o \
dsdv/dsdv.o dsdv/rtable.o queue/rtqueue.o \
routing/rttable.o \
imep/imep.o imep/dest_queue.o imep/imep_api.o \
imep/imep_rt.o imep/rxmit_queue.o imep/imep_timers.o \
imep/imep_util.o imep/imep_io.o \
tora/tora.o tora/tora_api.o tora/tora_dest.o \
tora/tora_io.o tora/tora_logs.o tora/tora_neighbor.o \
dsr/dsragent.o dsr/hdr_sr.o dsr/mobicache.o dsr/path.o \
dsr/requesttable.o dsr/routecache.o dsr/add_sr.o \
dsr/dsr_proto.o dsr/flowstruct.o dsr/linkcache.o \
dsr/simplecache.o dsr/sr_forwarder.o \
aodv/aodv_logs.o aodv/aodv.o \
aodv/aodv_rtable.o aodv/aodv_rqueue.o \
common/ns-process.o \
satellite/satgeometry.o satellite/sathandoff.o \
satellite/satlink.o satellite/satnode.o \
satellite/satposition.o satellite/satroute.o \
satellite/sattrace.o \
rap/raplist.o rap/rap.o rap/media-app.o rap/utilities.o \
common/fsm.o tcp/tcp-abs.o \
diffusion/diffusion.o diffusion/diff_rate.o diffusion/diff_prob.o \
diffusion/diff_sink.o diffusion/flooding.o diffusion/omni_mcast.o \
diffusion/hash_table.o diffusion/routing_table.o diffusion/iflist.o \
tcp/tfrc.o tcp/tfrc-sink.o mobile/energy-model.o apps/ping.o tcp/tcp-rfc793edu.o \
queue/rio.o queue/semantic-rio.o tcp/tcp-sack-rh.o tcp/scoreboard-rh.o \
plm/loss-monitor-plm.o plm/cbr-traffic-PP.o \
linkstate/hdr-ls.o \
mpls/classifier-addr-mpls.o mpls/ldp.o mpls/mpls-module.o \
routing/rtmodule.o classifier/classifier-hier.o \
routing/addr-params.o \
nix/hdr_nv.o nix/classifier-nix.o \
nix/nixnode.o \
routealgo/rnode.o \
routealgo/bfs.o \
routealgo/rbitmap.o \
routealgo/rlookup.o \
routealgo/routealgo.o \
nix/nixvec.o \
nix/nixroute.o \
diffserv/dsred.o diffserv/dsredq.o \
diffserv/dsEdge.o diffserv/dsCore.o \
diffserv/dsPolicy.o diffserv/ew.o diffserv/dewp.o \
queue/red-pd.o queue/pi.o queue/vq.o queue/rem.o \
queue/gk.o \
pushback/rate-limit.o pushback/rate-limit-strategy.o \
pushback/ident-tree.o pushback/agg-spec.o \
pushback/logging-data-struct.o \
pushback/rate-estimator.o \
pushback/pushback-queue.o pushback/pushback.o \
common/parentnode.o trace/basetrace.o \
common/simulator.o asim/asim.o \
common/scheduler-map.o common/splay-scheduler.o \
linkstate/ls.o linkstate/rtProtoLS.o \
pgm/classifier-pgm.o pgm/pgm-agent.o pgm/pgm-sender.o \
pgm/pgm-receiver.o mcast/rcvbuf.o \
mcast/classifier-lms.o mcast/lms-agent.o mcast/lms-receiver.o \
mcast/lms-sender.o \
queue/delayer.o \
xcp/xcpq.o xcp/xcp.o xcp/xcp-end-sys.o \
wpan/p802_15_4csmaca.o wpan/p802_15_4fail.o \
wpan/p802_15_4hlist.o wpan/p802_15_4mac.o \
wpan/p802_15_4nam.o wpan/p802_15_4phy.o \
wpan/p802_15_4sscs.o wpan/p802_15_4timer.o \
wpan/p802_15_4trace.o wpan/p802_15_4transac.o \
maser/maser.o maser/mamas.o \
$(OBJ_STL)
$(LINK) $(LDFLAGS) $(LDOUT)$# \
common/tclAppInit.o $(OBJ) $(LIB)
I figured out that the functions were declared but not implemented. As soon as I implemented them, the problem was solved.
I am trying to compile ffmpeg for Android but for the x86 architecture. I've successfully compiled an arm .so and it all works, and I though that by replacing arm with x86 in the relevant places within the build script would have done the trick. Unfortunately that's not the case and I get some strange things occurring.
First I get this while it's compiling ffmpeg:
/home/ankur/android-ndk-r8/platforms/android-8/arch-arm//usr/include/strings.h:49: warning: redundant redeclaration of 'index'
Notice the arch-arm instead of arch-x86. Finally I get this:
/home/ankur/android-ndk-r8/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/i686-android-linux-ld: libavcodec/libavcodec.a(4xm.o): Relocations in generic ELF (EM: 40)
/home/ankur/android-ndk-r8/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/i686-android-linux-ld: libavcodec/libavcodec.a(4xm.o): Relocations in generic ELF (EM: 40)
/home/ankur/android-ndk-r8/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/i686-android-linux-ld: libavcodec/libavcodec.a(4xm.o): Relocations in generic ELF (EM: 40)
libavcodec/libavcodec.a(4xm.o): could not read symbols: File in wrong format
The build script I've created looks like this:
#!/bin/bash
NDK=~/android-ndk-r8
PLATFORM=$NDK/platforms/android-8/arch-x86/
PREBUILT=$NDK/toolchains/x86-4.4.3/prebuilt/linux-x86
function build_one_r8
{
./configure \
--disable-shared \
--enable-static \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-avfilter \
--disable-postproc \
--enable-small \
--cross-prefix=$PREBUILT/bin/i686-android-linux- \
--enable-cross-compile \
--target-os=linux \
--extra-cflags="-I$PLATFORM/usr/include" \
--arch=x86 \
--disable-symver \
--disable-debug \
--disable-stripping \
$ADDITIONAL_CONFIGURE_FLAG
sed -i 's/HAVE_LRINT 0/HAVE_LRINT 1/g' config.h
sed -i 's/HAVE_LRINTF 0/HAVE_LRINTF 1/g' config.h
sed -i 's/HAVE_ROUND 0/HAVE_ROUND 1/g' config.h
sed -i 's/HAVE_ROUNDF 0/HAVE_ROUNDF 1/g' config.h
sed -i 's/HAVE_TRUNC 0/HAVE_TRUNC 1/g' config.h
sed -i 's/HAVE_TRUNCF 0/HAVE_TRUNCF 1/g' config.h
make clean
make -j4 install
$PREBUILT/bin/i686-android-linux-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/i686-android-linux-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/i686-android-linux/4.4.3/libgcc.a
}
function build_one_r8_2
{
$PREBUILT/bin/i686-android-linux-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/i686-android-linux-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/i686-android-linux/4.4.3/libgcc.a
}
#x86
CPU=x86
OPTIMIZE_CFLAGS="-march=$CPU "
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one_r8
I hope I'm doing something wrong rather than this not being possible.
Thanks!
I've been able to compile for the Atom, BUT the GoogleTV has no support for the NDK, which explains why all my attempts of compiling NDK for my GoogleTV device have not work. I hope it's coming soon!
Here's my build script, if it's helpful, I see a few things I have set that you don't seem to which may be part of your problem. I source it from on directory below the ffmpeg source dir (source). I.E. the script is called build.sh and resides in ~/android/ffmpeg, the ffmpeg source is in ~/android/ffmpeg/source and my build output ends up in ~/android/build/armeabi-v7a when I run the script as such:
~/android/ffmpeg$ source build.sh
This is build.sh:
#!/bin/bash
NDK=~/android/ndk
SYSROOT=$NDK/platforms/android-9/arch-arm
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
ABI="armeabi-v7a"
CPU="armv7-a"
ARCH="arm"
FPU="vfpv3-d16"
ANDROID_LIBS=$SYSROOT/usr/lib
DEST="../build/ffmpeg/$ABI"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8 -L$ANDROID_LIBS -Wl,-rpath-link,$ANDROID_LIBS"
EXTRA_CXXFLAGS="-Wno-multichar -Wno-psabi -fno-exceptions -fno-rtti"
EXTRA_CFLAGS="-DANDROID -marm -march=$CPU -mfloat-abi=softfp -mfpu=$FPU"
function configure
{
./configure \
--target-os=linux \
--prefix=$DEST \
--cross-prefix=$TOOLCHAIN \
--sysroot=$SYSROOT \
--extra-cflags="$EXTRA_CFLAGS" \
--extra-ldflags="$EXTRA_LDFLAGS" \
--extra-cxxflags="$EXTRA_CXXFLAGS" \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=$ARCH \
--cpu=$CPU \
--disable-debug \
--disable-runtime-cpudetect \
--disable-optimizations \
--disable-neon \
--disable-network \
--disable-armv5te \
--disable-armv6 \
--disable-armv6t2 \
--disable-armvfp \
--disable-everything \
--disable-doc \
--disable-decoders \
--disable-encoders \
--disable-demuxers \
--disable-muxers \
--disable-protocols \
--disable-indevs \
--disable-filters \
--disable-outdevs \
--disable-bsfs \
--disable-shared \
--disable-ffprobe \
--disable-ffserver \
--disable-avfilter \
--disable-swresample \
--disable-avdevice \
--disable-ffplay \
--disable-ffmpeg \
--disable-swscale-alpha \
--disable-avresample \
--enable-static \
--enable-pthreads \
--enable-protocol=file \
--enable-libvpx \
--enable-decoder=vp8 \
--enable-parser=vp8 \
--enable-demuxer=matroska
}
cd source
make clean &&
configure &&
make -j8 &&
rm -rf $DEST &&
mkdir -p $DEST &&
make install