mltframework / mlt-scripts

scripts to help build open source MLT apps

Home Page:https://www.mltframework.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to build MLT on CentOs6

toddrimes opened this issue · comments

I'm trying to build MLT on CentOs6 -- is it actually possible?

I already had frei0r installed, but the MLT build script kept blowing up on it, so I disabled it in the build script.

Now I'm getting

g++ -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSvg -I/usr/include/QtOpenGL  -I../.. -I/root/melted/20140712/include -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread  -DUSE_EXIF  -Wno-deprecated   -c -o consumer_qglsl.o consumer_qglsl.cpp
g++ -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSvg -I/usr/include/QtOpenGL  -I../.. -I/root/melted/20140712/include -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread  -DUSE_EXIF  -Wno-deprecated   -c -o producer_qtext.o producer_qtext.cpp
common.cpp: In function 'bool createQApplicationIfNeeded(mlt_service_s*)':
** common.cpp:32: error: 'getenv' was not declared in this scope **
make[2]: *** [common.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/root/melted/src/mlt/src/modules/qt'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/root/melted/src/mlt/src/modules'
make: *** [all] Error 1
ERROR: Unable to build mlt
LOG: Process has finished. Reason: FAILURE Some kind of error occured: Unable to build mlt

but when I add

#include <stdlib.h>

into ~/melted/src/mlt/src/modules/qt/common.cpp, the code is overwritten with un-edited code (so losing my edit) and the error happens again.

How can I fix this? I am really anxious to use MLT as it seems to be exactly what I need!

Thank you,
~Todd

If you only want MLT and melt, then use the build-mlt.sh script instead.
To prevent overwriting your source after the first run and fetch stage of the script, edit the top of the script and set ACTION_GET_COMPILE_INSTALL=0 and ACTION_COMPILE_INSTALL=1.

Thank you, Dan. I made the configuration changes you specified, added the stdlib include in common.cpp, and it seemed to run a bit longer. However, I still got:

...
...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: error: cannot find input file: po/Makefile.in.in
ERROR: Unable to configure rugen
LOG: Process has finished. Reason: FAILURE Some kind of error occured: Unable to configure rugen

Thanks again!
~Todd

Oh, I see build-melt doesn't build rugen...trying that.

Okay, running build-melt (not meltED), I got past RUGEN. Now I get:

...
...
LOG: Done installing x264
LOG: About to run command: popd
~/melt/src
LOG: Configuring, compiling, and installing movit
LOG: About to run command: pushd .
~/melt/src ~/melt/src
LOG: About to run command: cd movit
LOG: PATH=/root/melt/20140713/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
LOG: LD_RUN_PATH=/root/melt/20140713/lib
LOG: PKG_CONFIG_PATH=/root/melt/20140713/lib/pkgconfig:
LOG: CFLAGS=
LOG: LDFLAGS=
LOG: Configuring movit
LOG: About to run command: ./autogen.sh --prefix=/root/melt/20140713
configure.ac:1: error: m4_defn: undefined macro: _m4_divert_diversion
configure.ac:1: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: autom4te failed with exit status: 1
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:1: error: m4_defn: undefined macro: _m4_divert_diversion
configure.ac:1: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
./autogen.sh: line 5: ./configure: No such file or directory
ERROR: Unable to configure movit
LOG: Process has finished. Reason: FAILURE Some kind of error occured: Unable to configure movit
[root@mars melt]# 

should I run ./configure before trying to run the script?

Movit is failing to configure. This is totally a guess, but maybe try moving "AC_INIT(movit, git)" to the very top of movit/configure.ac.

Movit is a very new project. So it is quite possible that you are in uncharted territory here.

Thank you, Brian. That fixed it. Now I'm installing glew, so -- progress!

Well, not so fast! Back to my original issue:


g++ -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSvg -I/usr/include/QtOpenGL -I/root/melt/20140713/include -I../.. -I/root/melt/20140713/include -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread  -DUSE_EXIF  -Wno-deprecated   -c -o producer_qtext.o producer_qtext.cpp
common.cpp: In function 'bool createQApplicationIfNeeded(mlt_service_s*)':
common.cpp:32: error: 'getenv' was not declared in this scope
make[2]: *** [common.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/root/melt/src/mlt/src/modules/qt'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/root/melt/src/mlt/src/modules'
make: *** [all] Error 1
ERROR: Unable to build mlt
LOG: Process has finished. Reason: FAILURE Some kind of error occured: Unable to build mlt
[root@mars melt]#

---- but I already added the include of stdlib.h, so I don't know what to do next...

[root@mars melt]# vi /root/melted/src/mlt/src/modules/qt/common.cpp
/*
 * Copyright (C) 2014 Dan Dennedy <dan@dennedy.org>
...
 */
#include "common.h"
#include <QApplication>
#include <QLocale>

#include <stdlib.h> ** I ADDED THIS ** ** I ADDED THIS ** ** I ADDED THIS ** also tried <cstdlib>

#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#include <X11/Xlib.h>
#endif

bool createQApplicationIfNeeded(mlt_service service)
{
        if (!qApp) {
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
                XInitThreads();

Any suggestions greatly appreciated!
~Todd

Oh duh, somehow I reverted back to /root/melted, not /root/melt...

but... same issue:


make[2]: Entering directory `/root/melt/src/mlt/src/modules/qt'
g++ -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSvg -I/usr/include/QtOpenGL -I/root/melt/20140713/include -I../.. -I/root/melt/20140713/include -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread -DARCH_X86_64 -Wall -DPIC   -O2 -pipe -ffast-math -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -pthread  -DUSE_EXIF  -Wno-deprecated   -c -o common.o common.cpp
common.cpp: In function 'bool createQApplicationIfNeeded(mlt_service_s*)':
common.cpp:32: error: 'getenv' was not declared in this scope
make[2]: *** [common.o] Error 1
make[2]: Leaving directory `/root/melt/src/mlt/src/modules/qt'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/root/melt/src/mlt/src/modules'
make: *** [all] Error 1
ERROR: Unable to build mlt
LOG: Process has finished. Reason: FAILURE Some kind of error occured: Unable to build mlt
[root@mars melt]#

Aha!

I needed TWO new includes in '/root/melt/src/mlt/src/modules/qt/common.cpp':

#include <string.h>
#include <cstdlib>

Now I got:


LOG: Done configuring, compiling and installing all sources
~/melt/src ~/melt/src
LOG: Changing to /root/melt/20140713
LOG: Creating environment script in /tmp/build-melt.env.2RgtHd40n
LOG: Creating wrapper script in /tmp/build-melt.env.2RgtHd40n
LOG: Done creating startup and environment script
~/melt/src
LOG: Process has finished. Reason: SUCCESS Everything succeeded ** WOOHOO! **
[root@mars melt]#

Thank you for your help!
~Todd

I would have expected "#include <stdlib.h>" to do it.
I'm glad you got it to work.

Thank you.

But... I don't know what to do next.

Following the instructions at : http://www.mltframework.org/bin/view/MLT/BuildScripts

Run the build
Then, run start-melted-server ** can't find this, ***. Wait a couple of seconds to let the server start. Next, run start-melted-client. ** or this, ***

Configure the runtime environment
Edit etc/start-melted.conf to set the MLT profile to use. ** or this **

SO close! Thanks again--
~Todd

Ok - sorry I think I get it. I only installed the framework, not the application. Will this still get me to where I can run(??) :

melt https://archive.org/download/IMB_SF_R35_C8/IMB_SF_R35_C8_512kb.mp4 in=400 \
    -track https://archive.org/download/IMB_SF_R19_C9/IMB_SF_R19_C9_512kb.mp4 in=450 \
    -filter chroma key=0x00ff0000 variance=0.45 \
    -transition composite

That's what I'm after... I'll try it -- sorry for the floundering...

Thank you,
~Todd

Ugh - this is not great. I already had ffmpeg installed and working but I guess melt installed its own version of it, creating a new default path to its ffmpeg, for which my web server no longer has execute permission. If I uninstall MLT will my previous ffmpeg be reinstated? It took me weeks to get that working. Help!

The script doesn't install anything on your system and it doesn't change any system paths. It just builds the binaries and puts them all in the directory specified by the script. In your case, that looks to be "/root/melt/20140713". In that folder, you should look for a script called "melt" which wraps the compiled melt with additional shell variables to make it work. You can call that "melt" script as if it were the melt binary and it will pass the arguments along to the real melt binary.

Awesome! I figured that out when I accidentally blew away my whole melt
install! So I'm starting over, though I don't expect the do-over to be
hard at all. If I comment out the FFMPEG config lines at the top of the
build script, will melt work with my already-installed ffmpeg
(/usr/local/bin/ffmpeg), which I already have working with my web server?
I'm trying that -- in the morning. Good night and thanks so much for
your help!

On Sat, Jul 12, 2014 at 10:40 PM, Brian Matherly notifications@github.com
wrote:

The script doesn't install anything on your system and it doesn't change
any system paths. It just builds the binaries and puts them all in the
directory specified by the script. In your case, that looks to be
"/root/melt/20140713". In that folder, you should look for a script called
"melt" which wraps the compiled melt with additional shell variables to
make it work. You can call that "melt" script as if it were the melt binary
and it will pass the arguments along to the real melt binary.


Reply to this email directly or view it on GitHub
#4 (comment)
.

No, the script does not support using the system-installed FFmpeg as that entirely defeats the purpose of the script. Build without using the script if you want that.

Added missing cstdlib include in MLT git commit 4035fc1. I did not add cstring because it is not needed in qt/common.cpp. The dependency might be elsewhere.

Thank you, Dan. I just added absolute paths to my PHP scripts so the web app uses the 'system' FFmpeg but MLT uses its own -- seems to work. Thank you for the help!