[x264-devel] Cannot compile on Linux with Intel compiler - proposed patch included
Henrik Gramner
henrik at gramner.com
Mon Nov 24 17:06:00 CET 2014
On Mon, Nov 24, 2014 at 3:02 PM, Mel B <mibintc at live.com> wrote:
> Hello,
> libx264 can't be built with Intel compiler on Linux because there's a typedef for __int32 and __int64 in extras/windowsPorts/basicDataTypeConversions.h . Generally identifiers with double underscore are reserved for the implementation. The Intel compiler predefines types named __int32 and __int64, but gcc does not. I'm including a patch for configure which detects that __int32 is already defined, and then uses preprocessor symbols to elide the typedef which is causing the problem. After these changes were made libx264 build sucessfully with the Intel 15.0 compiler.
>
> Can you tell me the correct place to report this issue? Thanks and regards.
>
> $ cat x264-configure.patch
> *** configure.orig 2014-11-21 16:00:06.241139000 -0500
> --- configure 2014-11-21 16:07:07.891502000 -0500
> ***************
> *** 458,463 ****
> --- 458,471 ----
> fi
>
> libm=""
> +
> + if cc_check '' '' '__int32 i;' ; then
> + define HAVE_INT32
> + fi
> + if cc_check '' '' '__int64 i;' ; then
> + define HAVE_INT64
> + fi
> +
> case $host_os in
> beos*)
> SYS="BEOS"
>
> $ cat basicDataTypeConversions.patch
> *** extras/windowsPorts/orig.basicDataTypeConversions.h 2014-11-21 16:17:30.921339000 -0500
> --- extras/windowsPorts/basicDataTypeConversions.h 2014-11-21 16:10:56.021152000 -0500
> ***************
> *** 8,15 ****
> --- 8,19 ----
> namespace avxsynth {
> #endif // __cplusplus
>
> + #if !HAVE_INT64
> typedef int64_t __int64;
> + #endif // HAVE_INT64
> + #if !HAVE_INT32
> typedef int32_t __int32;
> + #endif // HAVE_INT32
> #ifdef __cplusplus
> typedef bool BOOL;
> #else
>
>
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> https://mailman.videolan.org/listinfo/x264-devel
There's another patch already in the development tree that should get
rid of the problem since it removes that entire file:
http://git.videolan.org/?p=x264/x264-sandbox.git;a=commit;h=22b441b8e02787a7790365b38c1c927faed85f8c
Henrik
More information about the x264-devel
mailing list