Patch fixes 2.5 build error on i386, in ADM_vidFlux.cpp asm, attribute ((used))

Started by nibbles, March 18, 2012, 09:07:26 PM

Previous topic - Next topic

nibbles

EDIT: See the 2nd post for the patch link.

Last December in r7680, my patch was merged for ADM_vidFlux.cpp's CMakeLists to force -O0 because asm symbols were getting optimized out.  That patch was merged (thanks1) and redacted in r7712 (thanks1) in favor of coding with __attribute__ ((used))  ok so groovy, but today an admin from Homebrew did a test compile as we are trying to get my formula pulled into their main Repo, and their build failed on an i386 with a different missing symbol we never knew about.  Please to fix if you have some time?

[ 52%] Building CXX object ADM_videoFilters/FluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o
cd /tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugbuild/ADM_videoFilters/FluxSmooth && /usr/bin/llvm-g++ -DADM_vf_FluxSmooth_EXPORTS -pipe -march=prescott -O2 -ggdb3 -fPIC -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6 -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/avidemux/ADM_libraries/ffmpeg -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/corebuild/config -I/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugins/ADM_videoFilters/FluxSmooth/. -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/avidemux/ADM_core/include -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/avidemux/ADM_coreUI/include -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/avidemux/ADM_coreImage/include -I/private/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/avidemux/ADM_plugin -o CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o -c /tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp
/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp: In member function ââ,¬Ëœvirtual char* ADMVideoFlux::printConf()ââ,¬â,,¢:
/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp:157: warning: format ââ,¬Ëœ%02luââ,¬â,,¢ expects type ââ,¬Ëœlong unsigned intââ,¬â,,¢, but argument 3 has type ââ,¬Ëœuint32_tââ,¬â,,¢
/tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugins/ADM_videoFilters/FluxSmooth/ADM_vidFlux.cpp:157: warning: format ââ,¬Ëœ%02luââ,¬â,,¢ expects type ââ,¬Ëœlong unsigned intââ,¬â,,¢, but argument 4 has type ââ,¬Ëœuint32_tââ,¬â,,¢
Linking CXX shared library libADM_vf_FluxSmooth.dylib
cd /tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugbuild/ADM_videoFilters/FluxSmooth && /usr/local/Cellar/cmake/2.8.7/bin/cmake -E cmake_link_script CMakeFiles/ADM_vf_FluxSmooth.dir/link.txt --verbose=1
/usr/bin/llvm-g++ -pipe -march=prescott -O2 -ggdb3 -dynamiclib -Wl,-headerpad_max_install_names -L/usr/local/Cellar/gettext/0.18.1.1/lib -o libADM_vf_FluxSmooth.dylib -install_name /tmp/homebrew-avidemux-2.5.6-WRGi/avidemux_2.5.6/plugbuild/ADM_videoFilters/FluxSmooth/libADM_vf_FluxSmooth.dylib CMakeFiles/ADM_vf_FluxSmooth.dir/ADM_vidFlux.cpp.o -L/usr/local/Cellar/avidemux/2.5.6/lib -Wl,-read_only_relocs,suppress -lADM_core -lADM_coreUI -lADM_coreImage
Undefined symbols for architecture i386:
  "_scaletab_MMX", referenced from:
      xloop0 in ADM_vidFlux.cpp.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[2]: *** [ADM_videoFilters/FluxSmooth/libADM_vf_FluxSmooth.dylib] Error 1
make[1]: *** [ADM_videoFilters/FluxSmooth/CMakeFiles/ADM_vf_FluxSmooth.dir/all] Error 2
make: *** [all] Error 2



The full error log is here in case it is needed, and many thanks for revisiting this.  It's not as fun as hacking a Kinnect, I know, but we appreciate it.


nibbles

Bumping this after a couple of weeks because the Homebrew admins said my patch fixed the problem on 32bit Snow Leopard.