[FFmpeg-cvslog] r19404 - in trunk: common.mak configure

Stefano Sabatini stefano.sabatini-lala
Sun Jul 12 18:02:08 CEST 2009


On date Sunday 2009-07-12 16:22:23 +0100, M?ns Rullg?rd wrote:
> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> 
> > On date Sunday 2009-07-12 15:29:32 +0200, mru wrote:
> >> Author: mru
> >> Date: Sun Jul 12 15:29:32 2009
> >> New Revision: 19404
> >> 
> >> Log:
> >> Separate C preprocessor flags into CPPFLAGS variable
> >> 
> >> Modified:
> >>    trunk/common.mak
> >>    trunk/configure
> >> 
> >> Modified: trunk/common.mak
> >> ==============================================================================
> >> --- trunk/common.mak	Sun Jul 12 15:22:01 2009	(r19403)
> >> +++ trunk/common.mak	Sun Jul 12 15:29:32 2009	(r19404)
> >> @@ -18,16 +18,17 @@ endif
> >>  
> >>  ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
> >>  
> >> -CFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS)
> >> +CPPFLAGS += -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
> >> +CFLAGS := $(OPTFLAGS)
> >>  
> >>  %.o: %.c
> >> -	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> >> +	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> >>  
> >>  %.o: %.S
> >> -	$(AS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> >> +	$(AS) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
> >>  
> >>  %.ho: %.h
> >> -	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
> >> +	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
> >>  
> >>  %.d: %.c
> >>  	$(DEPEND_CMD) > $@
> >
> > This is broken if the user has an installation of FFmpeg in the paths
> > in CPPFLAGS, this way the pre-installed headers are accessed *before*
> > the FFmpeg source headers, resulting in a compilation with the wrong
> > headers.
> 
> Don't do that then.

Why shouldn't I?

> > In particular it fails on my system, when I have:
> 
> [...]
> 
> > My proposal in attachment (BTW the changes to configure caused at
> > least two more compilation errors here).
> 
> Care to elaborate?

Sure.

stefano at geppetto ~/s/ffmpeg> configure --enable-libx264 --enable-gpl
ERROR: libx264 not found

If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
ffmpeg-user at mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
stefano at geppetto ~/s/ffmpeg> tail -n 20 config.err
gcc -I/home/stefano/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/stefano/include -std=c99 -fomit-frame-pointer -E -o /home/stefano/tmp/ffconf.Hus28211.o /home/stefano/tmp/ffconf.WVP28202.c
In file included from /home/stefano/tmp/ffconf.WVP28202.c:1:
/home/stefano/include/x264.h:32:4: warning: #warning You must include stdint.h or inttypes.h before x264.h
check_func x264_encoder_open
check_ld
check_cc
BEGIN /home/stefano/tmp/ffconf.WVP28202.c
    1   extern int x264_encoder_open();
    2   int main(void){ x264_encoder_open(); }
END /home/stefano/tmp/ffconf.WVP28202.c
gcc -I/home/stefano/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/stefano/include -std=c99 -fomit-frame-pointer -c -o /home/stefano/tmp/ffconf.Hus28211.o /home/stefano/tmp/ffconf.WVP28202.c
gcc -L/home/stefano/lib -o /home/stefano/tmp/ffconf.NgN28205 /home/stefano/tmp/ffconf.Hus28211.o -lz -lm -lx264 -lm
/home/stefano/lib/libx264.a(encoder.o): In function `x264_encoder_frame_end':
encoder.c:(.text+0x2d8a): undefined reference to `pthread_join'
/home/stefano/lib/libx264.a(encoder.o): In function `x264_encoder_encode':
encoder.c:(.text+0x3ad3): undefined reference to `pthread_create'
/home/stefano/lib/libx264.a(encoder.o): In function `x264_encoder_close':
encoder.c:(.text+0x4a59): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
ERROR: libx264 not found

Manually adding --enable-pthreads fix it.

stefano at geppetto ~/s/ffmpeg> configure --enable-x11grab --enable-gpl
make
...

gcc -DHAVE_AV_CONFIG_H -I. -I"/home/stefano/src/ffmpeg"
-I/home/stefano/include -I/home/stefano/include -std=c99
-fomit-frame-pointer -g -Wdeclaration-after-statement -Wall
-Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
-O3 -fno-math-errno -fno-signed-zeros -c -o libavdevice/x11grab.o
libavdevice/x11grab.c
In file included from libavdevice/x11grab.c:51:
/usr/include/sys/ipc.h:25:3: warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE"
libavdevice/x11grab.c: In function ?x11grab_read_packet?:
libavdevice/x11grab.c:441: error: storage size of ?ts? isn?t known
libavdevice/x11grab.c:458: warning: implicit declaration of function ?nanosleep?
libavdevice/x11grab.c:441: warning: unused variable ?ts?
make: *** [libavdevice/x11grab.o] Error 1

$ configure:
$ make
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/stefano/src/ffmpeg"
-I/home/stefano/include -I/home/stefano/include -std=c99
-fomit-frame-pointer -g -Wdeclaration-after-statement -Wall
-Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
-O3 -fno-math-errno -fno-signed-zeros -c -o libavformat/udp.o
libavformat/udp.c
libavformat/udp.c: In function ?udp_ipv6_resolve_host?:
libavformat/udp.c:144: error: storage size of ?hints? isn?t known
libavformat/udp.c:160: warning: implicit declaration of function ?getaddrinfo?
libavformat/udp.c:161: warning: implicit declaration of function ?gai_strerror?
libavformat/udp.c:161: warning: format ?%s? expects type ?char *?, but argument 4 has type ?int?
libavformat/udp.c:144: warning: unused variable ?hints?
libavformat/udp.c: In function ?udp_set_url?:
libavformat/udp.c:173: error: dereferencing pointer to incomplete type
libavformat/udp.c:173: error: dereferencing pointer to incomplete type
libavformat/udp.c:174: error: dereferencing pointer to incomplete type
libavformat/udp.c:175: warning: implicit declaration of function ?freeaddrinfo?
libavformat/udp.c: In function ?udp_socket_create?:
libavformat/udp.c:200: error: ?AI_PASSIVE? undeclared (first use in this function)
libavformat/udp.c:200: error: (Each undeclared identifier is reported only once
libavformat/udp.c:200: error: for each function it appears in.)
libavformat/udp.c:203: error: dereferencing pointer to incomplete type
libavformat/udp.c:204: error: dereferencing pointer to incomplete type
libavformat/udp.c:212: error: dereferencing pointer to incomplete type
libavformat/udp.c:212: error: dereferencing pointer to incomplete type
libavformat/udp.c:213: error: dereferencing pointer to incomplete type
libavformat/udp.c: In function ?udp_port?:
libavformat/udp.c:231: warning: implicit declaration of function ?getnameinfo?
libavformat/udp.c:231: error: ?NI_NUMERICSERV? undeclared (first use in this function)
make: *** [libavformat/udp.o] Error 1

> > Index: common.mak
> > ===================================================================
> > --- common.mak	(revision 19415)
> > +++ common.mak	(working copy)
> > @@ -18,7 +18,7 @@
> >  
> >  ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
> >  
> > -CPPFLAGS += -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
> > +CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
> >  
> >  %.o: %.c
> >  	$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $<
> 
> OK.

Applied.



More information about the ffmpeg-cvslog mailing list