Tips for building kdenlive on Mac OS X

I know there's already a 3-page thread for *feedback* about kdenlive on Mac OS X, but it is quite long and diverse in topics covered, and I found it difficult to sift through. I just successfully built kdenlive on Mac OS X Lion (10.7.1) on an early 2008 MacBook (MacBook 4,1) and thought I'd share a little bit about what I learned (even if you're not using OS X 10.7 or my computer model, these tips should prove helpful, especially if you're a MacPorts newbie).


--Tip #1: Realize that this installation will take several hours and possibly max out your processor for most of that time. Be patient. It's probably best to close most other programs first -- choose a time for the installation when you don't need to use your computer for much else but can still check on your computer periodically over the course of several hours.


--Tip #2: When performing any MacPorts operations in Terminal, add "-v" to use verbose mode. Many individual processes during the installation will take a long time to complete, and if you don't use verbose mode you won't be able to tell if a process is stuck or if it's just taking a long time. So for example:

Instead of "sudo port -d selfupdate", do "sudo port -d -v selfupdate"
And instead of "sudo port install kdenlive", do "sudo port -v install kdenlive"

When I first tried to install kdenlive, the "smake" dependency got stuck, and I had to open Activity Monitor and kill the process called "avoffset.h" (verbose mode allowed me to figure out which process to kill). The installation then continued just fine.


--Tip #3: While running "sudo port -v install kdenlive", installation may fail at some point (or at multiple points). If this happens, don't give up right away!!! From the error message that is displayed, you'll be able to tell which dependency failed to build. Try to install that dependency individually.

For me, the "virtuoso" dependency failed to build during the kdenlive installation. I simply ran "sudo port -v install virtuoso" and it installed just fine by itself. I then resumed the kdenlive installation ("sudo port -v install kdenlive") and everything was just fine...



--Tip #4: If the "gavl" dependency fails to install and you get an error message that looks something like this:


make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gavl/gavl/work/gavl-1.2.0/gavl'
make: *** [all-recursive] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gavl/gavl/work/gavl-1.2.0'
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gavl/gavl/work/gavl-1.2.0" && /usr/bin/make -j2 -w all " returned error 2
Error: Target returned: shell command failed (see log for details)
Warning: the following items did not execute (for gavl): org.macports.activate org.macports.destroot org.macports.install
Error: Failed to install gavl
Log for gavl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_gavl/gavl/main.log
Error: The following dependencies were not installed: mlt frei0r-plugins gavl opencv faac liboil git-core p5-error rsync popt libdv libsamplerate libsndfile flac sox file libao libid3tag libmad wavpack
Error: Status 1 encountered during processing.


...then you probably won't be able to successfully build gavl by itself. This problem was reported as a bug on the MacPorts website a couple months ago and was finally solved by someone who posted here:

The solution involves editing the gavl config file, but because of permission issues you'll have to use vi editor in Terminal. Here are the steps:

#1. "sudo port -v extract gavl"

#2. "cd /usr/local/var/macports/build/[long dir name depending on how your ports are fetched -- look in Finder and you'll find the name]/gavl/work/gavl-1.2.0"
NOTE: on my machine, the parent directory for this string was "/opt/" instead of "/usr/". I don't know if the person who posted the solution made a mistake and meant to type "/opt/" instead of "/usr/", or if this will vary from machine to machine. So if "/usr/..." doesn't work, try "/opt/..." instead (or just look in Finder to be sure).

#3. "sudo vi config"

#4. **You'll probably have to edit line 3106 to read "host_cpu=x86_64". If that doesn't work (it didn't work for me), try editing line 3106 to read "host_cpu=x86_32" (if you have a MacBook 4,1 from early 2008 like I do, or any other older Mac for which Apple disallowed running the kernel in 64-bit mode for no apparent reason, this should do the trick).

#5. Save the changes and exit vi.

#6. Resume kdenlive installation ("sudo port -v install kdenlive")

**Note: If you're new to vi editor, you can find some basic instructions here: ... but if you're too lazy to read up on this yourself, here is how to complete step #4:

--type "3105" and press the down-arrow key (this will move you to line 3106 in the document... otherwise you'll be doing a lot of scrolling!)
--type "i" to enter insert mode
--delete "$1" from the end of the line and replace it with "x86_64" (or "x86_32" if "x86_64" doesn't solve the problem)
--press escape to exit insert mode
--type ":w" and press return to save changes
--type ":q" and press return to exit vi editor

Hi, Thanks for this post it has been a help getting this difficult package installed. I am stuck with the post-install step though the "sudo chown -R $USER ~/Library/Preferences/KDE" command. What do I do with it? I tried putting it in as that and I get an error telling me that file does not exist. Do I need to substitute the "$USER" part for something else? I have tried looking for the folder in Spotlight and Finder and I can't find a KDE folder that isn't in opt/.

The most recent update to the dependency, qt4-mac won't compile on OSX Lion (or possibly, earlier versions) as there's something going on with the compiler known as clang and the DPH bus.

To work around this particular issue, you will need to change the compiler setting for qt4-mac:

(The first line assumes you've installed macports in the default location. If you haven't, you'll have to find it.)

$cd /opt/local/var/macports/sources/
$sudo cp Portfile Portfile.old
$sudo nano Portfile

Search for: configure.compiler

Just after this text:
# The build process uses -fconstant-cfstrings.
# configure.compiler should therefore not be one of the MacPorts compilers.

configure.compiler llvm-gcc-4.2


$sudo port -d -v install kdenlive

Hi everybody!

this is my first post here and I hope I can get some answers. I really would like to use kdenlive, but I'm a complete novice and I don't have the right comprehension on how the installation process should go. I've recently bought a MacBook Pro, but I've always been using Windows based systems before, so even reading the installation guide I'm quite in the dark.

Can someone provide a step by step guide?

Reading the guide, I understood the following (please, feel free to correct me):

1) I should install MacPorts
1.1) In the MacPorts website, they say that I need to skip X11 installation (since I have OS X 10.6);
1.2) I should install XCode (I've downloaded Xcode 3.2.2);

2)All I have to do after the XCode installation is to insert the command lines in the installation guide, right? If I understood correctly, when I download Xcode (and therefore install MacPorts) I will already have Kdenlive "inside" my computer, I only should "activate" somehow. Is this correct? Of course I apology for my complete incompetence and lack of technical knowledge.

I hope someone can help me, I'm really looking forward to use this software!


I was also hanged with the `virtuoso` phase. Stopping the kdenlive installation and manually installing virtuoso and then resuming the kdenlive was the solution.

Few remarks though:
1. I didn't manage to run: sudo chown -R $USER ~/Library/Preferences/KDE. However,
2. I did run the three commands provided by
3. I ran open -a kdeinit4. Have no clue what it should do...

Finally, I managed to open kdenlive and even import a file to it. I didn't really work with it so far, I hope the installation is complete and stable.

@Ricroma: Your question is not well stated I guess. In general you drew the right picture. You should introduce more specific questions. I'm also new here, but from my experience it is hard to answer questions like yours. Good luck!

Although Kdenlive via PacPorts took a long time , it was going swimmingly, even got past Virtuoso on Lion 10.7.3. Then came Soprano.

The key eror was to be found in main.log

:debug:build could not read "/opt/local/var/lib/virtuoso/vsp/vsmx/vsmx_res.xsl": no such file or directory

and indeed there was no such file or directory to be found.

According to the saved Terminal output Virtuoso had installed correctly

Find both Terminal output and Soprano main.log attached.

I am completely and utterly new to this sort of thing, and have never actually done anything like this before, so forgive me if I end up sounding like an idiot.

I have tried to install kdenlive on my computer (Mac OS X 10.5) several times, but ever time I'm confronted with this error after it seems to be going swimmingly for a few seconds:
Error: Target returned: shell command failed (see log for details)
Error: Failed to install libiodbc
Log for libiodbc is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libiodbc/libiodbc/main.log
Error: The following dependencies were not installed: kde4-runtime kdelibs4 soprano libiodbc raptor2 redland rasqal mhash mpfr gmp strigi ffmpeg XviD dirac cppunit lame libogg libsdl libtheora libvorbis libvpx yasm openjpeg jbigkit schroedinger orc speex texi2html x264 ffmpeg virtuoso gawk libssh openslp oxygen-icons qimageblitz mlt doxygen graphviz gd2 xpm gts netpbm subversion apr apr-util neon serf1 libLASi xorg-libXaw groff psutils xorg-libXmu frei0r-plugins gavl libdv libsamplerate libsndfile flac sox file libid3tag libmad opencore-amr twolame wavpack
Error: Status 1 encountered during processing.
To report a bug, see

Is there any way to fix this?


If you have problems with Mac OS X Lion 10.7.4 I suggest to run this:

% sudo port install kdenlive configure.compiler=llvm-gcc-4.2


I tried to install Kdenlive and followed these steps:

"Install MacPorts
Follow these guidelines:

If MacPorts is already installed on your computer, upgrade installed ports:
% sudo port -d selfupdate
% sudo port -u upgrade outdated

Install Kdenlive
Run the following command:
% sudo port install kdenlive

But when I tried to install Kdenlive this message appeared
"-bash: fg: %sudo: no such job"

Can anyone please tell me why did this happen and how can I fix it?
Thank you

PD: This is the first time I've ver tried to use Terminal so basically my knowledge on this subject is null and I'm using a Mac OS X 10.6.8

Please do not double/cross post. Stick to one thread. See the answer in the other thread.

I am new to MacPorts, and I have never used terminal for anything before. Actually, the installation went fine for every dependency except mlt.

When I try to install kdenlive it results in this message:

Error: for port mlt returned: command execution failed
Please see the log file for port mlt for details:
To report a bug, follow the instructions in the guide:
Error: Processing of port mlt failed

The same happens when I try to install mlt individually. The log file is alien to me, so it doesn't help me figure out what went wrong.

I have already run selfupdate. I am trying to install on Mac OS X 10.6.8


I have the same issue as Unheimlich - trying to build / install kdenlive on a Mac OS X 10.6.8 system... fails attempting to deal with mlt.

Does anyone have any suggestions on how to get it going again?

All the best,
PS: This is the terminal output where it fails... is this the same for anyone else?

make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mlt/mlt/work/mlt-0.8.2/src/modules/avformat'
/usr/bin/gcc-4.2 -O2 -I/opt/local/include -I/opt/local/include -DARCH_X86_64 -Wall -DPIC -O2 -pipe -fno-tree-dominator-opts -fno-tree-pre -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -D__DARWIN__ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DARCH_X86_64 -Wall -DPIC -O2 -pipe -fno-tree-dominator-opts -fno-tree-pre -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -D__DARWIN__ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I../.. -DARCH_X86_64 -Wall -DPIC -O2 -pipe -fno-tree-dominator-opts -fno-tree-pre -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -D__DARWIN__ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DAVDATADIR=\"/opt/local/share/ffmpeg/\" -I/opt/local/include -I/opt/local/include -I/opt/local/include -DFILTERS -DCODECS -DSWSCALE -DAVDEVICE -c -o consumer_avformat.o consumer_avformat.c
consumer_avformat.c: In function ‘consumer_start’:
consumer_avformat.c:241: error: ‘AVCodec’ has no member named ‘encode’
consumer_avformat.c:265: error: ‘AVCodec’ has no member named ‘encode’
consumer_avformat.c: In function ‘write_transmitter’:
consumer_avformat.c:1071: warning: cast from pointer to integer of different size
consumer_avformat.c: In function ‘consumer_thread’:
consumer_avformat.c:1596: warning: ‘avcodec_encode_audio’ is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4211)
consumer_avformat.c:1663: warning: ‘avcodec_encode_audio’ is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4211)
consumer_avformat.c:1803: warning: ‘avcodec_encode_video’ is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4273)
consumer_avformat.c:1889: warning: ‘avcodec_encode_audio’ is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4211)
consumer_avformat.c:1892: warning: ‘avcodec_encode_audio’ is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4211)
consumer_avformat.c:1919: warning: ‘avcodec_encode_video’ is deprecated (declared at /opt/local/include/libavcodec/avcodec.h:4273)
make[2]: *** [consumer_avformat.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mlt/mlt/work/mlt-0.8.2/src/modules/avformat'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mlt/mlt/work/mlt-0.8.2/src/modules'
make: *** [all] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mlt/mlt/work/mlt-0.8.2'
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mlt/mlt/work/mlt-0.8.2" && /usr/bin/make -j4 -w all CC="/usr/bin/gcc-4.2" CXX="/usr/bin/g++-4.2" CPP="/usr/bin/cpp-4.2"
Exit code: 2
Error: for port mlt returned: command execution failed
Warning: targets not executed for mlt: org.macports.activate org.macports.destroot org.macports.install
Please see the log file for port mlt for details:
To report a bug, follow the instructions in the guide:
Error: Processing of port mlt failed