[x265] [BUG] Mac 10.6.x - Fails to build 32-bit shared library

Terri Kwon tkwon at sorensonmedia.com
Thu May 29 18:56:12 CEST 2014


I am trying to build 32-bit shared library on Mac 10.6.x, and the build
fails.


The two things I've noticed are:

1. I set "CMAKE_OSX_ARCHITECTURES:STRING=i386", but compile commands have
"-arch x86_64".
   In source/CMakeLists.txt, if I comment out the lines 38-41, then
compile commands are with "-arch i386".

# Comment out
#    if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
#        set(X64 1)
#        add_definitions(-DX86_64=1)
#    endif()


2. i386 build generates the function names without leading underscore "_",
but the linker looks for the functions with a leading underscore, and this
makes the i386 build fail.
   (x86_64 build generates the function names with leading "_", so x86_64
build does not have this problem)



[ Error Message ]

Scanning dependencies of target x265-shared
Linking CXX shared library libx265.dylib
ld: warning: in common/CMakeFiles/common.dir/x86/pixel-a.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/const-a.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/cpu-a.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/ssd-a.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/mc-a.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/mc-a2.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/pixel-util8.asm.o, file
was built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/blockcopy8.asm.o, file
was built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/pixeladd8.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/dct8.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/sad-a.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/intrapred8.asm.o, file
was built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/ipfilter8.asm.o, file was
built for unsupported file format which is not the architecture being
linked (i386)
ld: warning: in common/CMakeFiles/common.dir/x86/loopfilter.asm.o, file
was built for unsupported file format which is not the architecture being
linked (i386)
Undefined symbols:
  "_x265_pixel_ssd_64x16_sse4", referenced from:
      _x265_pixel_ssd_64x16_sse4$non_lazy_ptr in asm-primitives.cpp.o
     (maybe you meant: _x265_pixel_ssd_64x16_sse4$non_lazy_ptr)
  "_x265_intra_pred_ang32_26_sse4", referenced from:
      _x265_intra_pred_ang32_26_sse4$non_lazy_ptr in asm-primitives.cpp.o
     (maybe you meant: _x265_intra_pred_ang32_26_sse4$non_lazy_ptr)
  "_x265_intra_pred_ang32_31_sse4", referenced from:
      _x265_intra_pred_ang32_31_sse4$non_lazy_ptr in asm-primitives.cpp.o
     (maybe you meant: _x265_intra_pred_ang32_31_sse4$non_lazy_ptr)
  "_x265_blockcopy_ps_2x8_sse4", referenced from:
      _x265_blockcopy_ps_2x8_sse4$non_lazy_ptr in asm-primitives.cpp.o
     (maybe you meant: _x265_blockcopy_ps_2x8_sse4$non_lazy_ptr)
  "_x265_interp_4tap_horiz_pp_24x32_sse4", referenced from:
      _x265_interp_4tap_horiz_pp_24x32_sse4$non_lazy_ptr in
asm-primitives.cpp.o
     (maybe you meant: _x265_interp_4tap_horiz_pp_24x32_sse4$non_lazy_ptr)
  "_x265_interp_4tap_vert_pp_8x6_sse4", referenced from:
      _x265_interp_4tap_vert_pp_8x6_sse4$non_lazy_ptr in
asm-primitives.cpp.o
     (maybe you meant: _x265_interp_4tap_vert_pp_8x6_sse4$non_lazy_ptr)

   ...
   ...


Thanks.


More information about the x265-devel mailing list