Compiling ffmpeg on OpenSolaris

Here's something I don't understand: I'm trying to compile the open source program "ffmpeg", useful for transcoding from one kind of movie file and video encoding format to another, plus a whole big bag-o-tricks.

So I download the source code:
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Then I go into the ffmpeg source directory and type "./configure".  It fails, reporting:

check_ld
check_cc
BEGIN /tmp/ffconf.XXRJaOkG.c
   1   #include <signal.h>
   2   static void sighandler(int sig){
   3       raise(SIGTERM);
   4   }
   5   int main(void){
   6       signal(SIGILL, sighandler);
   7       signal(SIGFPE, sighandler);
   8       signal(SIGSEGV, sighandler);
   9   #ifdef SIGBUS
  10       signal(SIGBUS, sighandler);
  11   #endif
  12       {     volatile int i=0;
  13       __asm__ volatile (
  14           "xorl %%ebp, %%ebp"
  15       ::: "%ebp");
  16       return i; }
  17   }
END /tmp/ffconf.XXRJaOkG.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__EXTENSIONS__
-fomit-frame-pointer -c -o /tmp/ffconf.XXYJaalG.o
/tmp/ffconf.XXRJaOkG.c
gcc -o /tmp/ffconf.XXTJaWkG /tmp/ffconf.XXYJaalG.o
./configure: line 663: 16530: Terminated

I can't tell why it fails even making a Makefile, but after scanning the web for a while, I find a suggestion that says "use bash as your shell instead of whatever shell you were using."  I had been using tcsh, then tried ksh, then tried sh, all with the same error result.

So then I try "bash configure".  What do you know?  It created a Makefile just fine.

Now why is that?  Can somebody help me out here?  Because I don't know why the choice of a shell would make the configure script succeed or fail.  And that seems bad for the other shells available on OpenSolaris.

The app seems to compile, mostly.  Next: see how much of the app got compiled and how much of it runs.

Why am I doing this?  Because it's part of "pyTiVo", which I'd like to get running on my OpenSolaris home media server, so that I can back up the TiVo's content onto this nice, ZFS-enabled server.  I'll update my progress here.


Powered by ScribeFire.

Comments:

The reason why "bash configure" worked while normal ./configure wouldn't is because ffmpeg - like a lot of software - is developed natively on Linux. Most Linux distributions simply make /bin/sh a symlink to bash.

This has resulted in a LOT of Linux developers using bash-specific features, but they still put "#!/bin/sh" at the top of their scripts. And of course this blows up all over the place when /bin/sh != bash, like on... well... anything that isn't Linux.

Posted by Brandon Hume on June 03, 2009 at 02:05 AM PDT #

Did you ever get it to work? I'm trying to do the same thing.

Posted by Steve on August 13, 2009 at 02:25 PM PDT #

Hi Steve. Nope, I didn't manage to get ffmpeg to work on OpenSolaris, but to be fair, I stopped working on it because I found Galleon and got that to work just fine. It now reliably backs up my TiVo's content onto my OpenSolaris media server box.

Here's how I did it: http://blogs.sun.com/drapeau/entry/using_opensolaris_as_a_tivo

I am kind of interested in getting ffmpeg to compile, but it just seems not to want to do it! If you ever get ffmpeg to compile on OpenSolaris, I'd love to hear how you did it.

Posted by George Drapeau on August 14, 2009 at 07:22 AM PDT #

I did get it to compile, barely, using the setup from http://pkgbuild.sourceforge.net/spec-files-extra/.

Although the much easier method was to download from this IPS repository:
http://ips.homeunix.com/?q=node/11

Posted by Steve on August 15, 2009 at 07:52 AM PDT #

thank you,for your info

Posted by Business Ideas on November 19, 2010 at 08:16 AM PST #

thanks to you, I was able to understand.

Posted by dwi on November 20, 2010 at 02:53 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle. What more do you need to know, really?

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today