I have my ffmpeg confix. For example:
./configure \
--target-os=darwin \
--arch=armv7s \
--cc='xcrun -sdk iphoneos clang' \
--extra-cflags='-arch armv7s -mios-version-min=7.0' \
--extra-cxxflags='-arch armv7s -mios-version-min=7.0' \
--extra-ldflags='-arch armv7s -mios-version-min=7.0' \
--prefix=armv7s \
--enable-cross-compile \
--disable-doc \
--disable-shared \
--disable-everything \
--enable-static \
--enable-pic \
--disable-muxers \
--enable-muxer=flv \
--disable-demuxers \
--enable-demuxer=h264 \
--disable-parsers \
--enable-parser=h264 \
But in addition I need to use also other code from ffmpeg library like #include "libavcodec/golomb.h". How to add these particular sources to the config or where can I find which sources can I include with which config setting?
Related
I need to compile FFmepg with specific configuration, that support nvidia cuda hardware acceleration.
In order to achive that, I'm compiling the code using the nvidia-cude-10.2 devel docker image.
I want to take the files I compiled and move them to a python alpine docker after which.
question is, if i follow the instructions here
to be exact this part
cd ~/ffmpeg_sources && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-gnutls \
--enable-libaom \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree && \
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r
and than copy the files in the $HOME/bin directory will it be enough?
Should I use cuda container instead of python alpine and install python on it? I'm not sure if the cuda runtime is required after compilation
Ok, After make install you can call FFmpeg from where bindir is set. And you will be good to go.
Using this tutorial I tried to install GCC with OpenACC support but unfortunately when I tried execute 'make' after this command:
$GCC5ROOT/source/gcc/configure \
--prefix= \
--target=nvptx-none \
--enable-as-accelerator-for="$target" \
--enable-languages=c,c++,fortran,lto \
--enable-checking=yes,df,fold,rtl \
--disable-multilib \
--with-sysroot=/nvptx-none \
--with-build-sysroot=$GCC5ROOT/install/nvptx-none \
--with-build-time-tools=$GCC5ROOT/install/nvptx-none/bin \
--disable-sjlj-exceptions \
--enable-newlib-io-long-long \
CC='gcc -m64'\
CXX='g++ -m64'
the following error occurs:
checking for suffix of object files... configure: error: in
`/home/nikos/Desktop/openacc/build/gcc5-accel/nvptx-none/libgcc':
configure: error: cannot compute suffix of object files: cannot
compile
I have OSX 10.11.4, Xcode 7.3.1.
Using make -- calls gcc -- calls clang, I get this error where clang is looking for a file whose name is a space!
Make error 1: clang: error: no such file or directory: ' '.
That is a space!
I have no idea how to fix this. The makefile formatting is correct.
Here is the end of the output from make:
gcc -g -v -Wall -I/usr/local/include -I/opt/local/include -I/Users/m/BioPrep \
-o mod \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: error: no such file or directory: ' '
make: *** [mod] Error 1
======================= Here is the contents of the Makefile:
# This is Makefile with all graphics code removed so that a compilation of mod can proceed
# "MakefileA" has the graphics files present but commented (#) out
CC = gcc
CFLAGS = -g -v -Wall
INCL = -I/usr/local/include -I/opt/local/include -I/Users/prowat/BioPrep
LIBS = -L/usr/local/lib -L/opt/local/lib -lX11 -lforms
mod: model.o \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
../lsoda/liblsoda.a`
cd ../mshell; make objs`
cd ../choosedisp; make objs`
cd ../connectdisps; make objs`
$(CC) $(CFLAGS) $(INCL) \
-o mod \
../mshell/runit0.o \
../mshell/tline.o \
../mshell/getshm.o \
../mshell/callLSODA.o \
../mshell/extras.o \
../mshell/nrutil.o \
../mshell/exten.o \
../choosedisp/choosedisp_main.o \
../choosedisp/choosedisp_cb.o \
../choosedisp/choosedisp_fm.o \
../connectdisps/connectdisps.o \
../connectdisps/opwsock.o \
model.o \
-L../lsoda -llsoda \
$(LIBS) \
-lm
=====================
Please use proper formatting: for code blocks, indent by 4 spaces. The backticks are only used for fixed-width fonts inside normal text.
You may have looked for spaces, but you need to look again. Based on the output make has shown you versus your makefile, it's pretty clear that there is at least one space after the backslash at the end of this line:
../connectdisps/opwsock.o \
You can tell this because if there were no spaces after this backslash then it would be continuing to the next line and make whould show the rest of the compile line:
model.o \
-L../lsoda -llsoda \
$(LIBS) \
-lm
Since those lines are missing from the output make provided, you can be sure that there's something about the opwsock.o line which is preventing make from recognizing the backslash/newline at the end.
I am trying to compile on OS-X gfortran only with the following configuration:
./configure --prefix=${INSTALL_HERE} \
--enable-checking=release \
--disable-stage1-checking \
--enable-languages=fortran \
--disable-cloog-version-check \
--disable-isl-version-check \
--disable-libstdcxx \
--enable-lto \
--disable-nls \
--with-gmp="${GMP_DIR}" \
--with-mpc="${MPC_DIR}" \
--with-mpfr="${MPFR_DIR}" \
--with-cloog="${CLOOG_DIR}" \
--with-isl="${ISL_DIR}"
However the end result is that I have not only gfortran but the whole suite, i.e. C/C++ compilers. Why does it happen considering the fact that I have --enable-languages=fortran?!
I only need gfortran to complement clang on OS-X.
From the gcc-help list:
C & C++ are mandatory for the build procedure.
https://gcc.gnu.org/ml/gcc-help/2015-11/msg00052.html
I'm new to using libtool. However, this problem seems to be weird. Everything is there but the libtool said "libtool: link: 'cuda_transfer.lo' is not a valid libtool object". However, the rule for generating this lo file is right there in the Makefile. Besides, the two header files are also right in where they are supposed to be and do work. Any idea about what is going wrong?
cuda_transfer.lo: particles_cuda.h ../../include/psc_particles_cuda.h
The other two places in Makefile where cuda_transfer.lo appeared are followed
libsubdir_la_DEPENDENCIES = cuda_transfer.lo \
libsubdir_la_LIBADD = \
cuda_transfer.lo \
The .c.lo: segment is following:
.c.lo:
$(AM_V_CC)depbase=`echo $# | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
$(LTCOMPILE) -MT $# -MD -MP -MF $$depbase.Tpo -c -o $# $< &&\
$(am__mv) $$depbase.Tpo $$depbase.Plo
# $(AM_V_CC)source='$<' object='$#' libtool=yes \
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
# $(AM_V_CC_no)$(LTCOMPILE) -c -o $# $<
How to interpret this human-unfriendly code. = =
Below is the code segment suggested by Brett.
noinst_LTLIBRARIES = libsubdir.la
libsubdir_la_SOURCES = \
psc_fields_cuda.c \
psc_particles_cuda.c \
psc_push_particles_cuda.c \
psc_push_fields_cuda.c \
psc_bnd_cuda.c \
psc_bnd_particles_cuda.c \
psc_bnd_fields_cuda.c \
b40c/kernel_utils.h \
b40c/radixsort_kernel_common.h \
b40c/radixsort_key_conversion.h \
b40c/radixsort_reduction_kernel.h \
b40c/radixsort_scanscatter_kernel.h \
b40c/radixsort_scanscatter_kernel3.h \
b40c/radixsort_scanscatter_kernel4.h \
b40c/radixsort_spine_kernel.h \
b40c/vector_types.h \
cuda_common.h \
cuda_sort2.h \
cuda_sort2_spine.h \
particles_cuda.h \
psc_bnd_cuda.h \
psc_bnd_cuda_fields.h \
psc_cuda.h
libsubdir_la_LIBADD = \
cuda_transfer.lo \
cuda_spine.lo \
cuda_sort2.lo \
cuda_sort3.lo \
cuda_exchange_particles.lo \
cuda_exclusive_scan_2.lo \
cuda_push_part_yz_1vb.lo
The only thing that looks like a generating rule about cuda_transfer.lo is
cuda_transfer.lo: particles_cuda.h ../../include/psc_particles_cuda.h
try this:
yum -y install libtool*
then make clean and restart again
Well, it's better not to read configure.ac ever :-) But if you still wish, configure.ac is a combination of m4 preprocessor code and ordinary (bourne) shell snippets. You may check info m4 and info autoconf, the docs are pretty decent.
The hard part of your question, regarding the .lo file. It seems that your makefile contains dependency chain for it, but no explicit build-rules. You may try to locate a common rule for compiling .c -> .lo, like this:
.c.lo:
$(AM_V_CC)$(LTCOMPILE) -MT $# -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $# $<
$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
...
Install latest libtool. Delete the .lo file and use 'make' again.