<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: FFMpeg 64bit x86_64 / amd64 on Solaris 10</title>
	<atom:link href="http://blogs.everycity.co.uk/alasdair/2009/05/ffmpeg-64bit-x86_64-amd64-on-solaris-10/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.everycity.co.uk/alasdair/2009/05/ffmpeg-64bit-x86_64-amd64-on-solaris-10/</link>
	<description></description>
	<pubDate>Thu, 09 Sep 2010 00:45:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Alasdair</title>
		<link>http://blogs.everycity.co.uk/alasdair/2009/05/ffmpeg-64bit-x86_64-amd64-on-solaris-10/#comment-121</link>
		<dc:creator>Alasdair</dc:creator>
		<pubDate>Fri, 19 Jun 2009 12:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.everycity.co.uk/alasdair/?p=205#comment-121</guid>
		<description>Hi Cy,

Hmm, if it's complaining about things not being declared, sounds like you might have a duff copy of ffmpeg out the source tree.

Could you report back the version of ffmpeg you're compiling, your ./configure line, output from "env" utility and full operating system version, and I'll try and offer more advice.

Cheers,

Alasdair</description>
		<content:encoded><![CDATA[<p>Hi Cy,</p>
<p>Hmm, if it&#8217;s complaining about things not being declared, sounds like you might have a duff copy of ffmpeg out the source tree.</p>
<p>Could you report back the version of ffmpeg you&#8217;re compiling, your ./configure line, output from &#8220;env&#8221; utility and full operating system version, and I&#8217;ll try and offer more advice.</p>
<p>Cheers,</p>
<p>Alasdair</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cy</title>
		<link>http://blogs.everycity.co.uk/alasdair/2009/05/ffmpeg-64bit-x86_64-amd64-on-solaris-10/#comment-118</link>
		<dc:creator>cy</dc:creator>
		<pubDate>Mon, 15 Jun 2009 16:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.everycity.co.uk/alasdair/?p=205#comment-118</guid>
		<description>Hi Alasdair,

 I was trying to compile ffmpeg on Solaris 10 but hit the error below. I only need it to generate thumbnails out of 3gp and mp4 files.

I used gnu gcc 3.4.6 and make 3.8.1.

Any advice is greatly appreciated. Thanks.

gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/export/home/mbit/tmp/ffmpeg-0.5" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fPIC -std=c99 -D__EXTENSIONS__ -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wundef -O3 -fno-math-errno       -c -o libavdevice/alldevices.o libavdevice/alldevices.c
libavdevice/alldevices.c: In function `avdevice_register_all':
libavdevice/alldevices.c:47: error: `CONFIG_ALSA_MUXER' undeclared (first use in this function)
libavdevice/alldevices.c:47: error: (Each undeclared identifier is reported only once
libavdevice/alldevices.c:47: error: for each function it appears in.)
libavdevice/alldevices.c:47: error: `CONFIG_ALSA_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:48: error: `CONFIG_AUDIO_BEOS_MUXER' undeclared (first use in this function)
libavdevice/alldevices.c:48: error: `CONFIG_AUDIO_BEOS_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:49: error: `CONFIG_BKTR_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:50: error: `CONFIG_DV1394_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:51: error: `CONFIG_OSS_MUXER' undeclared (first use in this function)
libavdevice/alldevices.c:51: error: `CONFIG_OSS_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:52: error: `CONFIG_V4L2_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:53: error: `CONFIG_V4L_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:54: error: `CONFIG_VFWCAP_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:55: error: `CONFIG_X11_GRAB_DEVICE_DEMUXER' undeclared (first use in this function)
libavdevice/alldevices.c:58: error: `CONFIG_LIBDC1394_DEMUXER' undeclared (first use in this function)
make: *** [libavdevice/alldevices.o] Error 1</description>
		<content:encoded><![CDATA[<p>Hi Alasdair,</p>
<p> I was trying to compile ffmpeg on Solaris 10 but hit the error below. I only need it to generate thumbnails out of 3gp and mp4 files.</p>
<p>I used gnu gcc 3.4.6 and make 3.8.1.</p>
<p>Any advice is greatly appreciated. Thanks.</p>
<p>gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I&#8221;/export/home/mbit/tmp/ffmpeg-0.5&#8243; -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fPIC -std=c99 -D__EXTENSIONS__ -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wundef -O3 -fno-math-errno       -c -o libavdevice/alldevices.o libavdevice/alldevices.c<br />
libavdevice/alldevices.c: In function `avdevice_register_all&#8217;:<br />
libavdevice/alldevices.c:47: error: `CONFIG_ALSA_MUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:47: error: (Each undeclared identifier is reported only once<br />
libavdevice/alldevices.c:47: error: for each function it appears in.)<br />
libavdevice/alldevices.c:47: error: `CONFIG_ALSA_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:48: error: `CONFIG_AUDIO_BEOS_MUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:48: error: `CONFIG_AUDIO_BEOS_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:49: error: `CONFIG_BKTR_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:50: error: `CONFIG_DV1394_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:51: error: `CONFIG_OSS_MUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:51: error: `CONFIG_OSS_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:52: error: `CONFIG_V4L2_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:53: error: `CONFIG_V4L_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:54: error: `CONFIG_VFWCAP_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:55: error: `CONFIG_X11_GRAB_DEVICE_DEMUXER&#8217; undeclared (first use in this function)<br />
libavdevice/alldevices.c:58: error: `CONFIG_LIBDC1394_DEMUXER&#8217; undeclared (first use in this function)<br />
make: *** [libavdevice/alldevices.o] Error 1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alasdair</title>
		<link>http://blogs.everycity.co.uk/alasdair/2009/05/ffmpeg-64bit-x86_64-amd64-on-solaris-10/#comment-103</link>
		<dc:creator>Alasdair</dc:creator>
		<pubDate>Mon, 18 May 2009 12:20:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.everycity.co.uk/alasdair/?p=205#comment-103</guid>
		<description>(Also sent via email)

I can certainly help, but my build environment is probably quite different from the one you're using. For example, I spent a weekend compiling up gcc 4.4.0, the latest GNU Binutils (for the GNU Assembler "as"), Yasm (assembler), along with compiling up all the dependencies (x264, faac, faad2, etc).

I've attached the patches I use (sent via email). Here is the big configure line I use to build it:

./configure --prefix=/opt/ec --disable-shared --enable-nonfree --enable-gpl --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-encoder=nellymoser --enable-avfilter --disable-debug --enable-swscale --enable-postproc --enable-pthreads --enable-mmx --enable-mmx2 --enable-sse --enable-ssse3 --enable-yasm

However I'd recommend starting off just compiling the base ffmpeg build with no dependencies, so:

export CC=gcc
export CXX=g++
export LDFLAGS="-L/opt/sfw/lib -R/opt/sfw/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/lib -R/usr/lib"
export CPPFLAGS="-I/usr/sfw/include -I/opt/sfw/include"
export CFLAGS=$CPPFLAGS
export PATH=/usr/ucb/bin:/usr/sfw/bin:/opt/sfw/bin:$PATH

./configure --prefix=/opt/ec --disable-shared --enable-nonfree --enable-gpl --disable-encoder=nellymoser --disable-debug --enable-swscale --enable-postproc --enable-pthreads --disable-mmx --disable-mmx2 --disable-sse --disable-ssse3 --disable-yasm

The most important options there are "--disable-encoder=nellymoser" and "--disable-mmx". The nellymosser encoder won't compile on Solaris 10 (at least not with gcc 3.4) 

I've attached the patches we use. You'll need to apply them with gpatch from SFWdiffu (on the Solaris 10 companion CD), and SFWcoreu is needed for the GNU install program.

The avcodec.h and eval.c patches get around an issue with the NAN definition in the Solaris c library/maths includes/something like that.

The configure patch replaces grep with ggrep, and also changes the linker flags from the GNU ld options to Sun ld options. (Eg "-Wl,-soname" gets replaced with "-Wl,-h" and "-shared" gets replaced with "-G")

The Makefile and subdir.mak patches replace the "install" command with /opt/sfw/bin/install which supports funkier options.

If you get stuck, give me the full details and I'll try and help.

Cheers,

Alasdair

Patches:


--- ../ffmpeg-0.5/libavcodec/avcodec.h  2009-02-26 23:47:32.000000000 +0000
+++ libavcodec/avcodec.h        2009-04-21 03:57:11.489912835 +0100
@@ -3332,6 +3332,11 @@
 #define AVERROR_EOF         AVERROR(EPIPE)   /**&lt; End of file. */
 #define AVERROR_PATCHWELCOME    -MKTAG('P','A','W','E') /**&lt; Not yet implemented in FFmpeg. Patches welcome. */

+#ifdef __sun__
+#undef isnan
+#define isnan(x)        __extension__( { __typeof(x) __x_n = (x); __builtin_isunordered(__x_n, __x_n); })
+#endif
+
 /**
  * Registers the hardware accelerator \p hwaccel.
  */
--- configure.orig      2009-04-20 17:39:56.149935094 +0100
+++ configure   2009-04-20 17:40:04.056794980 +0100
@@ -1217,7 +1217,7 @@
     disable source_path_used
 else
     source_path="`cd \"$source_path\"; pwd`"
-    echo "$source_path" &#124; grep -q '[[:blank:]]' &#038;&#038;
+    echo "$source_path" &#124; ggrep -q '[[:blank:]]' &#038;&#038;
         die "Out of tree builds are impossible with whitespace in source path."
 fi

@@ -1363,13 +1363,13 @@
 fi
 rm $TMPSH

-if   $cc --version 2&gt;/dev/null &#124; grep -qi gcc; then
+if   $cc --version 2&gt;/dev/null &#124; ggrep -qi gcc; then
     cc_type=gcc
-elif $cc --version 2&gt;/dev/null &#124; grep -q Intel; then
+elif $cc --version 2&gt;/dev/null &#124; ggrep -q Intel; then
     cc_type=icc
-elif $cc -v 2&gt;&#038;1 &#124; grep -q xlc; then
+elif $cc -v 2&gt;&#038;1 &#124; ggrep -q xlc; then
     cc_type=xlc
-elif $cc -V 2&gt;/dev/null &#124; grep -q Compaq; then
+elif $cc -V 2&gt;/dev/null &#124; ggrep -q Compaq; then
     cc_type=ccc
     DEPEND_CMD='$(CC) $(CFLAGS) -M $&lt; &#124; sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
     add_ldflags -Wl,-z,now # calls to libots crash without this
@@ -1488,7 +1488,7 @@
         # helps building libavcodec
         add_cflags -DPIC -fomit-frame-pointer
         # 3 gcc releases known for BeOS, each with ugly bugs
-        gcc_version="`$cc -v 2&gt;&#038;1 &#124; grep version &#124; cut -d ' ' -f3-`"
+        gcc_version="`$cc -v 2&gt;&#038;1 &#124; ggrep version &#124; cut -d ' ' -f3-`"
         case "$gcc_version" in
           2.9-beos-991026*&#124;2.9-beos-000224*) echo "R5/GG gcc"
             disable mmx
@@ -1503,7 +1503,7 @@
         # no need for libm, but the inet stuff
         # Check for BONE
         # XXX: actually should check for NOT net_server
-        if echo $BEINCLUDES &#124; grep -q 'headers/be/bone'; then
+        if echo $BEINCLUDES &#124; ggrep -q 'headers/be/bone'; then
             network_extralibs="-lbind -lsocket"
         else
             enable beos_netserver
@@ -1798,7 +1798,7 @@
 check_cc &lt;&lt;EOF &#124;&#124; die "Symbol mangling check failed."
 int ff_extern;
 EOF
-sym=$($nm -P -g $TMPO &#124; grep ff_extern)
+sym=$($nm -P -g $TMPO &#124; ggrep ff_extern)
 extern_prefix=${sym%%ff_extern*}

 check_asm inline_asm '""'
@@ -1896,7 +1896,7 @@
 check_cc &lt;&lt;EOF &#124;&#124; die "endian test failed"
 unsigned int endian = 'B' &lt;&lt; 24 &#124; 'I' &lt;&lt; 16 &#124; 'G' &lt;&lt; 8 &#124; 'E';
 EOF
-od -A n -t x1 $TMPO &#124; grep -q '42 *49 *47 *45' &#038;&#038; enable bigendian
+od -A n -t x1 $TMPO &#124; ggrep -q '42 *49 *47 *45' &#038;&#038; enable bigendian

 # ---
 # check availability of some header files
@@ -2413,7 +2413,7 @@
 get_version(){
     name=$1
     file=$source_path/$2
-    eval $(grep "#define ${name}_VERSION_M" "$file" &#124; awk '{ print $2"="$3 }')
+    eval $(ggrep "#define ${name}_VERSION_M" "$file" &#124; awk '{ print $2"="$3 }')
     eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
     lcname=$(tolower $name)
     eval echo "${lcname}_VERSION=\$${name}_VERSION" &gt;&gt; config.mak
--- configure.orig      2009-04-30 11:46:11.291955480 +0100
+++ configure   2009-04-30 19:15:18.249680048 +0100
@@ -1186,7 +1186,7 @@

 # build settings
 add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
-SHFLAGS='-shared -Wl,-soname,$$(@F)'
+SHFLAGS='-G -Wl,-h,$$(@F)'
 VHOOKSHFLAGS='$(SHFLAGS)'
 FFSERVERLDFLAGS=-Wl,-E
 LIBPREF="lib"
@@ -1511,7 +1511,7 @@
         fi ;;
     sunos)
         FFSERVERLDFLAGS=""
-        SHFLAGS='-shared -Wl,-h,$$(@F)'
+        SHFLAGS='-G -Wl,-h,$$(@F)'
         network_extralibs="-lsocket -lnsl"
         add_cflags -D__EXTENSIONS__
         ;;
--- libavcodec/eval.c.orig      2009-04-21 03:01:49.851148671 +0100
+++ libavcodec/eval.c   2009-04-21 03:02:20.718605667 +0100
@@ -36,7 +36,8 @@
 #include &lt;string.h&gt;
 #include &lt;math.h&gt;

-#ifndef NAN
+#if !defined(NAN) &#124;&#124; defined(__sun__)
+  #undef NAN
   #define NAN 0.0/0.0
 #endif

--- /root/ffmpeg-0.5/Makefile   2009-02-21 18:41:52.000000000 +0000
+++ Makefile    2009-04-21 04:13:35.950911706 +0100
@@ -130,20 +130,20 @@
 install: $(INSTALL_TARGETS-yes)

 install-progs: $(PROGS) $(INSTALL_PROGS_TARGETS-yes)
-       install -d "$(BINDIR)"
-       install -c -m 755 $(PROGS) "$(BINDIR)"
+       /opt/sfw/bin/install -d "$(BINDIR)"
+       /opt/sfw/bin/install -c -m 755 $(PROGS) "$(BINDIR)"

 install-data: $(DATA_FILES)
-       install -d "$(DATADIR)"
-       install -m 644 $(DATA_FILES) "$(DATADIR)"
+       /opt/sfw/bin/install -d "$(DATADIR)"
+       /opt/sfw/bin/install -m 644 $(DATA_FILES) "$(DATADIR)"

 install-man: $(MANPAGES)
-       install -d "$(MANDIR)/man1"
-       install -m 644 $(MANPAGES) "$(MANDIR)/man1"
+       /opt/sfw/bin/install -d "$(MANDIR)/man1"
+       /opt/sfw/bin/install -m 644 $(MANPAGES) "$(MANDIR)/man1"

 install-vhook: videohook
-       install -d "$(SHLIBDIR)/vhook"
-       install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
+       /opt/sfw/bin/install -d "$(SHLIBDIR)/vhook"
+       /opt/sfw/bin/install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"

 uninstall: uninstall-progs uninstall-data uninstall-man uninstall-vhook

--- /root/ffmpeg-0.5/subdir.mak 2008-12-13 15:31:30.000000000 +0000
+++ subdir.mak  2009-04-21 04:13:22.495144385 +0100
@@ -38,8 +38,8 @@
 endif

 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
-       install -d "$(SHLIBDIR)"
-       install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
+       /opt/sfw/bin/install -d "$(SHLIBDIR)"
+       /opt/sfw/bin/install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
        $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
        cd "$(SHLIBDIR)" &#038;&#038; \
                $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
@@ -48,15 +48,15 @@
        $(SLIB_INSTALL_EXTRA_CMD)

 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
-       install -d "$(LIBDIR)"
-       install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)"
+       /opt/sfw/bin/install -d "$(LIBDIR)"
+       /opt/sfw/bin/install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)"
        $(LIB_INSTALL_EXTRA_CMD)

 install-headers::
-       install -d "$(INCINSTDIR)"
-       install -d "$(LIBDIR)/pkgconfig"
-       install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
-       install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
+       /opt/sfw/bin/install -d "$(INCINSTDIR)"
+       /opt/sfw/bin/install -d "$(LIBDIR)/pkgconfig"
+       /opt/sfw/bin/install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
+       /opt/sfw/bin/install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"

 uninstall-libs::
        -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
--- version.sh.orig     2009-04-21 04:01:36.837398303 +0100
+++ version.sh  2009-03-03 12:47:47.000000000 +0000
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/ksh

 revision=0.5</description>
		<content:encoded><![CDATA[<p>(Also sent via email)</p>
<p>I can certainly help, but my build environment is probably quite different from the one you&#8217;re using. For example, I spent a weekend compiling up gcc 4.4.0, the latest GNU Binutils (for the GNU Assembler &#8220;as&#8221;), Yasm (assembler), along with compiling up all the dependencies (x264, faac, faad2, etc).</p>
<p>I&#8217;ve attached the patches I use (sent via email). Here is the big configure line I use to build it:</p>
<p>./configure &#8211;prefix=/opt/ec &#8211;disable-shared &#8211;enable-nonfree &#8211;enable-gpl &#8211;enable-libamr-nb &#8211;enable-libamr-wb &#8211;enable-libdirac &#8211;enable-libfaac &#8211;enable-libfaad &#8211;enable-libmp3lame &#8211;enable-libopenjpeg &#8211;enable-libschroedinger &#8211;enable-libtheora &#8211;enable-libvorbis &#8211;enable-libx264 &#8211;enable-libxvid &#8211;disable-encoder=nellymoser &#8211;enable-avfilter &#8211;disable-debug &#8211;enable-swscale &#8211;enable-postproc &#8211;enable-pthreads &#8211;enable-mmx &#8211;enable-mmx2 &#8211;enable-sse &#8211;enable-ssse3 &#8211;enable-yasm</p>
<p>However I&#8217;d recommend starting off just compiling the base ffmpeg build with no dependencies, so:</p>
<p>export CC=gcc<br />
export CXX=g++<br />
export LDFLAGS=&#8221;-L/opt/sfw/lib -R/opt/sfw/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/lib -R/usr/lib&#8221;<br />
export CPPFLAGS=&#8221;-I/usr/sfw/include -I/opt/sfw/include&#8221;<br />
export CFLAGS=$CPPFLAGS<br />
export PATH=/usr/ucb/bin:/usr/sfw/bin:/opt/sfw/bin:$PATH</p>
<p>./configure &#8211;prefix=/opt/ec &#8211;disable-shared &#8211;enable-nonfree &#8211;enable-gpl &#8211;disable-encoder=nellymoser &#8211;disable-debug &#8211;enable-swscale &#8211;enable-postproc &#8211;enable-pthreads &#8211;disable-mmx &#8211;disable-mmx2 &#8211;disable-sse &#8211;disable-ssse3 &#8211;disable-yasm</p>
<p>The most important options there are &#8220;&#8211;disable-encoder=nellymoser&#8221; and &#8220;&#8211;disable-mmx&#8221;. The nellymosser encoder won&#8217;t compile on Solaris 10 (at least not with gcc 3.4) </p>
<p>I&#8217;ve attached the patches we use. You&#8217;ll need to apply them with gpatch from SFWdiffu (on the Solaris 10 companion CD), and SFWcoreu is needed for the GNU install program.</p>
<p>The avcodec.h and eval.c patches get around an issue with the NAN definition in the Solaris c library/maths includes/something like that.</p>
<p>The configure patch replaces grep with ggrep, and also changes the linker flags from the GNU ld options to Sun ld options. (Eg &#8220;-Wl,-soname&#8221; gets replaced with &#8220;-Wl,-h&#8221; and &#8220;-shared&#8221; gets replaced with &#8220;-G&#8221;)</p>
<p>The Makefile and subdir.mak patches replace the &#8220;install&#8221; command with /opt/sfw/bin/install which supports funkier options.</p>
<p>If you get stuck, give me the full details and I&#8217;ll try and help.</p>
<p>Cheers,</p>
<p>Alasdair</p>
<p>Patches:</p>
<p>&#8212; ../ffmpeg-0.5/libavcodec/avcodec.h  2009-02-26 23:47:32.000000000 +0000<br />
+++ libavcodec/avcodec.h        2009-04-21 03:57:11.489912835 +0100<br />
@@ -3332,6 +3332,11 @@<br />
 #define AVERROR_EOF         AVERROR(EPIPE)   /**< End of file. */<br />
 #define AVERROR_PATCHWELCOME    -MKTAG('P','A','W','E') /**< Not yet implemented in FFmpeg. Patches welcome. */</p>
<p>+#ifdef __sun__<br />
+#undef isnan<br />
+#define isnan(x)        __extension__( { __typeof(x) __x_n = (x); __builtin_isunordered(__x_n, __x_n); })<br />
+#endif<br />
+<br />
 /**<br />
  * Registers the hardware accelerator \p hwaccel.<br />
  */<br />
--- configure.orig      2009-04-20 17:39:56.149935094 +0100<br />
+++ configure   2009-04-20 17:40:04.056794980 +0100<br />
@@ -1217,7 +1217,7 @@<br />
     disable source_path_used<br />
 else<br />
     source_path="`cd \"$source_path\"; pwd`"<br />
-    echo "$source_path" | grep -q '[[:blank:]]' &#038;&#038;<br />
+    echo "$source_path" | ggrep -q '[[:blank:]]' &#038;&#038;<br />
         die "Out of tree builds are impossible with whitespace in source path."<br />
 fi</p>
<p>@@ -1363,13 +1363,13 @@<br />
 fi<br />
 rm $TMPSH</p>
<p>-if   $cc --version 2>/dev/null | grep -qi gcc; then<br />
+if   $cc &#8211;version 2>/dev/null | ggrep -qi gcc; then<br />
     cc_type=gcc<br />
-elif $cc &#8211;version 2>/dev/null | grep -q Intel; then<br />
+elif $cc &#8211;version 2>/dev/null | ggrep -q Intel; then<br />
     cc_type=icc<br />
-elif $cc -v 2>&#038;1 | grep -q xlc; then<br />
+elif $cc -v 2>&#038;1 | ggrep -q xlc; then<br />
     cc_type=xlc<br />
-elif $cc -V 2>/dev/null | grep -q Compaq; then<br />
+elif $cc -V 2>/dev/null | ggrep -q Compaq; then<br />
     cc_type=ccc<br />
     DEPEND_CMD=&#8217;$(CC) $(CFLAGS) -M $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'<br />
     add_ldflags -Wl,-z,now # calls to libots crash without this<br />
@@ -1488,7 +1488,7 @@<br />
         # helps building libavcodec<br />
         add_cflags -DPIC -fomit-frame-pointer<br />
         # 3 gcc releases known for BeOS, each with ugly bugs<br />
-        gcc_version="`$cc -v 2>&#038;1 | grep version | cut -d &#8216; &#8216; -f3-`&#8221;<br />
+        gcc_version=&#8221;`$cc -v 2>&#038;1 | ggrep version | cut -d &#8216; &#8216; -f3-`&#8221;<br />
         case &#8220;$gcc_version&#8221; in<br />
           2.9-beos-991026*|2.9-beos-000224*) echo &#8220;R5/GG gcc&#8221;<br />
             disable mmx<br />
@@ -1503,7 +1503,7 @@<br />
         # no need for libm, but the inet stuff<br />
         # Check for BONE<br />
         # XXX: actually should check for NOT net_server<br />
-        if echo $BEINCLUDES | grep -q &#8216;headers/be/bone&#8217;; then<br />
+        if echo $BEINCLUDES | ggrep -q &#8216;headers/be/bone&#8217;; then<br />
             network_extralibs=&#8221;-lbind -lsocket&#8221;<br />
         else<br />
             enable beos_netserver<br />
@@ -1798,7 +1798,7 @@<br />
 check_cc < <EOF || die "Symbol mangling check failed."<br />
 int ff_extern;<br />
 EOF<br />
-sym=$($nm -P -g $TMPO | grep ff_extern)<br />
+sym=$($nm -P -g $TMPO | ggrep ff_extern)<br />
 extern_prefix=${sym%%ff_extern*}</p>
<p> check_asm inline_asm '""'<br />
@@ -1896,7 +1896,7 @@<br />
 check_cc <<EOF || die "endian test failed"<br />
 unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';<br />
 EOF<br />
-od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' &#038;&#038; enable bigendian<br />
+od -A n -t x1 $TMPO | ggrep -q '42 *49 *47 *45' &#038;&#038; enable bigendian</p>
<p> # ---<br />
 # check availability of some header files<br />
@@ -2413,7 +2413,7 @@<br />
 get_version(){<br />
     name=$1<br />
     file=$source_path/$2<br />
-    eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')<br />
+    eval $(ggrep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')<br />
     eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO<br />
     lcname=$(tolower $name)<br />
     eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak<br />
&#8212; configure.orig      2009-04-30 11:46:11.291955480 +0100<br />
+++ configure   2009-04-30 19:15:18.249680048 +0100<br />
@@ -1186,7 +1186,7 @@</p>
<p> # build settings<br />
 add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112<br />
-SHFLAGS=&#8217;-shared -Wl,-soname,$$(@F)&#8217;<br />
+SHFLAGS=&#8217;-G -Wl,-h,$$(@F)&#8217;<br />
 VHOOKSHFLAGS=&#8217;$(SHFLAGS)&#8217;<br />
 FFSERVERLDFLAGS=-Wl,-E<br />
 LIBPREF=&#8221;lib&#8221;<br />
@@ -1511,7 +1511,7 @@<br />
         fi ;;<br />
     sunos)<br />
         FFSERVERLDFLAGS=&#8221;"<br />
-        SHFLAGS=&#8217;-shared -Wl,-h,$$(@F)&#8217;<br />
+        SHFLAGS=&#8217;-G -Wl,-h,$$(@F)&#8217;<br />
         network_extralibs=&#8221;-lsocket -lnsl&#8221;<br />
         add_cflags -D__EXTENSIONS__<br />
         ;;<br />
&#8212; libavcodec/eval.c.orig      2009-04-21 03:01:49.851148671 +0100<br />
+++ libavcodec/eval.c   2009-04-21 03:02:20.718605667 +0100<br />
@@ -36,7 +36,8 @@<br />
 #include <string .h><br />
 #include<br />
<math .h>
<p>-#ifndef NAN<br />
+#if !defined(NAN) || defined(__sun__)<br />
+  #undef NAN<br />
   #define NAN 0.0/0.0<br />
 #endif</p>
<p>&#8212; /root/ffmpeg-0.5/Makefile   2009-02-21 18:41:52.000000000 +0000<br />
+++ Makefile    2009-04-21 04:13:35.950911706 +0100<br />
@@ -130,20 +130,20 @@<br />
 install: $(INSTALL_TARGETS-yes)</p>
<p> install-progs: $(PROGS) $(INSTALL_PROGS_TARGETS-yes)<br />
-       install -d &#8220;$(BINDIR)&#8221;<br />
-       install -c -m 755 $(PROGS) &#8220;$(BINDIR)&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(BINDIR)&#8221;<br />
+       /opt/sfw/bin/install -c -m 755 $(PROGS) &#8220;$(BINDIR)&#8221;</p>
<p> install-data: $(DATA_FILES)<br />
-       install -d &#8220;$(DATADIR)&#8221;<br />
-       install -m 644 $(DATA_FILES) &#8220;$(DATADIR)&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(DATADIR)&#8221;<br />
+       /opt/sfw/bin/install -m 644 $(DATA_FILES) &#8220;$(DATADIR)&#8221;</p>
<p> install-man: $(MANPAGES)<br />
-       install -d &#8220;$(MANDIR)/man1&#8243;<br />
-       install -m 644 $(MANPAGES) &#8220;$(MANDIR)/man1&#8243;<br />
+       /opt/sfw/bin/install -d &#8220;$(MANDIR)/man1&#8243;<br />
+       /opt/sfw/bin/install -m 644 $(MANPAGES) &#8220;$(MANDIR)/man1&#8243;</p>
<p> install-vhook: videohook<br />
-       install -d &#8220;$(SHLIBDIR)/vhook&#8221;<br />
-       install -m 755 $(HOOKS) &#8220;$(SHLIBDIR)/vhook&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(SHLIBDIR)/vhook&#8221;<br />
+       /opt/sfw/bin/install -m 755 $(HOOKS) &#8220;$(SHLIBDIR)/vhook&#8221;</p>
<p> uninstall: uninstall-progs uninstall-data uninstall-man uninstall-vhook</p>
<p>&#8212; /root/ffmpeg-0.5/subdir.mak 2008-12-13 15:31:30.000000000 +0000<br />
+++ subdir.mak  2009-04-21 04:13:22.495144385 +0100<br />
@@ -38,8 +38,8 @@<br />
 endif</p>
<p> install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)<br />
-       install -d &#8220;$(SHLIBDIR)&#8221;<br />
-       install -m 755 $(SUBDIR)$(SLIBNAME) &#8220;$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(SHLIBDIR)&#8221;<br />
+       /opt/sfw/bin/install -m 755 $(SUBDIR)$(SLIBNAME) &#8220;$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)&#8221;<br />
        $(STRIP) &#8220;$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)&#8221;<br />
        cd &#8220;$(SHLIBDIR)&#8221; &#038;&#038; \<br />
                $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)<br />
@@ -48,15 +48,15 @@<br />
        $(SLIB_INSTALL_EXTRA_CMD)</p>
<p> install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)<br />
-       install -d &#8220;$(LIBDIR)&#8221;<br />
-       install -m 644 $(SUBDIR)$(LIBNAME) &#8220;$(LIBDIR)&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(LIBDIR)&#8221;<br />
+       /opt/sfw/bin/install -m 644 $(SUBDIR)$(LIBNAME) &#8220;$(LIBDIR)&#8221;<br />
        $(LIB_INSTALL_EXTRA_CMD)</p>
<p> install-headers::<br />
-       install -d &#8220;$(INCINSTDIR)&#8221;<br />
-       install -d &#8220;$(LIBDIR)/pkgconfig&#8221;<br />
-       install -m 644 $(addprefix &#8220;$(SRC_DIR)&#8221;/,$(HEADERS)) &#8220;$(INCINSTDIR)&#8221;<br />
-       install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc &#8220;$(LIBDIR)/pkgconfig&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(INCINSTDIR)&#8221;<br />
+       /opt/sfw/bin/install -d &#8220;$(LIBDIR)/pkgconfig&#8221;<br />
+       /opt/sfw/bin/install -m 644 $(addprefix &#8220;$(SRC_DIR)&#8221;/,$(HEADERS)) &#8220;$(INCINSTDIR)&#8221;<br />
+       /opt/sfw/bin/install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc &#8220;$(LIBDIR)/pkgconfig&#8221;</p>
<p> uninstall-libs::<br />
        -rm -f &#8220;$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)&#8221; \<br />
&#8212; version.sh.orig     2009-04-21 04:01:36.837398303 +0100<br />
+++ version.sh  2009-03-03 12:47:47.000000000 +0000<br />
@@ -1,4 +1,4 @@<br />
-#!/bin/sh<br />
+#!/bin/ksh</p>
<p> revision=0.5</math>
<p></string></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: syngen</title>
		<link>http://blogs.everycity.co.uk/alasdair/2009/05/ffmpeg-64bit-x86_64-amd64-on-solaris-10/#comment-102</link>
		<dc:creator>syngen</dc:creator>
		<pubDate>Mon, 18 May 2009 06:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.everycity.co.uk/alasdair/?p=205#comment-102</guid>
		<description>Hi. Can you share some of the patches, steps you took to make ffmpeg compile on Solaris 10?
I'm kinda stuck. Can't seem to get it to work.
Any assist will be extremely appreciated.

Cheers!</description>
		<content:encoded><![CDATA[<p>Hi. Can you share some of the patches, steps you took to make ffmpeg compile on Solaris 10?<br />
I&#8217;m kinda stuck. Can&#8217;t seem to get it to work.<br />
Any assist will be extremely appreciated.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
