Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update libyuv - add to osx #1280

Closed
totaam opened this issue Aug 7, 2016 · 11 comments
Closed

update libyuv - add to osx #1280

totaam opened this issue Aug 7, 2016 · 11 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 7, 2016

Issue migrated from trac ticket # 1280

component: packaging | priority: minor | resolution: fixed

2016-08-07 04:43:39: antoine created the issue


It seems that they've moved from http://libyuv.googlecode.com (now 404) to [https://chromium.googlesource.com/libyuv/libyuv/].
And there are no releases either...
But we probably want newer versions (faster, more platform support).

To be included in #678 and #840.

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2016

2016-08-21 10:55:50: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2017

2017-02-08 09:42:42: antoine changed title from update libyuv to update libyuv - add to osx

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2017

2017-02-08 09:42:42: antoine commented


The win32 work is already documented in #678#comment:40 (though we should probably make a PKGBUILD for it).

For OSX, this should be added to the moduleset:

git clone https://chromium.googlesource.com/libyuv/libyuv
wget https://xpra.org/trac/raw-attachment/ticket/678/libyuv-nojpeg.patch
patch -p1 < libyuv-nojpeg.patch
cmake -DCMAKE_INSTALL_PREFIX:PATH=${JHBUILD_PREFIX}
make && make install
#generate a pkgconfig file:
cat > /Users/osx/gtk/inst/lib/pkgconfig/libyuv.pc <<EOF
prefix=${JHBUILD_PREFIX}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: libyuv
Description: YUV conversion and scaling functionality library
Version: 0
Libs: -lyuv -ljpeg
EOF

@totaam
Copy link
Collaborator Author

totaam commented Mar 6, 2017

2017-03-06 22:24:56: smo commented


r15230 adds libyuv and repo

The libyuv-nojpeg.patch doesn't apply properly anymore. It is easy to fix but could cause issues.

The real problem is there is no way to apply patches in jhbuild using source from git.

We should be able to compile with jpeg support. Maybe we can fix this somehow.

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2017

2017-03-28 01:05:21: smo commented


cmake -DCMAKE_INSTALL_PREFIX=/Users/build/gtk/inst -DCMAKE_INSTALL_LIBDIR=lib   /Users/build/gtk/source/libyuv-cb9a58f25fbdf8382d68680f022959022f746ef2
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found JPEG: /Users/build/gtk/inst/lib/libjpeg.dylib

We can see it finds our library but something during the link phase is failing.

