[x264-devel] Cannot compile on Linux with Intel compiler - proposed patch included

Mel B mibintc at live.com
Mon Nov 24 15:02:22 CET 2014


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

 		 	   		  


More information about the x264-devel mailing list