r7967 - FluxSmooth breaks compile on OSX with clang -- FIXED

Started by nibbles, May 19, 2012, 08:16:38 PM

Previous topic - Next topic

nibbles

This is a drag, the FluxSmooth plugin won't build with clang, just like in ADM-2.5.  Because I already complained about that, I don't want to hassle you more on this topic because it's an upstream bug in clang, and I don't know what it would take to modify the ADM source to make it work.  If it's all the same, I'm just going to disable that plugin from building on OSX, even though llvm says they fixed it in head.

cf. http://llvm.org/bugs/show_bug.cgi?id=12244

Scanning dependencies of target ADM_vf_FluxSmooth
make -f ADM_videoFilters6/fluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/build.make ADM_videoFilters6/fluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/build
/usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_progress_report /tmp/homebrew-avidemux3-2.6-0XtX/buildPlugCor/CMakeFiles
[ 92%] Building CXX object ADM_videoFilters6/fluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o
cd /tmp/homebrew-avidemux3-2.6-0XtX/buildPlugCor/ADM_videoFilters6/fluxSmooth && /usr/bin/clang++   -DADM_vf_FluxSmooth_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DADM_MINIMAL_UI_INTERFACE -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -g -O0 -g -fPIC -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_core/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreAudioFilter/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreAudioParser/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreAudio/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreAudioDevice/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreAudioEncoder/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreDemuxer/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreDemuxerMpeg/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreImage/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreMuxer/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreScript/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreUI/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreUtils/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreVideoEncoder/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreVideoFilter/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreVideoCodec/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreImageLoader/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_core/ADM_coreJobs/include -I/usr/local/Cellar/avidemux3/2.6/include/avidemux/2.6 -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/ADM_muxerGate/include -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/../common -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/../common/ADM_audioFilter/include -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/../common/ADM_commonUI -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/../common/ADM_videoFilter2/include -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/../common/ADM_videoEncoder/include -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/../common/ADM_editor/include -I/private/tmp/homebrew-avidemux3-2.6-0XtX/ffmpeg -I/tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/ADM_videoFilters6/fluxSmooth/.    -o CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o -c /tmp/homebrew-avidemux3-2.6-0XtX/avidemux_plugins/ADM_videoFilters6/fluxSmooth/ADM_vidFlux.cpp
fatal error: error in backend: Couldn't allocate input reg for constraint '{_l_src_pitch}'!
make[2]: *** [ADM_videoFilters6/fluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o] Error 1
make[1]: *** [ADM_videoFilters6/fluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/all] Error 2
make: *** [all] Error 2



nibbles

I was able to verify that the clang bug with FluxSmooth is fixed in clang-3.2svn because I can build 2.6 with it.  So when Mt Lion 10.8.0 comes out next month with the new clang, this will be a resolved.  For now I'll have to turn off FluxSmooth though.  Sorry if that's a pain for anyone.

mean


nibbles

Oh I didn't see you had made a new commit.  Using clang-3.1, and
testing against r7970, it compiles but won't link at -O2 or -Os.
Everyting works at -O0, though.  I pasted the new error below.

Maybe there is some place you can add __attribute__ ((used))?


Linking CXX shared library libADM_vf_FluxSmooth.dylib
cd /tmp/homebrew-avidemux3-2.6-0lky/buildPlugCor/ADM_videoFilters6/fluxSmooth && /usr/local/Cellar/cmake/2.8.8/bin/cmake -E cmake_link_script CMakeFiles/ADM_vf_FluxSmooth.dir/link.txt --verbose=1
/usr/bin/clang++  -Os -pipe -march=native -Xclang -target-feature -Xclang -aes -Qunused-arguments -shared  -L/usr/local/Cellar/gettext/0.18.1.1/lib -o libADM_vf_FluxSmooth.dylib -install_name /tmp/homebrew-avidemux3-2.6-0lky/buildPlugCor/ADM_videoFilters6/fluxSmooth/libADM_vf_FluxSmooth.dylib CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFluxAsm.cpp.o -L/usr/local/Cellar/avidemux3/2.6/lib -lADM_core6 -lADM_coreUI6 -lADM_coreVideoFilter6 -lADM_coreImage6 -lADM_coreUtils6 -lm
Undefined symbols for architecture x86_64:
  "_l_currp", referenced from:
      ADMVideoFlux::DoFilter_MMX(unsigned char*, unsigned char*, unsigned char*, int, unsigned char*, int, int, int, fluxsmooth const&) in ADM_vidFluxAsm.cpp.o
  "_l_destp", referenced from:
      ADMVideoFlux::DoFilter_MMX(unsigned char*, unsigned char*, unsigned char*, int, unsigned char*, int, int, int, fluxsmooth const&) in ADM_vidFluxAsm.cpp.o
  "_l_prevp", referenced from:
      xloop0 in ADM_vidFluxAsm.cpp.o
  "_l_nextp", referenced from:
      xloop0 in ADM_vidFluxAsm.cpp.o
  "scaletab_MMX", referenced from:
      xloop0 in ADM_vidFluxAsm.cpp.o
  "ycnt", referenced from:
      xloop0 in ADM_vidFluxAsm.cpp.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[2]: *** [ADM_videoFilters6/fluxSmooth/libADM_vf_FluxSmooth.dylib] Error 1
make[1]: *** [ADM_videoFilters6/fluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/all] Error 2
make: *** [all] Error 2

nibbles

Testing at r7980 this problem is fixed, and I can compile everything again on OSX using clang or llvm-gcc.  Thanks!