Xpra: Ticket #1787: 2.4 moduleset updates

Follow up from #1678.

Log URL: log/xpra/trunk/osx



Sun, 01 Apr 2018 12:04:54 GMT - Antoine Martin: status, description changed


Mon, 07 May 2018 05:39:26 GMT - Antoine Martin: summary, version, milestone changed


Thu, 10 May 2018 09:45:23 GMT - Antoine Martin:

Updated:


Mon, 21 May 2018 05:18:10 GMT - Antoine Martin:


Mon, 28 May 2018 06:54:59 GMT - Antoine Martin: description changed

Updated:


Thu, 21 Jun 2018 06:54:24 GMT - Antoine Martin: owner, status changed

r19672 updates to ffmpeg 4.0.1 and I now hit a problem during packaging:

calling 'gtk-mac-bundler Xpra.bundle' in /Users/osx/Xpra-svn/trunk/osx
Cannot find source to copy: /Users/osx/gtk/inst/_jhbuild/root-ffmpeg/Users/osx/gtk/inst/lib/libavcodec.58.dylib
ERROR: gtk-mac-bundler failed

That's because the library dependency is wrong on all the ffmpeg libraries, ie:

$ otool -L image/.Launcher.app/Contents/Resources/lib/libavformat.58.12.100.dylib
image/.Launcher.app/Contents/Resources/lib/libavformat.58.12.100.dylib:
        /Users/gtk3/gtk/inst/_jhbuild/root-ffmpeg/Users/gtk3/gtk/inst/lib/libavformat.58.dylib (compatibility version 58.0.0, current version 58.12.100)
        /Users/gtk3/gtk/inst/_jhbuild/root-ffmpeg/Users/gtk3/gtk/inst/lib/libavcodec.58.dylib (compatibility version 58.0.0, current version 58.18.100)
        /Users/gtk3/gtk/inst/_jhbuild/root-ffmpeg/Users/gtk3/gtk/inst/lib/libavutil.56.dylib (compatibility version 56.0.0, current version 56.14.100)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
        /Users/gtk3/gtk/inst/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1256.14.0)
        /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
        /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
        /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 728.6.0)

And this is not caused by the packaging scripts themselves but this is just how the library is installed on the system by jhbuild:

$ otool -L /Users/gtk3/gtk/inst/lib/libswscale.5.1.100.dylib
/Users/gtk3/gtk/inst/lib/libswscale.5.1.100.dylib:
	/Users/gtk3/gtk/inst/_jhbuild/root-ffmpeg/Users/gtk3/gtk/inst/lib/libswscale.5.dylib (compatibility version 5.0.0, current version 5.1.100)
	/Users/gtk3/gtk/inst/_jhbuild/root-ffmpeg/Users/gtk3/gtk/inst/lib/libavutil.56.dylib (compatibility version 56.0.0, current version 56.14.100)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1256.14.0)
	/System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 728.6.0)

Where to go from here?

@smo: ideas?


Tue, 26 Jun 2018 17:17:21 GMT - Antoine Martin:

I've downgraded ffmpeg to 4.0 by hand and packaging is working again.


Sat, 30 Jun 2018 07:03:47 GMT - Antoine Martin:


Sun, 29 Jul 2018 14:39:36 GMT - Antoine Martin:

The GTK3 build issues I have seen seem to be caused by gtk 3.22.28: symbol not found (missing GDK_AVAILABLE_IN_ALL) and updating the GTK3 version from gtk-osx upstream should fix that.

paramiko has a compatibility problem with gssapi:paramiko 2.4.1 fails when current version of gssapi is installed so we disable gssapi: r19964.


Fri, 17 Aug 2018 07:09:10 GMT - Antoine Martin:

Had problems with libjpeg-turbo 2.0.0:

It no longer uses autotools to build, so I had to find the new magic incantations, we cannot use the macos version of nasm which is too old and buggy, we have to tell libjpeg-turbo to honour the one that's first in the path (and why doesn't it?):

cmake -DCMAKE_ASM_NASM_COMPILER=$PREFIX/bin/nasm -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX .
make
make install

Fri, 17 Aug 2018 07:16:47 GMT - Antoine Martin:

Remaining problems:

This can be ignored, either by removing the offending stack_size option or by skipping the tests altogether.


