Opened 6 years ago

Closed 4 years ago

#4918 closed defect (invalid)

SSSE3 compilation for vp9 fails with nasm on OS X

Reported by: Carl Eugen Hoyos Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: vp9
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

As reported in ticket #4916, current git head fails to compile on OS X if nasm 2.11.08 assembler is used.

$ make V=1
gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,-dynamic,-search_paths_first -Qunused-arguments   -o ffmpeg_g cmdutils.o ffmpeg_opt.o ffmpeg_filter.o ffmpeg.o  ffmpeg_videotoolbox.o -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -framework QTKit -framework Foundation -framework QuartzCore -framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia -framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework QuartzCore -framework CoreServices -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore -framework CoreServices -liconv -Wl,-framework,CoreFoundation -Wl,-framework,Security -framework CoreGraphics -lm -lbz2 -lz -pthread  
ld: warning: directory not found for option '-Llibavresample'
Undefined symbols for architecture x86_64:
  "_ff_filters_ssse3", referenced from:
      _put_8tap_smooth_64hv_8_ssse3 in libavcodec.a(vp9dsp_init.o)
      _put_8tap_regular_64hv_8_ssse3 in libavcodec.a(vp9dsp_init.o)
      _put_8tap_sharp_64hv_8_ssse3 in libavcodec.a(vp9dsp_init.o)
      _put_8tap_smooth_64v_8_ssse3 in libavcodec.a(vp9dsp_init.o)
      _put_8tap_regular_64v_8_ssse3 in libavcodec.a(vp9dsp_init.o)
      _put_8tap_sharp_64v_8_ssse3 in libavcodec.a(vp9dsp_init.o)
      _put_8tap_smooth_64h_8_ssse3 in libavcodec.a(vp9dsp_init.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ffmpeg_g] Error 1

The reason is that nasm fails to output ff_filters_ssse3 in vp9mc.o:

$ make V=1 libavcodec/x86/vp9mc.o
nasm -f macho64  -DPIC -DPREFIX -I./ -Pconfig.asm -I libavcodec/x86/ -M -o libavcodec/x86/vp9mc.o libavcodec/x86/vp9mc.asm > libavcodec/x86/vp9mc.d
nasm -f macho64  -DPIC -DPREFIX -I./ -Pconfig.asm -I libavcodec/x86/ -o libavcodec/x86/vp9mc.o libavcodec/x86/vp9mc.asm
strip -x -x libavcodec/x86/vp9mc.o
$ nm libavcodec/x86/vp9mc.o 
00000000000046db S _ff_filters_16bpp
000000000000305b S _ff_filters_sse2
                 U _ff_pw_256
                 U _ff_pw_64
0000000000001990 T _ff_vp9_avg128_16_avx2
0000000000001850 T _ff_vp9_avg128_16_sse2
0000000000001750 T _ff_vp9_avg16_16_sse2
0000000000001480 T _ff_vp9_avg16_8_sse2
00000000000018e0 T _ff_vp9_avg32_16_avx2
00000000000017b0 T _ff_vp9_avg32_16_sse2
0000000000001650 T _ff_vp9_avg32_8_avx2
00000000000014e0 T _ff_vp9_avg32_8_sse2
00000000000012f0 T _ff_vp9_avg4_8_mmxext
0000000000001940 T _ff_vp9_avg64_16_avx2
0000000000001800 T _ff_vp9_avg64_16_sse2
00000000000016b0 T _ff_vp9_avg64_8_avx2
0000000000001530 T _ff_vp9_avg64_8_sse2
0000000000001700 T _ff_vp9_avg8_16_mmxext
0000000000001340 T _ff_vp9_avg8_8_mmxext
0000000000000650 T _ff_vp9_avg_8tap_1d_h_16_8_ssse3
0000000000000810 T _ff_vp9_avg_8tap_1d_h_32_8_avx2
00000000000000a0 T _ff_vp9_avg_8tap_1d_h_4_8_mmxext
00000000000003a0 T _ff_vp9_avg_8tap_1d_h_4_8_ssse3
0000000000000240 T _ff_vp9_avg_8tap_1d_h_8_8_sse2
00000000000004c0 T _ff_vp9_avg_8tap_1d_h_8_8_ssse3
0000000000000fb0 T _ff_vp9_avg_8tap_1d_v_16_8_ssse3
0000000000001190 T _ff_vp9_avg_8tap_1d_v_32_8_avx2
0000000000000990 T _ff_vp9_avg_8tap_1d_v_4_8_mmxext
0000000000000cd0 T _ff_vp9_avg_8tap_1d_v_4_8_ssse3
0000000000000b50 T _ff_vp9_avg_8tap_1d_v_8_8_sse2
0000000000000e00 T _ff_vp9_avg_8tap_1d_v_8_8_ssse3
0000000000001610 T _ff_vp9_put128_avx
0000000000001430 T _ff_vp9_put128_sse
0000000000001390 T _ff_vp9_put16_sse
0000000000001580 T _ff_vp9_put32_avx
00000000000013d0 T _ff_vp9_put32_sse
0000000000001270 T _ff_vp9_put4_mmx
00000000000015d0 T _ff_vp9_put64_avx
0000000000001400 T _ff_vp9_put64_sse
00000000000012b0 T _ff_vp9_put8_mmx
0000000000000560 T _ff_vp9_put_8tap_1d_h_16_8_ssse3
0000000000000740 T _ff_vp9_put_8tap_1d_h_32_8_avx2
0000000000000000 T _ff_vp9_put_8tap_1d_h_4_8_mmxext
0000000000000330 T _ff_vp9_put_8tap_1d_h_4_8_ssse3
0000000000000150 T _ff_vp9_put_8tap_1d_h_8_8_sse2
0000000000000420 T _ff_vp9_put_8tap_1d_h_8_8_ssse3
0000000000000eb0 T _ff_vp9_put_8tap_1d_v_16_8_ssse3
00000000000010b0 T _ff_vp9_put_8tap_1d_v_32_8_avx2
00000000000008e0 T _ff_vp9_put_8tap_1d_v_4_8_mmxext
0000000000000c50 T _ff_vp9_put_8tap_1d_v_4_8_ssse3
0000000000000a50 T _ff_vp9_put_8tap_1d_v_8_8_sse2
0000000000000d50 T _ff_vp9_put_8tap_1d_v_8_8_ssse3

Without stripping, nm shows the symbol _ff_filters_ssse3 but compilation still fails with the same error message.

Change History (4)

comment:1 by Carl Eugen Hoyos, 6 years ago

Description: modified (diff)

comment:2 by Carl Eugen Hoyos, 6 years ago

Reproducible both with current nasm 2.11.08 (and 2.11.09rc1)and the default OS X nasm version 0.98.40.

Last edited 6 years ago by Carl Eugen Hoyos (previous) (diff)

comment:3 by Elon Musk, 4 years ago

i think this have been resolved.

comment:4 by Carl Eugen Hoyos, 4 years ago

Resolution: invalid
Status: newclosed

This used to be a bug in nasm that was resolved since.

Note: See TracTickets for help on using tickets.