/Users/build/gtk/inst/bin/cmake -E cmake_link_script CMakeFiles/yuv_shared.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/usr/bin/g++  -arch x86_64 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9 -dynamiclib -Wl,-headerpad_max_install_names  -L/Users/build/gtk/inst/lib -L/Users/build/gtk/inst/lib -arch x86_64 -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9 -Wl,-headerpad_max_install_names -o libyuv.dylib -install_name /Users/build/gtk/source/libyuv-cb9a58f25fbdf8382d68680f022959022f746ef2/libyuv.dylib CMakeFiles/yuv_shared.dir/source/compare.cc.o CMakeFiles/yuv_shared.dir/source/compare_common.cc.o CMakeFiles/yuv_shared.dir/source/compare_gcc.cc.o CMakeFiles/yuv_shared.dir/source/compare_neon.cc.o CMakeFiles/yuv_shared.dir/source/compare_neon64.cc.o CMakeFiles/yuv_shared.dir/source/compare_win.cc.o CMakeFiles/yuv_shared.dir/source/convert.cc.o CMakeFiles/yuv_shared.dir/source/convert_argb.cc.o CMakeFiles/yuv_shared.dir/source/convert_from.cc.o CMakeFiles/yuv_shared.dir/source/convert_from_argb.cc.o CMakeFiles/yuv_shared.dir/source/convert_jpeg.cc.o CMakeFiles/yuv_shared.dir/source/convert_to_argb.cc.o CMakeFiles/yuv_shared.dir/source/convert_to_i420.cc.o CMakeFiles/yuv_shared.dir/source/cpu_id.cc.o CMakeFiles/yuv_shared.dir/source/mjpeg_decoder.cc.o CMakeFiles/yuv_shared.dir/source/mjpeg_validate.cc.o CMakeFiles/yuv_shared.dir/source/planar_functions.cc.o CMakeFiles/yuv_shared.dir/source/rotate.cc.o CMakeFiles/yuv_shared.dir/source/rotate_any.cc.o CMakeFiles/yuv_shared.dir/source/rotate_argb.cc.o CMakeFiles/yuv_shared.dir/source/rotate_common.cc.o CMakeFiles/yuv_shared.dir/source/rotate_dspr2.cc.o CMakeFiles/yuv_shared.dir/source/rotate_gcc.cc.o CMakeFiles/yuv_shared.dir/source/rotate_msa.cc.o CMakeFiles/yuv_shared.dir/source/rotate_neon.cc.o CMakeFiles/yuv_shared.dir/source/rotate_neon64.cc.o CMakeFiles/yuv_shared.dir/source/rotate_win.cc.o CMakeFiles/yuv_shared.dir/source/row_any.cc.o CMakeFiles/yuv_shared.dir/source/row_common.cc.o CMakeFiles/yuv_shared.dir/source/row_dspr2.cc.o CMakeFiles/yuv_shared.dir/source/row_gcc.cc.o CMakeFiles/yuv_shared.dir/source/row_msa.cc.o CMakeFiles/yuv_shared.dir/source/row_neon.cc.o CMakeFiles/yuv_shared.dir/source/row_neon64.cc.o CMakeFiles/yuv_shared.dir/source/row_win.cc.o CMakeFiles/yuv_shared.dir/source/scale.cc.o CMakeFiles/yuv_shared.dir/source/scale_any.cc.o CMakeFiles/yuv_shared.dir/source/scale_argb.cc.o CMakeFiles/yuv_shared.dir/source/scale_common.cc.o CMakeFiles/yuv_shared.dir/source/scale_dspr2.cc.o CMakeFiles/yuv_shared.dir/source/scale_gcc.cc.o CMakeFiles/yuv_shared.dir/source/scale_msa.cc.o CMakeFiles/yuv_shared.dir/source/scale_neon.cc.o CMakeFiles/yuv_shared.dir/source/scale_neon64.cc.o CMakeFiles/yuv_shared.dir/source/scale_win.cc.o CMakeFiles/yuv_shared.dir/source/video_common.cc.o 
Undefined symbols for architecture x86_64:
  "_jpeg_CreateDecompress", referenced from:
      libyuv::MJpegDecoder::MJpegDecoder() in mjpeg_decoder.cc.o
  "_jpeg_abort_decompress", referenced from:
      libyuv::MJpegDecoder::UnloadFrame() in mjpeg_decoder.cc.o
      libyuv::MJpegDecoder::FinishDecode() in mjpeg_decoder.cc.o
  "_jpeg_destroy_decompress", referenced from:
      libyuv::MJpegDecoder::~MJpegDecoder() in mjpeg_decoder.cc.o
  "_jpeg_read_header", referenced from:
      libyuv::MJpegDecoder::LoadFrame(unsigned char const*, unsigned long) in mjpeg_decoder.cc.o
  "_jpeg_read_raw_data", referenced from:
      libyuv::MJpegDecoder::DecodeImcuRow() in mjpeg_decoder.cc.o
  "_jpeg_resync_to_restart", referenced from:
      libyuv::MJpegDecoder::MJpegDecoder() in mjpeg_decoder.cc.o
  "_jpeg_start_decompress", referenced from:
      libyuv::MJpegDecoder::StartDecode() in mjpeg_decoder.cc.o
  "_jpeg_std_error", referenced from:
      libyuv::MJpegDecoder::MJpegDecoder() in mjpeg_decoder.cc.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]: *** [libyuv.dylib] Error 1
make[1]: *** [CMakeFiles/yuv_shared.dir/all] Error 2
make: *** [all] Error 2

We can just apply the patch and remove this jpg support which is what I plan to do since we don't use it but it would be nice if we didn't have to.

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2017

2017-03-28 01:19:13: smo changed owner from smo to antoine

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2017

2017-03-28 01:19:13: smo commented


r15432 adds the patch for libyuv
r15433 changes the libyuv entry to xpra.org source snapshot
r15434 adds libyuv to the meta module

This works for me can you try it and close this if its okay.

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2017

2017-03-28 05:01:59: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2017

2017-03-28 05:01:59: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2017

2017-03-28 05:01:59: antoine commented


Worked fine - once I figured out that my ongoing problems with the command line tools were caused by this line:

setup_sdk(target="10.10", sdk_version="10.11", architectures=["x86_64"])

Temporarily switching to

setup_sdk(target="10.11", sdk_version="10.11", architectures=["x86_64"])

Allowed me to build.

@totaam totaam closed this as completed Mar 28, 2017
@totaam
Copy link
Collaborator Author

totaam commented Oct 11, 2018

2018-10-11 09:37:22: antoine commented


Edited comment:2 because newer versions of libyuv require -ljpeg.
(ie: the version shipped with Fedora 29 does)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant