Opened 9 years ago
Closed 8 years ago
#3368 closed defect (fixed)
FATE tests don't build when SDL is installed. (mingw/windows)
Reported by: | Greg Wolfe | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | git-master | Keywords: | fate sdl |
Cc: | timothygu99@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description (last modified by )
Have the latest git on a Win7/32-bit system with MinGW-32/msys environment. Downloaded, built, and installed SDL. After successfully building ffmpeg, attempted to "make fate" and got the following error:
make fate SAMPLES=fate-suite/ CC libavcodec/fft-test.o <command-line>:0:6: error: no previous prototype for 'SDL_main' [-Werror=missing-prototypes] c:/Data/ffmpeg/libavcodec/fft-test.c:243:5: note: in expansion of macro 'main' int main(int argc, char **argv) ^ cc1.exe: some warnings being treated as errors make: *** [libavcodec/fft-test.o] Error 1
A little research showed this to be the same problem as described in ticket #256. Applied same change and the problem was resolved. However, the same problem exists in a number of source files. Here is the list of files to which I applied the change to get the FATE regression tests to build and run:
libavcodec/dct-test.c
libavcodec/fft-test.c
libavcodec/golomb-test.c
libavcodec/iirfilter.c
libavcodec/rangecoder.c
libavdevice/timefilter.c
libavfilter/drawutils.c
libavfilter/filtfmts.c
libavfilter/formats.c
libavformat/noproxy-test.c
libavformat/seek-test.c
libavformat/srtp.c
libavformat/url-test.c
libavutil/adler32.c
libavutil/aes.c
libavutil/atomic.c
libavutil/avstring.c
libavutil/base64.c
libavutil/blowfish.c
libavutil/bprint.c
libavutil/cpu.c
libavutil/crc.c
libavutil/des.c
libavutil/error.c
libavutil/eval.c
libavutil/fifo.c
libavutil/hmac.c
libavutil/integer.c
libavutil/lfg.c
libavutil/lls1.c
libavutil/lls2.c
libavutil/lzo.c
libavutil/md5.c
libavutil/murmur3.c
libavutil/opt.c
libavutil/parseutils.c
libavutil/pca.c
libavutil/random_seed.c
libavutil/rational.c
libavutil/ripemd.c
libavutil/sha.c
libavutil/sha512.c
libavutil/softfloat.c
libavutil/tree.c
libavutil/utf8.c
libavutil/xtea.c
Maybe it would be easier to fix this in the Makefile?
Greg W.
Change History (5)
comment:1 by , 9 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Keywords: | fate sdl added |
comment:2 by , 9 years ago
comment:3 by , 9 years ago
I tried adding -Umain to the specified line in library.mak and got the same error.
I emailed a while back with my current solution, but I guess I should have documented it here. The following "make" command line resolves the problem:
make fate SAMPLES=fate-suite/ CC_C="-c -Umain"
Tbe response to this was something like "ok, but it would be nice to have a solution that worked out of the box instead of having to use a custom make command line." I agree.
comment:4 by , 8 years ago
Summary: | FATE tests don't build when SDL is installed. → FATE tests don't build when SDL is installed. (mingw/windows) |
---|
Is this issue still occuring ?
comment:5 by , 8 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
in
library.mak, DTEST is added to build the tests
$(TESTOBJS) $(TESTOBJS:.o=.i): CPPFLAGS += -DTEST
please try to remove the -Dmain or add -Umain or someting there