[libavg-devel] notes: compiling libavg on OSX 10.4 + fink
Ciro Cattuto
ciro.cattuto at gmail.com
Mon Aug 20 02:04:26 CEST 2007
Hello,
building libavg on my G4 PowerBook running OSX (plus Fink)
was not exactly straightforward (euphemism!) but it eventually worked out.
I'm posting here some notes of mine that may be useful to other people.
I had to patch the sources (see below),
which is why I'm posting this to libavg-devel as well.
Cheers, Ciro
1. OS and toolchain
===================
Mac OS X 10.4.10 powerpc, build 8R218
Xcode 2.4.1
gcc/g++ gcc version 4.0.1 (Apple Computer, Inc. build 5367)
fink 0.8.1.rsync powerpc (default /sw prefix)
autoconf 2.60-4
automake1.8 1.8.5-4
libtool14 1.5.22-1000
libtool14-shlibs 1.5.22-1000
2. libavg dependencies (fink packages)
======================================
boost-jam 3.1.13-1
boost1.33 1.33.1-1008
boost1.33-shlibs 1.33.1-1008
ffmpeg 0.4.9-pre1-1012
ffmpeg-dev 0.4.9-pre1-1012
libavcodec1-dev 0.4.9-pre1-1012
libavcodec1-shlibs 0.4.9-pre1-1012
libavformat1-dev 0.4.9-pre1-1012
libavformat1-shlibs 0.4.9-pre1-1012
imagemagick10-dev 6.2.8-1002
imagemagick10-shlibs 6.2.8-1002
sdl 1.2.11-1
sdl-shlibs 1.2.11-1
libxml2 2.6.26-1001
libxml2-bin 2.6.26-1001
libxml2-shlibs 2.6.26-1001
freetype219 2.2.1-4
freetype219-shlibs 2.2.1-4
pango1-xft2 1.10.1-1001
pango1-xft2-dev 1.10.1-1001
pango1-xft2-shlibs 1.10.1-1001
python25 2.5-2
python25-shlibs 2.5-2
3. libavg sources
=================
libavg SVN trunk, revision 2241
svn co https://www.libavg.de/svn/trunk/libavg@2241
in order to build the library, revision 2241 has to be patched
to fix a few issues (see bottom of this message):
patch -p0 < ~/libavg_2241.patch
(libavg_2241.patch is attached to this message)
4. Shell environment
====================
Assuming that the shell is bash, we set up the following environment:
export CXXFLAGS=-I/sw/include
export LDFLAGS=-L/sw/lib
export BOOST_ROOT=/sw/include/boost
export BOOST_THREAD_LIB=boost_thread
export FFMPEG_CFLAGS=-I/sw/include/ffmpeg
export FFMPEG_LIBS="-L/sw/lib -lavcodec -lavformat"
export PYTHON=python2.5
export PYTHONPATH=/usr/local/lib/python2.5/site-packages
5. Building libavg
==================
./bootstrap
./configure --with-apple-opengl-framework
make
sudo make install
6. Test cases
=============
cd src/test
python2.5 Test.py
most test cases pass. The following fail:
FAIL: testVideo (__main__.PlayerTestCase)
FAIL: testVideoSeek (__main__.PlayerTestCase)
FAIL: testVideoEOF (__main__.PlayerTestCase)
see attached log (test_results.txt) for more information
and - possibly - for help. ;-)
==============================================================================
PATCH AGAINST libavg sources, SVN trunk, revision 2241
(also attached as libavg_2241.patch):
Index: src/video/FFMpegDemuxer.cpp
===================================================================
--- src/video/FFMpegDemuxer.cpp (revision 2241)
+++ src/video/FFMpegDemuxer.cpp (working copy)
@@ -110,7 +110,7 @@
for (it=m_PacketLists.begin(); it != m_PacketLists.end(); ++it) {
int CurStreamIndex = it->first;
AVStream * pStream = m_pFormatContext->streams[CurStreamIndex];
- avcodec_flush_buffers(pStream->codec);
+ avcodec_flush_buffers(&pStream->codec);
}
}
Index: src/video/AsyncDemuxer.h
===================================================================
--- src/video/AsyncDemuxer.h (revision 2241)
+++ src/video/AsyncDemuxer.h (working copy)
@@ -22,6 +22,8 @@
#ifndef _AsyncDemuxer_H_
#define _AsyncDemuxer_H_
+#include <math.h>
+
#include "IDemuxer.h"
#include "VideoDemuxerThread.h"
Index: src/video/VideoDemuxerThread.h
===================================================================
--- src/video/VideoDemuxerThread.h (revision 2241)
+++ src/video/VideoDemuxerThread.h (working copy)
@@ -22,6 +22,8 @@
#ifndef _VideoDemuxerThread_H_
#define _VideoDemuxerThread_H_
+#include <math.h>
+
#include "FFMpegDemuxer.h"
#include "PacketVideoMsg.h"
Index: bootstrap
===================================================================
--- bootstrap (revision 2241)
+++ bootstrap (working copy)
@@ -5,11 +5,11 @@
then
# This uses locally-installed libtoolize and automake since the
apple-supplied one is buggy
# as of OS X 10.4.7
- ../bin/libtoolize --copy --force
- ../bin/aclocal -I m4
+ libtoolize --copy --force
+ aclocal -I m4
# Patch that fixes 'local relocation entries in non-writable
section' linker error.
patch < aclocal.m4.patch
- ../bin/automake --foreign --add-missing --copy
+ automake --foreign --add-missing --copy
autoconf
else
libtoolize --copy --force
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libavg_2241.patch
Type: application/octet-stream
Size: 1895 bytes
Desc: not available
Url : http://mail.datenhain.de/pipermail/libavg-devel/attachments/20070820/48af4c13/libavg_2241-0001.obj
-------------- next part --------------
[07-08-20 01:04:38.572] LOGGER: Logging started
....[07-08-20 01:04:47.596] ERROR: ImageMagick: unable to open file `/Users/ciro/svn/libavg/src/test/filedoesntexist.png'
........[07-08-20 01:04:50.857] ERROR: File /Users/ciro/svn/libavg/src/test/filedoesntexist.avg not found.
/Users/ciro/svn/libavg/src/test/noxml.avg:2: parser error : Start tag expected, '<' not found
xxx<avg width="400" height="300">
^
[07-08-20 01:04:50.862] ERROR: Error parsing xml document /Users/ciro/svn/libavg/src/test/noxml.avg
/Users/ciro/svn/libavg/src/test/noavg.avg:2: element bla: validity error : No declaration for element bla
[07-08-20 01:04:50.866] ERROR: noavg.avg does not validate.
/Users/ciro/svn/libavg/src/test/noavg2.avg:2: element avg: validity error : No declaration for attribute invalidattribute of element avg
[07-08-20 01:04:50.882] ERROR: noavg2.avg does not validate.
......
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 12, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial Bold 12, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 12, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 12, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 12, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 12, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 15, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial Bold 15, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial Italic 15, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 18, falling back to /Library/Fonts/#Gungseouche.dfont
(process:2156): Pango-WARNING **: Unable to open font file /Library/Fonts/Arial for font Arial 12, falling back to /Library/Fonts/#Gungseouche.dfont
[07-08-20 01:05:01.342] WARNING: Image compare: 4716 bright pixels.
[07-08-20 01:05:01.342] WARNING: Image testWords1 differs from original.
[07-08-20 01:05:02.870] WARNING: Image compare: 4681 bright pixels.
[07-08-20 01:05:02.870] WARNING: Image testWords2 differs from original.
[07-08-20 01:05:04.353] WARNING: Image compare: 4681 bright pixels.
[07-08-20 01:05:04.353] WARNING: Image testWords3 differs from original.
[07-08-20 01:05:06.006] WARNING: Image compare: 4950 bright pixels.
[07-08-20 01:05:06.007] WARNING: Image testWords4 differs from original.
.[07-08-20 01:05:07.010] WARNING: Image compare: 79 bright pixels.
F[07-08-20 01:05:07.640] WARNING: Image compare: 5319 bright pixels.
FF..[07-08-20 01:05:12.371] WARNING: getElementByID("newImage") failed.
..[07-08-20 01:05:14.047] WARNING: Image compare: 29 bright pixels.
[07-08-20 01:05:14.047] WARNING: Image testWordsDynamics1 differs from original.
[07-08-20 01:05:14.558] WARNING: Image compare: 40 bright pixels.
[07-08-20 01:05:14.558] WARNING: Image testWordsDynamics3 differs from original.
..[07-08-20 01:05:15.305] ERROR: Firewire camera specified, but firewire support not compiled in.
[07-08-20 01:05:15.388] ERROR: Firewire camera specified, but firewire support not compiled in.
..
======================================================================
FAIL: testVideo (__main__.PlayerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Test.py", line 632, in testVideo
Player.stop))
File "Test.py", line 71, in start
Player.play()
File "Test.py", line 74, in nextAction
self.actions[self.curFrame]()
File "Test.py", line 619, in <lambda>
lambda: self.compareImage("testVideo4", False),
File "Test.py", line 99, in compareImage
self.assert_(False)
AssertionError
======================================================================
FAIL: testVideoSeek (__main__.PlayerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Test.py", line 649, in testVideoSeek
Player.stop))
File "Test.py", line 71, in start
Player.play()
File "Test.py", line 74, in nextAction
self.actions[self.curFrame]()
File "Test.py", line 641, in <lambda>
lambda: self.compareImage("testVideoSeek1", False),
File "Test.py", line 99, in compareImage
self.assert_(False)
AssertionError
======================================================================
FAIL: testVideoEOF (__main__.PlayerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Test.py", line 670, in testVideoEOF
Player.play()
File "Test.py", line 663, in onNoEOF
self.assert_(False)
AssertionError
----------------------------------------------------------------------
Ran 30 tests in 37.318s
FAILED (failures=3)
-------- testImage --------
-------- testError --------
-------- testExceptionInTimeout --------
-------- testInvalidImageFilename --------
-------- testInvalidVideoFilename --------
-------- testEvents --------
-------- testEventCapture --------
-------- testTimeouts --------
-------- testEventErr --------
-------- testHugeImage --------
-------- testPanoImage --------
-------- testBroken --------
-------- testMove --------
-------- testBlend --------
-------- testCropImage --------
-------- testCropMovie --------
-------- testWarp --------
-------- testWords --------
-------- testVideo --------
-------- testVideoSeek --------
-------- testVideoEOF --------
-------- testVideoFPS --------
-------- testAnim --------
-------- testImgDynamics --------
-------- testVideoDynamics --------
-------- testWordsDynamics --------
-------- testPanoDynamics --------
-------- testCameraDynamics --------
-------- testDivDynamics --------
More information about the libavg-devel
mailing list