HOWTO build the
MPlayer-1.0pre5 Movie Player on HP-UX 11.11 (11.i)
by Martin Gansser
Version 2.7
(26.11.2004)
Objectives
This HOWTO explains how to build the MPlayer
movie player on HP-UX 11.11
Important notice: MPlayer must be built using GCC, HP cc
will not
produce a working program.
1. Install the GNU C compiler (using version 3.4.3-32) from: http://www.cmve.net/~mbrand/gcc-3.4.3-32-11.11-hppa2.0.tbz
tar xfz gcc-3.4.1-32-11.00-hppa2.0.tbz -C /usr/local
2. Install GNU make 3.80
cp make-3.80-sd-11.11.depot.gz /tmp
gunzip make-3.80-sd-11.11.depot.gz
swinstall -s /tmp/make-3.80-sd-11.11.depot make
3. Install GNU audiofile
0.2.6
cp audiofile-0.2.6-sd-11.11.depot.gz
/tmp
gunzip audiofile-0.2.6-sd-11.11.depot.gz
swinstall -s /tmp/audiofile-0.2.6-sd-11.11.depot audiofile
4. Install GNU esound 0.2.35
cp esound-0.2.35-sd-11.11.depot.gz
/tmp
gunzip esound-0.2.35-sd-11.11.depot.gz
swinstall -s /tmp/esound-0.2.35-sd-11.11.depot
esound
5.
Build SDL-1.2.7
gunzip SDL-1.2.7.tar.gz
| tar xf -
setenv CC
"/usr/local/pa20_32/bin/gcc"
setenv CXX "/usr/local/pa20_32/bin/g++"
setenv CFLAGS
"-DISABLE_JOYSTICK"
gmake distclean
gmake clean
#
./configure --prefix=/usr/local \
--disable-joystick \
--enable-static=no \
--enable-cdrom=no \
--enable-oss=no \
--enable-alsa=no
\
--enable-video=yes \
--enable-events=yes \
--enable-timers=yes \
--enable-esd=yes \
--with-esd-prefix=/usr/local \
--with-x=yes \
--enable-video-x11=yes \
--enable-video-opengl=yes
gmake && gmake install
6. Install Mesa
for OpenGL functionality
cp Mesa-6.0.1-sd-11.11.depot.gz
/tmp
gunzip Mesa-6.0.1-sd-11.11.depot.gz
swinstall -s /tmp/Mesa-6.0.1-sd-11.11.depot Mesa
7. Build libmad
gunzip
-c mad-0.14.2b.tar.gz | tar xf -
cd mad-0.14.2b
./configure && gmake && gmake install
8. Unpack
MPlayer sources
bunzip2
-c MPlayer-1.0pre5.tar.bz2
| tar xf -
cd MPlayer-1.0pre5
9. Build MPlayer
without the gui
for gtk
set
path=( /usr/local/pa20_32/bin $path )
setenv CC
"/usr/local/pa20_32/bin/gcc"
setenv
CXX "/usr/local/pa20_32/bin/g++"
gmake
clean
gmake
distclean
./configure
--prefix=/opt/MPlayer --enable-gl --enable-freetype \
--with-extralibdir="/usr/lib
-lrt -L/usr/local/lib
-lpng" \
--enable-sdl \
--with-sdl-config=/usr/local/bin/sdl-config
gmake
&& gmake install
10. Copy
configuration file
cp
MPlayer-1.0pre5/etc/input.conf
/opt/MPlayer/etc/mplayer
11. Start
MPlayer in text Mode
/opt/MPlayer/bin/mplayer
12. Available
video output drivers:
# ./mplayer -vo help
MPlayer 1.0pre5-3.4.3 (C) 2000-2004
MPlayer Team
CPU: Hewlett-Packard PA-RISC
Reading config file
/opt/MPlayer/etc/mplayer/mplayer.conf: No such file or directory
Reading config file
//.mplayer/config
Available video output drivers:
x11 X11 (
XImage/Shm )
xover General X11
driver for overlay capable video output drivers
sdl SDL
YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
null Null video
output
pgm PGM file
md5 MD5 sum
mpegpes Mpeg-PES file
yuv4mpeg
yuv4mpeg output for mjpegtools (to "stream.yuv")
tga Targa output
13. Available
audio output drivers:
#
./mplayer -ao help
MPlayer 1.0pre5-3.4.3 (C) 2000-2004
MPlayer Team
CPU: Hewlett-Packard PA-RISC
Reading config file
/opt/MPlayer/etc/mplayer/mplayer.conf: No such file or directory
Reading config file
//.mplayer/config
Available audio output drivers:
mpegpes Mpeg-PES audio output
esd EsounD audio
output
sdl SDLlib audio
output
null Null audio
output
pcm RAW PCM/WAVE
file writer audio output
plugin Plugin audio
output
14. Playback of a MPEG file
with SDL
# mplayer -vo sdl /tmp/titanic.mpeg
15. Create DVD Device
scan the scsi bus
with:
# ioscan -fn
Class
I
H/W Path
Driver
S/W State H/W
Type Description |
The screen output shows an Pioneer DVD-Rom at
SCSI address 2.
The Card Instance for Hardware Path 8/16 is 1.
16. Create a link from raw
device to dvd device
# ln -s
/dev/rdsk/c<SCSI bus instance>t<SCSI target ID>d<LUN>
/dev/<device>
example:
# ln -s /dev/rdsk/c1t2d0 /dev/dvd
17. Play a DVD-Film from
DVD-Drive
play with sound:
# mplayer
-vo sdl dvd://2
play w/o sound:
# mplayer -vo sdl -ao
null dvd://2
Important
information:
With this version, it should be
possible to play the following Video/Audio formats from disc or direct
from a DVD
Drive:
Video: MPEG 1/2; AVI; video/VOB;
DIVX; QuickTime/MOV
Audio: wav; mp3
1. The video output mode gl and gl2
work, however, the speed can be very bad depending on the cpu speed.
2. Crash at Start with the
following error message:
/usr/lib/dld.sl:
Unresolved symbol: finite (code) from
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/../../../libGL.sl
This mean that the function
‘finite()‘ isn’t available in standard HP-UX math library.
Instead there is ‘isfinite()‘.
Solution:
Use
the latest Mesa depot file
3. Crash at playback with the
following error message:
/usr/lib/dld.sl:
Unresolved symbol: sem_init (code) from /usr/local/lib/libSDL-1.2.sl.0
Solution:
use the extralib option at configure
--with-extralibdir="/usr/lib
-lrt"
4. MPlayer segfaults with a
messages like this:
Pid
10166 received a SIGSEGV for stack growth failure.
Possible causes: insufficient
memory or swap space, or stack size exceeded maxssiz.
Segmentation fault
Solution:
The HP-UX kernel
has a default stack size of 8MB(?) per process.(11.0 and newer 10.20
patches
let you increase maxssiz up to 350MB for 32-bit programs). You need to
extend maxssiz
and recompile the kernel (and reboot). You can use SAM to do this.
(While you are at it, check the
maxdsiz parameter for the maximum
amount of data a program can use. It will depend on your
applications if the default of 64MB is enough or not.)