LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (http://www.linuxquestions.org/questions/arch-29/)
-   -   I am trying to compile x264 on arch linux with an AUR script, yet . . . (http://www.linuxquestions.org/questions/arch-29/i-am-trying-to-compile-x264-on-arch-linux-with-an-aur-script-yet-910874/)

darkstarbyte 10-29-2011 10:37 PM

I am trying to compile x264 on arch linux with an AUR script, yet . . .
 
I am trying to compile x264 on arch linux with an AUR script, yet I am running into some trouble. I am trying to get lavf to be supported, but it seems that it won't include "ffms.h".

Here is the log:

Code:

[branden@localhost x264-devel]# cat config.log
x264 configure script

checking whether gcc works... yes
checking whether gcc supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
checking whether yasm supports vpperm xmm0, xmm0, xmm0, xmm0... yes
checking whether gcc supports __asm__("pabsw %xmm0, %xmm0");... yes
checking for pthread.h... yes
checking for cpu_set_t p_aff; return CPU_COUNT(&p_aff); in sched.h... yes
checking for return log2f(2); in math.h... yes
checking for sws_init_context(0,0,0); in libswscale/swscale.h... yes
checking for av_get_pix_fmt_name(0); in libavutil/pixdesc.h... yes
checking for avformat_find_stream_info(0,0); avcodec_open2(0,0,0); in libavformat/avformat.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -std=gnu99    -L.  -lavformat -lavcodec -lavutil -lswscale    -lm -lpthread -o conftest
conftest.c: In function ‘main’:
conftest.c:2:1: warning: implicit declaration of function ‘avformat_find_stream_info’ [-Wimplicit-function-declaration]
conftest.c:2:1: warning: implicit declaration of function ‘avcodec_open2’ [-Wimplicit-function-declaration]
/tmp/ccAJPgXq.o: In function `main':
conftest.c:(.text+0x14): undefined reference to `avformat_find_stream_info'
conftest.c:(.text+0x2d): undefined reference to `avcodec_open2'
collect2: ld returned 1 exit status
--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <libavformat/avformat.h>
int main () { avformat_find_stream_info(0,0); avcodec_open2(0,0,0); return 0; }
--------------------------------------------------
checking for FFMS_DestroyVideoSource(0); in ffms.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -std=gnu99  -lffms2  -lm -lpthread -o conftest
conftest.c:1:18: fatal error: ffms.h: No such file or directory
compilation terminated.
--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <ffms.h>
int main () { FFMS_DestroyVideoSource(0); return 0; }
--------------------------------------------------
checking for FFMS_DestroyVideoSource(0); in ffms.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -std=gnu99  -lffms2 -lstdc++ -L.  -lavformat -lavcodec -lavutil -lswscale    -lm -lpthread -o conftest
conftest.c:1:18: fatal error: ffms.h: No such file or directory
compilation terminated.
--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <ffms.h>
int main () { FFMS_DestroyVideoSource(0); return 0; }
--------------------------------------------------
checking for -lz... yes
checking for gpac/isomedia.h... yes
checking for gf_isom_set_pixel_aspect_ratio(0,0,0,0,0); in gpac/isomedia.h... yes
checking for gf_malloc(1); gf_free(NULL); in gpac/isomedia.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -std=gnu99    -Werror -lgpac_static -lz  -lswscale -lavutil    -lm -lpthread -o conftest
conftest.c: In function ‘main’:
conftest.c:2:1: error: implicit declaration of function ‘gf_malloc’ [-Werror=implicit-function-declaration]
conftest.c:2:1: error: implicit declaration of function ‘gf_free’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors

--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <gpac/isomedia.h>
int main () { gf_malloc(1); gf_free(NULL); return 0; }
--------------------------------------------------
checking for uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; in stdint.h... yes
checking for -fno-tree-vectorize... yes
checking for fseeko(stdin,0,0); in stdio.h... yes
checking for -Wshadow... yes

platform:      X86_64
system:        LINUX
cli:          yes
libx264:      internal
shared:        no
static:        no
asm:          yes
interlaced:    yes
avs:          no
lavf:          no
ffms:          no
gpac:          yes
gpl:          yes
thread:        posix
filters:      resize crop select_every
debug:        no
gprof:        no
strip:        no
PIC:          no
visualize:    no
bit depth:    8
chroma format: all


weibullguy 10-30-2011 06:41 AM

Code:

conftest.c:1:18: fatal error: ffms.h: No such file or directory
Which is provided by ffmpeg. Do you have ffmpeg installed?

darkstarbyte 10-30-2011 05:36 PM

Quote:

Originally Posted by weibullguy (Post 4511715)
Code:

conftest.c:1:18: fatal error: ffms.h: No such file or directory
Which is provided by ffmpeg. Do you have ffmpeg installed?

I have it installed. The only reason I want the lavf feature is because I want my shell script to work.

Code:

#!/bin/bash


EXT=(*.avi)

for i in "${EXT[@]}"; do ffmpeg -i "$i" \
-acodec libvorbis -vn -ab 128k \
"${i%.*}.ogg"; \
x264 --preset veryslow --tune animation \
--no-fast-pskip --crf 17 \
-o "${i%.*}.264" "$i"; \
mkvmerge -o "${i%.*}.mkv" \
"${i%.*}.264" "${i%.*}.ogg";done

exit 0


weibullguy 10-30-2011 07:21 PM

Where is ffms.h installed? Is it installed in a non-standard directory such that it's not being found?

darkstarbyte 10-30-2011 07:43 PM

Where ever arch installed it, but maybe I should reinstall it; and it could this problem that I am having with x264.

EDIT: I reinstalled it and it did not help.

weibullguy 10-30-2011 08:15 PM

My bad, I assumed ffms.h was provided by ffmpeg. It's actually provided by FFmpegSource (FFMS). FFmpegSource is available in AUR.

darkstarbyte 10-30-2011 11:15 PM

My goal of getting lavf support is not complete. It still is not supported. Here is the config.log if someone can tell me what I did wrong, and what I can install.

Code:

[branden@localhost x264]$ cat config.log
x264 configure script

checking whether gcc works... yes
checking whether gcc supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
checking whether yasm supports vfmaddps xmm0, xmm0, xmm0, xmm0... yes
checking whether gcc supports __asm__("pabsw %xmm0, %xmm0");... yes
checking for pthread.h... yes
checking for cpu_set_t p_aff; return CPU_COUNT(&p_aff); in sched.h... yes
checking for return log2f(2); in math.h... yes
checking for sws_init_context(0,0,0); in libswscale/swscale.h... yes
checking for av_get_pix_fmt_name(0); in libavutil/pixdesc.h... yes
checking for avformat_find_stream_info(0,0); avcodec_open2(0,0,0); in libavformat/avformat.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -std=gnu99    -L.  -lavformat -lavcodec -lavutil -lswscale    -lm -lpthread -o conftest
conftest.c: In function ‘main’:
conftest.c:2:1: warning: implicit declaration of function ‘avformat_find_stream_info’ [-Wimplicit-function-declaration]
conftest.c:2:1: warning: implicit declaration of function ‘avcodec_open2’ [-Wimplicit-function-declaration]
/tmp/ccbJ80ns.o: In function `main':
conftest.c:(.text+0x14): undefined reference to `avformat_find_stream_info'
conftest.c:(.text+0x2d): undefined reference to `avcodec_open2'
collect2: ld returned 1 exit status
--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <libavformat/avformat.h>
int main () { avformat_find_stream_info(0,0); avcodec_open2(0,0,0); return 0; }
--------------------------------------------------
checking for FFMS_DestroyVideoSource(0); in ffms.h... yes
checking whether FFMS_VERSION >= ((2 << 24) | (14 << 16) | (0 << 8) | 0) is true... yes
checking for -lz... yes
checking for gpac/isomedia.h... yes
checking for gf_isom_set_pixel_aspect_ratio(0,0,0,0,0); in gpac/isomedia.h... yes
checking for gf_malloc(1); gf_free(NULL); in gpac/isomedia.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c  -Wall -I. -std=gnu99      -Werror -lgpac_static -lz  -lffms2 -lz -lavformat -lavcodec -lswscale -lavutil    -lswscale -lavutil    -lm -lpthread -o conftest
conftest.c: In function ‘main’:
conftest.c:2:1: error: implicit declaration of function ‘gf_malloc’ [-Werror=implicit-function-declaration]
conftest.c:2:1: error: implicit declaration of function ‘gf_free’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors

--------------------------------------------------
Failed program was:
--------------------------------------------------
#include <gpac/isomedia.h>
int main () { gf_malloc(1); gf_free(NULL); return 0; }
--------------------------------------------------
checking for uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; in stdint.h... yes
checking for -fno-tree-vectorize... yes
checking for fseeko(stdin,0,0); in stdio.h... yes
checking for -Wshadow... yes

platform:      X86_64
system:        LINUX
cli:          yes
libx264:      internal
shared:        no
static:        no
asm:          yes
interlaced:    yes
avs:          no
lavf:          no
ffms:          yes
gpac:          yes
gpl:          yes
thread:        posix
filters:      resize crop select_every
debug:        no
gprof:        no
strip:        no
PIC:          no
visualize:    no
bit depth:    8
chroma format: all


weibullguy 10-31-2011 07:04 PM

The ffmpeg package is using an older version of ffmpeg. Those errors are associated with calls to deprecated functions. You need to install x264-git, then ffmpeg-git, then x264-git again. The second x264-git build should include lavf support.

darkstarbyte 11-05-2011 06:47 PM

It worked.


All times are GMT -5. The time now is 06:55 PM.