Opened 3 years ago

Closed 3 years ago

#9819 closed defect (fixed)

DeckLink build error, regression from cc5844 commit?

Reported by: laurfb Owned by:
Priority: normal Component: avdevice
Version: git-master Keywords: decklink
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi. Have some trouble building ffmpeg with decklink option.
Seems to be related to cc5844 ffmpeg commit (https://github.com/FFmpeg/FFmpeg/commit/cc5844da988fb7ca1051775a3dac43de77bf3881)

Using media_autobuild_suite with "enable-decklink" option active I've got this error message:

E:/AB_Suite/local64/include/DeckLinkAPI.h:20309:28: warning: redundant redeclaration of 'void BSTR_UserFree(ULONG*, OLECHAR**)' in same scope [-Wredundant-decls]
20309 | void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);
      |                            ^~~~~~~~~~~~~
E:/AB_Suite/msys64/mingw64/include/propidl.h:1122:28: note: previous declaration of 'void BSTR_UserFree(ULONG*, OLECHAR**)'
 1122 | void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);
      |                            ^~~~~~~~~~~~~
E:/AB_Suite/build/ffmpeg-git/libavdevice/decklink_common.cpp: In function 'int ff_decklink_set_configs(AVFormatContext*, decklink_direction_t)':
E:/AB_Suite/build/ffmpeg-git/libavdevice/decklink_common.cpp:187:58: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
  187 |             if (ctx->duplex_mode < 0 || ctx->duplex_mode >= FF_ARRAY_ELEMS(decklink

Use headers from v11.6 decklink SDK.

regards,
laurfb

Change History (2)

comment:1 by Christopher Degawa, 3 years ago

You seem to be missing the actual line that has the error, it may be better to attach the full make log in the future

CXX	libavdevice/decklink_common.o
cc1plus.exe: warning: command-line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wmissing-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command-line option '-Wno-pointer-sign' is valid for C/ObjC but not for C++
cc1plus.exe: warning: '-Werror=' argument '-Werror=implicit-function-declaration' is not valid for C++
cc1plus.exe: warning: '-Werror=' argument '-Werror=missing-prototypes' is not valid for C++
cc1plus.exe: warning: command-line option '-std=c11' is valid for C/ObjC but not for C++
In file included from D:/media-autobuild_suite/build/ffmpeg-git/libavformat/os_support.h:175,
                 from D:/media-autobuild_suite/build/ffmpeg-git/libavformat/internal.h:30,
                 from D:/media-autobuild_suite/build/ffmpeg-git/libavdevice/decklink_common.cpp:25:
D:/media-autobuild_suite/build/ffmpeg-git/libavutil/wchar_filename.h: In function 'int wchartocp(unsigned int, const wchar_t*, char**)':
D:/media-autobuild_suite/build/ffmpeg-git/libavutil/wchar_filename.h:57:32: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
   57 |     *filename = av_malloc_array(num_chars, sizeof *filename);
      |                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |
      |                                void*

This could be "solved" by -fpermissive or if C++ could "git gud" and accept proper C code, but that probably won't happen anytime soon.

comment:2 by mkver, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.