saloromer / ffmbc

Automatically exported from code.google.com/p/ffmbc
0 stars 0 forks source link

How to compile for windows, i get errors #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. i tried to compile version 0.6rc3 for windows using mingw
2. i tried to cross compile under ubuntu64 following these steps for ffmpeg -> 
http://ffmpeg.arrozcru.org/wiki/index.php?title=Main_Page

What is the expected output? What do you see instead?
I like to see a no errors while compiling/making.
I see something like:

---------------------------------SNIP ---------------------------
helge@helge-desktop:~/FFmbc-0.6-rc3$ make
CC  libavdevice/alldevices.o
CC  libavdevice/avdevice.o
CC  libavdevice/vfwcap.o
AR  libavdevice/libavdevice.a
CC  libavfilter/af_anull.o
CC  libavfilter/allfilters.o
CC  libavfilter/asink_anullsink.o
CC  libavfilter/asrc_anullsrc.o
CC  libavfilter/avfilter.o
libavfilter/avfilter.c:212: warning: 'ff_get_ref_perms_string' defined but not 
used
CC  libavfilter/avfiltergraph.o
CC  libavfilter/defaults.o
CC  libavfilter/formats.o
CC  libavfilter/graphparser.o
CC  libavfilter/libmpcodecs/img_format.o
CC  libavfilter/libmpcodecs/mp_image.o
In file included from libavfilter/libmpcodecs/mp_image.c:32:
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'mem2agpcpy_pic':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:42: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:54: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'memcpy_pic2':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:79: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:91: warning: cast discards 
qualifiers from pointer target type
CC  libavfilter/libmpcodecs/pullup.o
CC  libavfilter/libmpcodecs/vf_2xsai.o
CC  libavfilter/libmpcodecs/vf_blackframe.o
CC  libavfilter/libmpcodecs/vf_boxblur.o
CC  libavfilter/libmpcodecs/vf_cropdetect.o
CC  libavfilter/libmpcodecs/vf_decimate.o
In file included from libavfilter/libmpcodecs/vf_decimate.c:31:
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'mem2agpcpy_pic':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:42: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:54: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'memcpy_pic2':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:79: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:91: warning: cast discards 
qualifiers from pointer target type
CC  libavfilter/libmpcodecs/vf_delogo.o
In file included from libavfilter/libmpcodecs/vf_delogo.c:34:
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'mem2agpcpy_pic':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:42: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:54: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'memcpy_pic2':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:79: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:91: warning: cast discards 
qualifiers from pointer target type
CC  libavfilter/libmpcodecs/vf_denoise3d.o
CC  libavfilter/libmpcodecs/vf_detc.o
In file included from libavfilter/libmpcodecs/vf_detc.c:31:
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'mem2agpcpy_pic':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:42: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:54: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h: In function 'memcpy_pic2':
libavfilter/libmpcodecs/libvo/fastmemcpy.h:79: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/libvo/fastmemcpy.h:91: warning: cast discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/vf_detc.c: At top level:
libavfilter/libmpcodecs/vf_detc.c:390: warning: initialization discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/vf_detc.c:391: warning: initialization discards 
qualifiers from pointer target type
libavfilter/libmpcodecs/vf_detc.c: In function 'parse_args':
libavfilter/libmpcodecs/vf_detc.c:416: error: implicit declaration of function 
'strdup'
libavfilter/libmpcodecs/vf_detc.c:416: warning: assignment makes pointer from 
integer without a cast
make: *** [libavfilter/libmpcodecs/vf_detc.o] Error 1

---------------------------------SNIP END ------------------------

What version of the product are you using? On what operating system?
0.6rc3 windows xp + latest mingw and ubuntu 9.04

How do you compile a working windows version?
regards
Udo Sauer

Original issue reported on code.google.com by fernsehm...@googlemail.com on 9 Mar 2011 at 4:35

GoogleCodeExporter commented 8 years ago
Out of interest - what are your configure options?

I get a working FFmbc-v0.6rc3 on Ubuntu 10.04 with this (although I have to 
edit the output config.mak to remove -Werror=missing-prototypes from the end of 
CFLAGS line 29)

PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig \
./configure \
    --cpu=i686 \
    --arch=i686 \
    --prefix=$PREFIX \
    --target-os=mingw32 \
    --enable-memalign-hack \
    --cross-prefix=i586-mingw32msvc- \
    --extra-cflags='--static -I $PREFIX/include -D_WIN32_WINNT=0x0501' \
    --extra-ldflags='-static -L $PREFIX/lib' \
    --enable-gpl \
    --enable-version3 \
    --enable-nonfree \
    --enable-pthreads \
    --enable-static \
    --disable-shared \
    --enable-libdirac \
    --enable-libfaac \
    --enable-libgsm \
    --enable-libmp3lame \
    --enable-libopenjpeg \
    --enable-libspeex \
    --enable-libtheora \
    --enable-libvorbis \
    --enable-libxvid \
    --enable-libschroedinger \
    --enable-libx264 \
    --enable-libvpx

Original comment by mark.him...@gmail.com on 9 Mar 2011 at 5:02

GoogleCodeExporter commented 8 years ago
This may help you:
http://ffmpeg.arrozcru.org/forum/viewtopic.php?f=1&t=1688
.................
Found a workaround:

adding:

Code: Select all
    static char *strCopy(const char *str)
    {
        int n = strlen(str) + 1;
        char *dup = malloc(n);
        if(dup)
        {
            strcpy(dup, str);
        }
        return dup;
    }

and replacing all the strdup with strCopy calls works,..
...................

Original comment by diado.io...@gmail.com on 9 Mar 2011 at 11:28

GoogleCodeExporter commented 8 years ago
I'll fix this in rc4.

Original comment by baptiste...@gmail.com on 15 Mar 2011 at 7:20

GoogleCodeExporter commented 8 years ago
Is there a windows build?

Original comment by eyeperf...@gmail.com on 1 Apr 2011 at 7:40

GoogleCodeExporter commented 8 years ago
Hi,

I was able to compile ffmbc with mingw under windows.

However I found that using the target xdcamhd422 was configured as 16 bit audio.
The spec for xdcamhd422 is 24 bit audio.

in ffmbc.c i changed the audio codec.

else if(!strcmp(arg, "xdcamhd422")) {
        target = "xdcamhd422";

        opt_video_codec("mpeg2video");
        opt_audio_codec("pcm_s24le");

Next week I will analyse the IMX and xdcamhd files with a profesional media 
analyser. Baton.

Original comment by eyeperf...@gmail.com on 2 Apr 2011 at 3:57

Attachments:

GoogleCodeExporter commented 8 years ago
Should be fixed in rc4, can you please double check ?

Original comment by baptiste...@gmail.com on 1 May 2011 at 12:59

GoogleCodeExporter commented 8 years ago
Hi,
strdup compile error under MinGW seems to be fixed in:
libavfilter/libmpcodecs/vf_detc.c
and
libavfilter/libmpcodecs/vf_divtc.c
BUT left(only) in ffmbc.c :
ffmbc.c:3251:9: error: implicit declaration of function 'strdup'

_____________________________________
ffmbc.c: In function 'term_exit':
ffmbc.c:487:5: warning: zero-length ms_printf format string
ffmbc.c: In function 'opt_vf':
ffmbc.c:3251:9: error: implicit declaration of function 'strdup'
ffmbc.c:3251:18: warning: assignment makes pointer from integer without a cast
ffmbc.c: In function 'opt_audio_sample_fmt':
ffmbc.c:3412:9: warning: passing argument 1 of 'list_fmts' from incompatible 
pointer type
cmdutils.h:160:6: note: expected 'void (*)(char *, int,  int)' but argument is 
of type 'char * (*)(char *, int,  enum AVSampleFormat
)'
make: *** [ffmbc.o] Error 1

Original comment by diado.io...@gmail.com on 1 May 2011 at 10:00

GoogleCodeExporter commented 8 years ago
Arf, sorry about that, I updated the tarball in downloads.

Original comment by baptiste...@gmail.com on 1 May 2011 at 10:22

GoogleCodeExporter commented 8 years ago
Many thanks!
Now compiles without error under MinGW:)

Original comment by diado.io...@gmail.com on 2 May 2011 at 9:14

GoogleCodeExporter commented 8 years ago

Original comment by baptiste...@gmail.com on 2 May 2011 at 6:17