Fri, 17 Aug 2018 17:18:21 GMT - Antoine Martin:

Still more problems caused by the new libjpeg-turbo built with cmake:

$ otool  -L /Users/osx/gtk/inst/lib/libjpeg.dylib
/Users/osx/gtk/inst/lib/libjpeg.dylib:
	@rpath/libjpeg.62.dylib (compatibility version 62.0.0, current version 62.3.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

And then a number of libraries end up referencing that:

$ otool -L /Users/osx/gtk/inst/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so
/Users/osx/gtk/inst/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so:
	@rpath/libjpeg.62.dylib (compatibility version 62.0.0, current version 62.3.0)
	/Users/osx/gtk/inst/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version 3601.0.0, current version 3601.6.0)
	/Users/osx/gtk/inst/lib/libgmodule-2.0.0.dylib (compatibility version 5201.0.0, current version 5201.2.0)
	/Users/osx/gtk/inst/lib/libgio-2.0.0.dylib (compatibility version 5201.0.0, current version 5201.2.0)
	/Users/osx/gtk/inst/lib/libgobject-2.0.0.dylib (compatibility version 5201.0.0, current version 5201.2.0)
	/Users/osx/gtk/inst/lib/libglib-2.0.0.dylib (compatibility version 5201.0.0, current version 5201.2.0)
	/Users/osx/gtk/inst/lib/libintl.9.dylib (compatibility version 11.0.0, current version 11.4.0)
	/Users/osx/gtk/inst/lib/libpng16.16.dylib (compatibility version 51.0.0, current version 51.0.0)
	/Users/osx/gtk/inst/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1256.14.0)

So then things fail much later in mysterious ways. ie: the bundler fails with:

Cannot find a matching prefix for @rpath/libjpeg.62.dylib

Trying to debug the cmake build is hard, so much of it is just pretty colouring, the rest is levels and levels of indirection... I'm no fan of Makefiles and autotools, but at least that's a known quantity. Linking libjpeg:

[ 92%] Linking C shared library ../libjpeg.dylib
+ cd /Users/osx/gtk/source/libjpeg-turbo-2.0.0/sharedlib
+ /Users/osx/gtk/inst/bin/cmake -E cmake_link_script CMakeFiles/jpeg.dir/link.txt --verbose=
+ cd /Users/osx/gtk/source/libjpeg-turbo-2.0.0/sharedlib
+ /Users/osx/gtk/inst/bin/cmake -E cmake_symlink_library ../libjpeg.62.3.0.dylib ../libjpeg.62.dylib ../libjpeg.dylib
+ /Users/osx/gtk/inst/bin/cmake -E touch_nocreate libjpeg.dylib
+ /Users/osx/gtk/inst/bin/cmake -E cmake_echo_color --switch= \
    --progress-dir=/Users/osx/gtk/source/libjpeg-turbo-2.0.0/CMakeFiles \
    --progress-num=12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 'Built target jpeg'

And in CMakeFiles/jpeg.dir/link.txt:

/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch x86_64 \
    -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include \
    -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \
    -mmacosx-version-min=10.10 -O3 -DNDEBUG \
    -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \
    -mmacosx-version-min=10.10 -dynamiclib -Wl,-headerpad_max_install_names \
    -L/Users/osx/gtk/inst/lib -L/Users/osx/gtk/inst/lib -arch x86_64 \
    -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib \
    -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk \
    -mmacosx-version-min=10.10 -Wl,-headerpad_max_install_names -compatibility_version 62.0.0 -current_version 62.3.0 \
    -o ../libjpeg.62.3.0.dylib -install_name @rpath/libjpeg.62.dylib \
    CMakeFiles/jpeg.dir/__/jcapimin.c.o CMakeFiles/jpeg.dir/__/jcapistd.c.o CMakeFiles/jpeg.dir/__/jccoefct.c.o \
    (..)
    ../simd/CMakeFiles/simd.dir/x86_64/jsimd.c.o

Sat, 18 Aug 2018 12:08:36 GMT - Antoine Martin:

merge from upstream:

libjpeg-turbo:

updates:


Sat, 13 Oct 2018 07:28:02 GMT - Antoine Martin: status changed; resolution set

For 2.5, see #1985


Sat, 23 Jan 2021 05:33:47 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1787