I have compiled and run Cinelerra 4.5 on OpenSuse 13.1 but it could not handle dnxHD and the yuv streams. After patching for those two items I am getting a series of errors that indicate a missing library or header definition. I have FFMpeg and swscale development packages installed but can’t get this worked out. I’d really appreciate a helping hand as I am stumped.
make
g++ -g -o ../bin/cinelerra `cat x86_64/objs`
x86_64/ffmpeg.o: In function `FFMPEG::convert_cmodel(VFrame*, VFrame*)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/ffmpeg.C:173: undefined reference to `sws_getContext'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/ffmpeg.C:183: undefined reference to `sws_scale'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/ffmpeg.C:186: undefined reference to `sws_freeContext'
x86_64/ffmpeg.o: In function `FFMPEG::convert_cmodel(AVPicture*, PixelFormat, int, int, VFrame*)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/ffmpeg.C:265: undefined reference to `sws_getContext'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/ffmpeg.C:275: undefined reference to `sws_scale'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/ffmpeg.C:278: undefined reference to `sws_freeContext'
x86_64/filepng.o: In function `FilePNG::check_sig(Asset*)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/filepng.C:58: undefined reference to `png_check_sig'
x86_64/yuvstream.o: In function `YUVStream::YUVStream()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:14: undefined reference to `y4m_init_stream_info'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:15: undefined reference to `y4m_init_frame_info'
x86_64/yuvstream.o: In function `YUVStream::~YUVStream()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:23: undefined reference to `y4m_fini_stream_info'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:24: undefined reference to `y4m_fini_frame_info'
x86_64/yuvstream.o: In function `YUVStream::read_frame(unsigned char**)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:92: undefined reference to `y4m_read_frame'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:96: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::read_frame_raw(unsigned char*, long)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:106: undefined reference to `y4m_read_frame_header'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:115: undefined reference to `y4m_read'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:118: undefined reference to `y4m_strerr'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:112: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::write_frame(unsigned char**)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:126: undefined reference to `y4m_write_frame'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:128: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::write_frame_raw(unsigned char*, long)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:135: undefined reference to `y4m_write_frame_header'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:144: undefined reference to `y4m_write'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:147: undefined reference to `y4m_strerr'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:141: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::get_width()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:244: undefined reference to `y4m_si_get_width'
x86_64/yuvstream.o: In function `YUVStream::get_height()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:251: undefined reference to `y4m_si_get_height'
x86_64/yuvstream.o: In function `YUVStream::read_header()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:217: undefined reference to `y4m_read_stream_header'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:220: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::open_read(char*)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:41: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::write_header()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:226: undefined reference to `y4m_write_stream_header'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:229: undefined reference to `y4m_strerr'
x86_64/yuvstream.o: In function `YUVStream::get_interlace()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:236: undefined reference to `y4m_si_get_interlace'
x86_64/yuvstream.o: In function `YUVStream::get_frame_rate()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:258: undefined reference to `y4m_si_get_framerate'
x86_64/yuvstream.o: In function `YUVStream::set_frame_rate(double)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:263: undefined reference to `mpeg_conform_framerate'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:264: undefined reference to `y4m_si_set_framerate'
x86_64/yuvstream.o: In function `YUVStream::get_aspect_ratio()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:270: undefined reference to `y4m_si_get_sampleaspect'
x86_64/yuvstream.o: In function `YUVStream::get_height()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:251: undefined reference to `y4m_si_get_height'
x86_64/yuvstream.o: In function `YUVStream::get_width()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:244: undefined reference to `y4m_si_get_width'
x86_64/yuvstream.o: In function `YUVStream::get_aspect_ratio()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:274: undefined reference to `mpeg_guess_mpeg_aspect_code'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:275: undefined reference to `mpeg_framerate'
x86_64/yuvstream.o: In function `YUVStream::get_height()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:251: undefined reference to `y4m_si_get_height'
x86_64/yuvstream.o: In function `YUVStream::get_width()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:244: undefined reference to `y4m_si_get_width'
x86_64/yuvstream.o: In function `YUVStream::set_aspect_ratio(double)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:284: undefined reference to `y4m_guess_sar'
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:285: undefined reference to `y4m_si_set_sampleaspect'
x86_64/yuvstream.o: In function `YUVStream::set_interlace(int)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:240: undefined reference to `y4m_si_set_interlace'
x86_64/yuvstream.o: In function `YUVStream::get_width()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:244: undefined reference to `y4m_si_get_width'
x86_64/yuvstream.o: In function `YUVStream::set_width(int)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:247: undefined reference to `y4m_si_set_width'
x86_64/yuvstream.o: In function `YUVStream::get_height()':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:251: undefined reference to `y4m_si_get_height'
x86_64/yuvstream.o: In function `YUVStream::set_height(int)':
/home/craigb/Downloads/cinelerra-4.5/cinelerra/yuvstream.C:254: undefined reference to `y4m_si_set_height'
collect2: error: ld returned 1 exit status
make: *** ../bin/cinelerra] Error 1
What do you mean with that?
There is no swscale development package on Packman.
All you should need is libffmpeg-devel, and better remove libswscale-devel as it might interfere (it has a completely different version than the libswscale from Packman). And libavutil-devel as well if you have that installed.
I did a search and there are multiple libraries and header files on the system so it is highly likely its trying to use the wrong version. Question is which library should it be linking to?
Would it be the lightworks libraries causing the trouble as they would be first in the search path? Excuse me if I’m being dumb…
Well, /usr/lib/lightworks/ should not be in the search path at all, unless you (or some installation script or similar) added it manually.
But /usr/local/ normally comes before /usr/.
Probably try to rename /usr/local/ and /usr/lib/lightworks/ (or at least the files) for compiling cinelerra.
So it’s quite likely that you are actually compiling/linking against the version in /usr/local/lib/. Or even worse, you compile with the headers in /usr/include/ or /usr/local/include and link against the library in /usr/lib/lightworks/.
I guess it’s obvious that this can cause problems, if those versions are not exactly the same.
What version do you have in /usr/local/ btw, and why?
Another note:
I’m not sure if cinelerra 4.5 can actually be built on openSUSE 13.1 with Packman’s ffmpeg (which I expect is what you have in /usr/lib64).
The main reason why there’s no 4.5 on Packman yet is that they haven’t been able to build it, according to this mailinglist thread: http://lists.links2linux.de/pipermail/packman/2014-June/013050.html
I haven’t tried to build it myself yet, but maybe I’ll do so later today…
Thanks again, I’ll come back with more questions soon… I find these things incredibly frustrating to solve yet I’m sure the solution is simple… once I find it!
I have built Cinelerra 4.5 already. The issue I have is with these two additional file handlers that are not built in by default. The issue with termcap is solved by going to terminfo. If I can solve these two issues I will post up instructions on how to build 4.5.
Would be nice. How are you building it at the moment?
I can’t get it to use the system’s ffmpeg at all, and the included one (extremely outdated of course) aborts with a compiler error.
Sorry to say, but that build system is just **** IMHO…
configure seems to be self-assembled, takes no arguments and doesn’t seem to check at all for installed libraries but unconditionally uses its own included (outdated) stuff.
And build instructions are non-existent as well. The included README file only states:
Run ./cinelerra from this directory. That’s it.
Yeah, right. ./cinelerra actually is the directory containing the source code, how would you run that?
Maybe I downloaded the wrong source archive?
It was the cinelerra-4.5-src.tar.xz from here:
Or did you edit the configure script/Makefiles manually?
OK I make no promises I have it all detailed yet but you need these patches first. Download the tarball from here and grab a copy of the PKGBUILD there too as there are a couple of additional steps needed.
If you apply those patches it should be possible to build 4.5 successfully if you have all the dependencies sorted. You might strike a couple of issues with the wrong path being in the makefiles as IIRC there was an issue with it pointing to a /lib instead of /lib64.
Yes you have to enter that directory to build cinelerra itself as the makefile only does the plugins, although that might have been because it was failing on that part of the build and just carried on.
Thanks.
I thought I tried that, but apparently not.
So I’m going to try it now.
Upto now I was still stumbling from one build error to the next when trying to build the thirdparty stuff…
Apparently the patches from that AUR package seem to fix those (at least the error messages in the comments look familiar… ), but this shouldn’t be needed then I suppose.
I did get another build error though:
/bin/sh: Line 1: ../../guicast/x86_64/bootstrap: file or directory not found
make: *** [x86_64/theme_data.o] Error 127
I’ll try to apply those patches then…
Although those for the thirdparty stuff shouldn’t really be necessary then I suppose.
No.
When you enter the cinelerra folder and run “make”, it will call …/…/guicast/x86_64/bootstrap somewhere during the build. But this doesn’t exist unless you build guicast.
So you have to run “make” inside the guicast folder first.
And it still will fail if you haven’t built the quicktime and thirdparty folders first.
So in the end you have to run configure and make in the toplevel directory. Just running make inside the cinelerra subdirectory doesn’t work.
Btw, I have applied all patches now and still get strange build errors. For example strange “xxx/*.o” entries in the object list for speech_tools which makes ar fail, suddenly trying to use x86 instead of x86_64 and failing because of that, and so on. I suppose I fixed all that now, it is still building.
But as I said, this buildsystem is just ****. And using completely outdated third-party libraries (and their outdated build systems) doesn’t help either…
I can definitely understand why nobody has packaged this for openSUSE yet.
Highly unlikely, especially if you mean ffmpeg 2.x with “the latest version”.
I spent a lot of time already during the last years with some packages using ffmpeg (that are unmaintained upstream) to keep them building sucessfully and working.
There have been so many incompatible changes in ffmpeg over the years, that it most likely won’t work just like that.
I think you would have to replace all that third-party stuff that uses ffmpeg with their latest versions as well to make them build.
And then the probability is high that cinelerra won’t build any more, or if it does, just would crash.
The cinelerra from Packman is built against ffmpeg 0.7.16, so maybe that would be an option at least though.
But I don’t no what changes have been made in the Community Version in comparison to Heroine’s.
Ok, I finally succeeded to build this, after starting from scratch by deleting everything, re-download it and applying the patches from that Arch package. So either one of my changes when I tried to get it to build caused problems, or “make clean” didn’t really clean everything (which wouldn’t surprise me… ).
Still I had to change cinelerra/Makefile manually becuase it looked for libIlmImf.a and friends in …/thirdparty/lib/ instead of …/thirdparty/lib64/ where they actually were located:
wolfi@amiga:~/Desktop/cinelerra-4.5> make -C cinelerra
make: Entering directory `/home/wolfi/Desktop/cinelerra-4.5/cinelerra'
g++ -g -o ../bin/cinelerra `cat x86_64/objs`
g++: Error: ../thirdparty/lib/libIlmImf.a: file or directory not found
g++: Error: ../thirdparty/lib/libIlmThread.a: file or directory not found
g++: Error: ../thirdparty/lib/libImath.a: file or directory not found
g++: Error: ../thirdparty/lib/libHalf.a: file or directory not found
g++: Error: ../thirdparty/lib/libIex.a: file or directory not found
make: *** ../bin/cinelerra] Error 1
make: Leaving directory `/home/wolfi/Desktop/cinelerra-4.5/cinelerra'
I’m going to try those patches for handling dnxHD and yuv streams now…
I do get the same errors as in your original post now. This is definitely not caused by any installed ffmpeg/swscale devel libraries, as the cinelerra build only uses the included one.
The line leading to this error is this as you posted:
g++ -g -o ../bin/cinelerra `cat x86_64/objs`
x86_64/objs doesn’t contain any reference to any ffmpeg library, so this is the reason I’d say. If you don’t link against ffmpeg, it is of course obvious that ffmpeg’s functions cannot be resolved…
In particular that file is missing “x86_64/ffmpeg.o” in comparison to the x86_64/objs file without applying the patches.
I yet have to find out why that happens and how to fix it, though.
Well, I did that, but I get a different error now:
wolfi@amiga:~/Desktop/cinelerra-4.5> make -C cinelerra
make: Entering directory `/home/wolfi/Desktop/cinelerra-4.5/cinelerra'
g++ -g -o ../bin/cinelerra `cat x86_64/objs` `cat mjpegobjs` ../quicktime/thirdparty/ffmpeg-0.6.1/libswscale/libswscale.a
../thirdparty/mjpegtools-1.9.0rc3/utils/cpu_accel.o: In function `cpu_accel':
cpu_accel.c:(.text+0x1f4): multiple definition of `cpu_accel'
../mpeg2enc/x86_64/mpeg2enc.a(cpu_accel.o):cpu_accel.c:(.text+0x0): first defined here
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** ../bin/cinelerra] Fehler 1
make: Leaving directory `/home/wolfi/Desktop/cinelerra-4.5/cinelerra'
But I guess we’re getting closer now…
Btw, the change to the patch file patch-cinelerra-4.4-yuvstream os as follows: (starting from line 263)
***************
*** 496,502 ****
# in the main executable.
# Also VFS only overrides the C library when dynamic linking is used.
$(OUTPUT): $(OBJS) $(DCRAW) $(FILEEXR) $(FFMPEG_OBJS) $(FILEFLAC) $(THEME_DATA) $(SNDFILE_LIB) ../guicast/$(OBJDIR)/libguicast.a
! $(LINKER) `cat $(OBJDIR)/objs`
# strip $(OUTPUT)
$(OBJDIR)/test:
--- 504,510 ----
# in the main executable.
# Also VFS only overrides the C library when dynamic linking is used.
$(OUTPUT): $(OBJS) $(DCRAW) $(FILEEXR) $(FFMPEG_OBJS) $(FILEFLAC) $(THEME_DATA) $(SNDFILE_LIB) ../guicast/$(OBJDIR)/libguicast.a
! $(LINKER) `cat $(OBJDIR)/objs` `cat mjpegobjs` ../quicktime/thirdparty/ffmpeg-0.6.1/libswscale/libswscale.a
# strip $(OUTPUT)
$(OBJDIR)/test:
You have to add those two ‘#’ that I marked in red (before the tabulator).
Sorry for the slow reply. I rebuilt the packages with the patched files and it is still failing to build cinelerra. Clearly there is an issue with libraries. Can you list out what your system has for libswscale libraries please.
It doesn’t matter, because cinelerra doesn’t use the system’s libraries at all.
Do you still get the same error?
As I said, that’s because the patch patch-cinelerra-4.4-yuvstream doesn’t apply cleanly as it is for version 4.4. Therefore cinelerra isn’t linked against libswscale at all, causing that linker error.
Either edit that patch accordingly before you apply it, or manually change line 507 in cinelerra/Makefile. It should look like this: