Few notes about building the Linux SDK

Hello,

I managed to build shotcut on a Debian/sid following the instructions at
How To Use the Linux SDK , but had to do some adjustment that I’d like to share.

  • qmake fail to find the package libmlt++

It use pkg-config, but I haven’t installed libmlt+±dev on my system and beside we want to use the one from the SDK, so I’ve added an “Additional argument” in the “Build Steps” PKG_CONFIG_LIBDIR=$HOME/Projects/Shotcut/Shotcut.app/lib/pkgconfig

  • broken mlt++.pc and mlt-framework.pc

Once lbmlt++ was found the build kept failing trying to access some include file in a /root path, looking into mlt++ pkg-config’s files shown some problem with hard-wired paths

lib/pkgconfig/mlt++.pc
lib/pkgconfig/mlt-framework.pc

I replaced the first prefix with the path to Shotcut.app and replaced the wired full paths with ${prefix}

prefix=/home/___/Projects/Shotcut/Shotcut.app
exec_prefix=${prefix}
...

The first prefix variable should be replaced by the invoking application (qtcreator) but for some reason the build kept referencing “/root” paths, so I just replaced it with the SDK path (Eventually I’ll look into it)

  • running the built binary

running the binary from inside qtcreator fail loading libmlt++ (the run environment seems to be exported correctly, I’ll take a look into that too) but the wrapper script Shortcut.app/shotcut works just fine.

And that’s it.

ps. I think most of the references to “/home/___/” in the instructions can be safely replaced with “$HOME/”, environment variables are handled correctly by qtcreator

edit

You may want to set your build environment like that (ccache is optional and the directory must be created manually)

CCACHE_DIR=${HOME}/Projects/ccache
PATH=/usr/lib/ccache:${QTDIR}/bin:${PATH}
SC_SDK=${HOME}/Projects/Shotcut/Shotcut.app

and your run environment like that

FREI0R_PATH=${SC_SDK}/lib/frei0r-1
LD_LIBRARY_PATH=${SC_SDK}/lib:${QTDIR}/lib:${SC_SDK}:${SC_SDK}/src/build-shotcut-Desktop_Qt_5_6_1_GCC_64bit-Debug/CuteLogger:${SC_SDK}/src/build-shotcut-Desktop_Qt_5_6_1_GCC_64bit-Debug/mvcp
MLT_DATA=${SC_SDK}/share/mlt
MLT_PRESETS_PATH=${SC_SDK}/share/mlt/presets
MLT_PROFILES_PATH=${SC_SDK}/share/mlt/profiles
MLT_REPOSITORY=${SC_SDK}/lib/mlt
QML2_IMPORT_PATH=${QTDIR}/qml
QT_PLUGIN_PATH=${QTDIR}/plugins

Notice I had to add an extra build step, a “custom process step”

Command: cp
Arguments: src/shotcut …/…/bin/shotcut
Working directory: %{buildDir}