Would you like to react to this message? Create an account in a few clicks or log in to continue.

Brought to you by : Chandan.
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  

 

 How-To : building mplayer on solaris, the clear way

Go down 
4 posters
AuthorMessage
chandan




Number of posts : 11
Age : 39
Registration date : 2007-04-13

How-To : building mplayer on solaris, the clear way Empty
PostSubject: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeSat May 12, 2007 9:44 am

Hi all,

Here is a simple how-to on building mplayer on solaris form sources. Well for those who are tired of trying to get stuff work form ready bvlastwave packages etc, this should proove to be helpful.

Here is a screenshot of my mplayer build as described in below procedure, playing videos on my soalris 10 Nov2006- AMD 64 bit box .

How-To : building mplayer on solaris, the clear way Solari10


The build :

Solaris 10 Nov/2006 with the companion DVD fully installed .


PREREQUISITES :


make sure you have installed the companion DVD for solaris 10. It by default installs in /opt/sfw , so all my instructions point to this one.

update your path.

open /etc/profile and add the following lines :

Code:
PATH=$PATH:/usr/sfw/bin:/opt/sfw/bin:/usr/ccs/bin
export PATH

also if you are using dtsession as your session manager, please add the same lines to your dtprofile file. you can find it in your home directory. or simply open it by the follwoing command and add the same two lines shown above.

Code:
vi $HOME/.dtprofile


After this, one evry simple, but important thing is to make links to your gmake and gcc.

typein following commands :
Code:

ln -s /usr/sfw/bin/gmake /usr/bin/make
ln -s /usr/sfw/bin/gcc /usr/bin/cc

Now update you links to libraries.

If u are runnign solaris in 32 bit ( normal pentium machines etc ) do this :

Code:
crle  -c /var/ld/ld.config -l /lib:/usr/lib:/usr/sfw/lib:/opt/sfw/lib
ldd -v

else , if u are running 64 bit like me dot he following :

Code:
crle -64 -c /var/ld/64/ld.config -l /lib/64:/usr/lib/64:/usr/sfw/lib/64:/opt/sfw/lib
ldd -v

Now check the entry is successfully added in ld config file, basically you should see the following output for the command as shown below :

for 32 bit machines

Code:
cat /var/ld/ld.config


 PP/lib/:/usr/lib:/usr/sfw/lib:/opt/sfw/lib:/opt/csw/lib

for 64 bit machines

Code:
cat /var/ld/64/ld.config


 PP/lib/64:/usr/lib/64:/usr/sfw/lib/64:/opt/sfw/lib:/opt/csw/lib

also please dont open this file in an editor, as this has little binary content too. do not edit this in any case.


INSTALLATON

Download expat ( ftp://ftp.sunfreeware.com/pub/freeware/intel/10/expat-1.95.5-sol10-intel-local.gz ) and install it as follows :

go to the directory where you donwloaded.
run the following :
Code:

gunzip ./expat-1.95.5-sol10-intel-local.gz
pkgadd -d expat-1.95.5-sol10-intel-local

and select "all" when asked for to complete installation successfully.


Download the following packages from http://xiph.org/downloads/ page :

1.) libogg-1.1.3.tar.gz : http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz

2.) libvorbis-1.1.2.tar.gz : http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz

3.) vorbis-tools-1.1.1.tar.gz : http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.1.1.tar.gz

4.) libtheora-1.0alpha7.tar.gz : http://downloads.xiph.org/releases/theora/libtheora-1.0alpha7.tar.gz

5.) speex-1.0.5.tar.gz : http://downloads.xiph.org/releases/speex/speex-1.0.5.tar.gz

6.) flac-1.1.4.tar.gz : http://downloads.xiph.org/releases/flac/flac-1.1.4.tar.gz

7.) libao-0.8.6.tar.gz : http://downloads.xiph.org/releases/ao/libao-0.8.6.tar.gz

8.) libspiff-0.6.5.tar.gz : http://downloads.xiph.org/releases/xspf/libspiff-0.6.5.tar.gz

and de-compress all in a directory of ur choice as follows :

cd /opt/softwares/sources ( or any directory where u have downloaded these packages )
Code:

gunzip ./libogg-1.1.3.tar.gz
gunzip ./libvorbis-1.1.2.tar.gz
gunzip ./vorbis-tools-1.1.1.tar.gz
gunzip ./libtheora-1.0alpha7.tar.gz
gunzip ./speex-1.0.5.tar.gz
gunzip ./flac-1.1.4.tar.gz
gunzip ./libao-0.8.6.tar.gz
gunzip ./libspiff-0.6.5.tar.gz

tar xvf ./libogg-1.1.3.tar.gz
tar xvf ./libvorbis-1.1.2.tar.gz
tar xvf ./vorbis-tools-1.1.1.tar.gz
tar xvf ./libtheora-1.0alpha7.tar.gz
tar xvf ./speex-1.0.5.tar.gz
tar xvf ./flac-1.1.4.tar.gz
tar xvf ./libao-0.8.6.tar.gz
tar xvf ./libspiff-0.6.5.tar.gz

Now go to the directory that is un-compressed and do as follows :

Code:
bash-3.00# pwd
/opt/softwares/source/libao-0.8.6 ( in ur case this may be different )
bash-3.00# ./configure --prefix=/opt/softwares
bash-3.00# make -i
bash-3.00# make -i install

Do this in each extracted directory, some may throw errors, dont worry, if you get erors, just that at last your mplayer may not have some capabilities.

Now update your library path again

for 64 bit

Code:
crle -64 -c /var/ld/64/ld.config -l /lib/64:/usr/lib/64:/usr/sfw/lib/64:/opt/sfw/lib:/opt/softwares/lib
ldd -v

for 32 bit

Code:
crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/sfw/lib:/opt/sfw/lib:/opt/softwares/lib
ldd -v

Now its time to get mplayer and kick off:
get mplayer sources form http://www.mplayerhq.hu

download the latest source ( usually in bz2 format ) . I downloaded this file :

http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2

and extarct it in your favourite location.

go to the extracted directory and first of all dot he following.

Code:
1.) cd to the extracted dir ( in my case it is /opt/softwares/source/MPlayer-1.0rc1 )

2.) The default configure script in extracted directory contains /bin/sh as the shell to use.

open the file  :

vi ./configure

and change the following line :

#! bin/sh

to

#! /usr/bin/bash

and save the file ( Esc followed by :wq and enter <-' ) .



Now run the following commands in the directory, one after the others.

( you may get lots of warnign , thats okie, make sure you dont get any erors. )

Code:
./configure --prefix=/opt/softwares --enable-gui
./make
./make install

You make get some error like cannot stat file , or mplayer not found etc during make install, dont panic, nothing has happened .

just do the following .

Code:
cp ./mplayer  /opt/softwares/bin/mplayer

Well you are ready to rock !.

Lets do some testing .

some sample videos to download and test mplayer , download them where you like ( for example i will consider that you are downloading them to /opt )

1.) a good decent mpg video here.

http://www.spaceacademy.jhuapl.edu/VideoGallery/NEAR/MissionVideo/mpgs/NEARJourney01.mpg

2.) The same movie in .mov format

http://www.spaceacademy.jhuapl.edu/VideoGallery/NEAR/MissionVideo/qt/NEARJourney01.mov

3.) a very bad quality wmv for testing at what mplayer is gud at ( ripping and playing any scraped out video ).

http://underwaterflorida.homestead.com/files/catfishotel.wmv

4.) Here is a decent quality , but highly compressed wmv video for you testing pleasure.

http://www.tradebit.com/download.php/30671 and download the first one named " Austrian-Army-Attacks.wmv"

To play any of them just go to prompt and say the following command :

mplayer /opt/Austrian-Army-Attacks.wmv

similarly you can play any of those.

Hope this helps.

Chandan
Back to top Go down
http://chandan-m.blogspot.com/
oposum




Number of posts : 2
Registration date : 2007-05-14

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeMon May 14, 2007 9:29 pm

Hello,

this post has been very helpful and i get through almost everything except make in MPlayer. Configure goes ok (with some warnings on the end):

Config files successfully generated by ./configure !


And then i try to compile it and get this:

bash-3.00# make
make: Fatal error in reader: Makefile, line 10: Unexpected end of line seen

I have the make-3.81-sol10-x86-local.gz from sunfreeware.com so i don't know what the problem could be. One of the libraries didn't compile, but you said that shouldn't be critical. Everything else went through fine.

Help?!

Thank you in advance, Zan
Back to top Go down
chandan




Number of posts : 11
Age : 39
Registration date : 2007-04-13

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeTue May 15, 2007 2:54 am

Hi Zen,

This error is because you are not using gmake. Please install the companion cd, which has gcc and gmake.

than make sure you use this gmake command instead of using make command . also dont forget to use the same gmake for install too. i mean "/opt/sfw/bin/gmake install"

usually this gets installed by default in : /opt/sfw/bin/gmake.

also, try /opt/sfw/bin/gmake to see if gnu make is already available on your machine.


This should eliminate this error.

kind regards,

Chandan

oposum wrote:
Hello,

this post has been very helpful and i get through almost everything except make in MPlayer. Configure goes ok (with some warnings on the end):

Config files successfully generated by ./configure !


And then i try to compile it and get this:

bash-3.00# make
make: Fatal error in reader: Makefile, line 10: Unexpected end of line seen

I have the make-3.81-sol10-x86-local.gz from sunfreeware.com so i don't know what the problem could be. One of the libraries didn't compile, but you said that shouldn't be critical. Everything else went through fine.

Help?!

Thank you in advance, Zan
Back to top Go down
http://chandan-m.blogspot.com/
oposum




Number of posts : 2
Registration date : 2007-05-14

How-To : building mplayer on solaris, the clear way Empty
PostSubject: GNU gcc   How-To : building mplayer on solaris, the clear way Icon_minitimeWed May 16, 2007 3:22 pm

OK,

Now I'm having problems compiling GNU gcc:

Configure with:

./configure --with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --enable-objc-gc

make error:

/usr/local/i386-pc-solaris2.10/bin/ld:libgcc/./libgcc.map: file format not recognized; treating as linker script
/usr/local/i386-pc-solaris2.10/bin/ld:libgcc/./libgcc.map:1: syntax error
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/root/DL/gcc-4.1.2/host-i386-pc-solaris2.10/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/root/DL/gcc-4.1.2/host-i386-pc-solaris2.10/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/root/DL/gcc-4.1.2'
make: *** [all] Error 2

...

Also tried configure --with-ld and also doesn't compile, but with a different error.
Any suggestions ??

Thank you, ZAN

P.S. I've installed the latest binutils.
Back to top Go down
chandan




Number of posts : 11
Age : 39
Registration date : 2007-04-13

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeFri May 18, 2007 6:03 am

Yeah, this is expected.

because You are using gnu Assembler, but saying without GNU ld. if you use the GNU assembler, you should also use the GNU linker (and specify --with-gnu-ld).

So, your command should go like this ( make sure if you say --with-gnu-ld then also specify its path with --with-ld=PATH_TO_GNU_LD ) :

Code:
./configure --with-gnu-as --with-as=/usr/sfw/bin/gas --with-gnu-ld --with-ld=/usr/sfw/bin/ld --enable-objc-gc

Also, if this gets overridden and still u find that the other ld is used, that until your mplayer build is complete, move the file as follows :
Code:

mv /usr/local/i386-pc-solaris2.10/bin/ld /usr/local/i386-pc-solaris2.10/bin/ld.sun

and make sure /usr/sfw/bin is in path

Code:
PATH=$PATH:/usr/sfw/bin
export PATH

( in your earlier command, you used sun ld, not the GNU one. ie /usr/local/i386-pc-solaris2.10/bin/ld )

Regards,

Chandan

oposum wrote:
OK,

Now I'm having problems compiling GNU gcc:

Configure with:

./configure --with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --enable-objc-gc

make error:

/usr/local/i386-pc-solaris2.10/bin/ld:libgcc/./libgcc.map: file format not recognized; treating as linker script
/usr/local/i386-pc-solaris2.10/bin/ld:libgcc/./libgcc.map:1: syntax error
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/root/DL/gcc-4.1.2/host-i386-pc-solaris2.10/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/root/DL/gcc-4.1.2/host-i386-pc-solaris2.10/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/root/DL/gcc-4.1.2'
make: *** [all] Error 2

...

Also tried configure --with-ld and also doesn't compile, but with a different error.
Any suggestions ??

Thank you, ZAN

P.S. I've installed the latest binutils.
Back to top Go down
http://chandan-m.blogspot.com/
zamani




Number of posts : 1
Registration date : 2007-06-18

How-To : building mplayer on solaris, the clear way Empty
PostSubject: mplayer on solaris10 sparc   How-To : building mplayer on solaris, the clear way Icon_minitimeMon Jun 18, 2007 12:54 pm

Hi Chandan,

Can i use the same steps for Sol10 sparc?

tq
zamani
Back to top Go down
chandan




Number of posts : 11
Age : 39
Registration date : 2007-04-13

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeMon Jun 18, 2007 4:53 pm

Yep zamani,

you can use the same steps, but please download sparc files where x86 files are specified.

for example expat-1.95.5 , you will have to download sparc binary, instead of the x86 one i have used.

as far as others are concerned which are built form sources, they dont make any difference.

regards,

- Chandan

zamani wrote:
Hi Chandan,

Can i use the same steps for Sol10 sparc?

tq
zamani
Back to top Go down
http://chandan-m.blogspot.com/
aijazbaig1




Number of posts : 2
Localisation : Sweden
Registration date : 2007-07-24

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Specific Questions about solaris sparc issues   How-To : building mplayer on solaris, the clear way Icon_minitimeTue Jul 24, 2007 5:18 pm

hello chandan.
thnks for the tip! However since i am trying to build mplayer on a sun sparc machine i have some questions which id like to ask.

1.You wrote
Quote :
open /etc/profile and add the following lines :

Code:
PATH=$PATH:/usr/sfw/bin:/opt/sfw/bin:/usr/ccs/bin
export PATH


also if you are using dtsession as your session manager, please add the same lines to your dtprofile file. you can find it in your home directory. or simply open it by the follwoing command and add the same two lines shown above.

Code:
vi $HOME/.dtprofile

I have already installed gcc from sunfreeware and it has got installed in /usr/local/ . And i have updated my path to have /usr/local before /usr/ccs/bin/. So on typing gcc at the console i suppose the binary from the former location viz. /usr/local/bin runs before the one at /usr/ccs/.

While installing the gcc compiler suite,I did not knew if there already was a C/C++ compiler included in the installation CDs.

Now i have two versions of the gcc compiler. The two binaries are at /usr/sfw/bin/ and /usr/local/bin/. The former is before the latter in my path so the former one gets invoked when i type gcc at the console.

AS for the make utility. I again have two versions, the sun version at /usr/ccs/bin/make and the gnu version at /usr/sfw/bin/gmake. So doing what u have done in your post,(repeated below) i.e. symbolic linking of these binaries at the locations /usr/bin/make and /usr/bin/cc, (i assume that it) is only for the sake of using the binaries directly. But in my own case i have the locations of my make utility and the gcc binary in my PATH so do i still need to do such a linking?
Quote :

ln -s /usr/sfw/bin/gmake /usr/bin/make
ln -s /usr/sfw/bin/gcc /usr/bin/cc

I hope to hear from ypu chandan..and thnks for the post again.

Regards,
Aijaz
Back to top Go down
chandan




Number of posts : 11
Age : 39
Registration date : 2007-04-13

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeWed Jul 25, 2007 3:16 am

Hi Aijaz,

Yep , this linking is just for direct execution. You can manually use the absolute path. But i suggest this linking because, if these commands are invoked inside some scripts, than it would be a problem.


Best,

-- Chandan

aijazbaig1 wrote:
hello chandan.
thnks for the tip! However since i am trying to build mplayer on a sun sparc machine i have some questions which id like to ask.

1.You wrote
Quote :
open /etc/profile and add the following lines :

Code:
PATH=$PATH:/usr/sfw/bin:/opt/sfw/bin:/usr/ccs/bin
export PATH


also if you are using dtsession as your session manager, please add the same lines to your dtprofile file. you can find it in your home directory. or simply open it by the follwoing command and add the same two lines shown above.

Code:
vi $HOME/.dtprofile

I have already installed gcc from sunfreeware and it has got installed in /usr/local/ . And i have updated my path to have /usr/local before /usr/ccs/bin/. So on typing gcc at the console i suppose the binary from the former location viz. /usr/local/bin runs before the one at /usr/ccs/.

While installing the gcc compiler suite,I did not knew if there already was a C/C++ compiler included in the installation CDs.

Now i have two versions of the gcc compiler. The two binaries are at /usr/sfw/bin/ and /usr/local/bin/. The former is before the latter in my path so the former one gets invoked when i type gcc at the console.

AS for the make utility. I again have two versions, the sun version at /usr/ccs/bin/make and the gnu version at /usr/sfw/bin/gmake. So doing what u have done in your post,(repeated below) i.e. symbolic linking of these binaries at the locations /usr/bin/make and /usr/bin/cc, (i assume that it) is only for the sake of using the binaries directly. But in my own case i have the locations of my make utility and the gcc binary in my PATH so do i still need to do such a linking?
Quote :

ln -s /usr/sfw/bin/gmake /usr/bin/make
ln -s /usr/sfw/bin/gcc /usr/bin/cc

I hope to hear from ypu chandan..and thnks for the post again.

Regards,
Aijaz
Back to top Go down
http://chandan-m.blogspot.com/
aijazbaig1




Number of posts : 2
Localisation : Sweden
Registration date : 2007-07-24

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeThu Jul 26, 2007 1:35 pm

Hi chandan.
Thanks for the reply. So as u suggested i am proceeding with the creation of those symbolic links in the /usr/bin/ directory with cc linking to the gcc compiler and make linking to the GNU make in my system.

However what I am trying to figure out is what exactly are we using the crle command for. I read a few notes on the web about crle and what i could figure out is that we can add certain libraries to the library path temporarily so that the linker knows where to find these libraries during linking.

Hence we do not need to modify the LD_LIBRARY_PATH variable explicitly isn't it?

Then u mentioned 2 options, one for the 32 bit machines and the other for the 64 bit machines. However I use a sun sparc workstation (sun ultra 10) which I do think is a 64 bit machine. Do you know what option of crle should i use?
Does ur options only refer to x86 based machines or do they apply to all generic 32 and 64 bit machines?

Hope to hear from you,

Regards,
Aijaz.
Back to top Go down
chandan




Number of posts : 11
Age : 39
Registration date : 2007-04-13

How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitimeFri Aug 03, 2007 11:03 pm

Hi Aijaz,

crle stands for "configure runtime linking environment". It is a command that allows Solaris sysadmins to better manage their dynamic linker. Specifically, it allows you to configure library paths so that programs run on a system will have as easy access to shared library files in locations like /usr/local/lib or /opt/lib as they do to /usr/lib. Instead of configuring a LD_LIBRARY_PATH to give these lib directories visibility, you run the crle command and augment the load library path on a system-wide basis. In other words, the crle command is basically the equivalent of updating ld.config

So crle is an alternative to ld config on system, and LD config can be made specific to user environment , but crle is system wide setup.

But in many places i am doing these both because some of the scripts in open source, and specially those programs which are being ported to Solaris, and which were basically designed for Linux environment, Searched for LD Variables and also updates its own cache or sometimes also runs ldconfig's when it generates libraries or copies some etc.

Hope this helps you.

Thanks and Regards,

-- Chandan

.
aijazbaig1 wrote:
Hi chandan.
Thanks for the reply. So as u suggested i am proceeding with the creation of those symbolic links in the /usr/bin/ directory with cc linking to the gcc compiler and make linking to the GNU make in my system.

However what I am trying to figure out is what exactly are we using the crle command for. I read a few notes on the web about crle and what i could figure out is that we can add certain libraries to the library path temporarily so that the linker knows where to find these libraries during linking.

Hence we do not need to modify the LD_LIBRARY_PATH variable explicitly isn't it?

Then u mentioned 2 options, one for the 32 bit machines and the other for the 64 bit machines. However I use a sun sparc workstation (sun ultra 10) which I do think is a 64 bit machine. Do you know what option of crle should i use?
Does ur options only refer to x86 based machines or do they apply to all generic 32 and 64 bit machines?

Hope to hear from you,

Regards,
Aijaz.
Back to top Go down
http://chandan-m.blogspot.com/
Shruthi
Guest




How-To : building mplayer on solaris, the clear way Empty
PostSubject: Hey thanks Chandan, this is awsome... it plays everything..   How-To : building mplayer on solaris, the clear way Icon_minitimeTue Sep 11, 2007 12:13 pm

Thankyou Chandan,

This is the best thing to do, because even if you install blastwave packages etc, it wont play streaming media etc.

this \, as you are building with each and component almost form scratch, and taking care that all are recognized, its like awesome.. just too good.

I mean, it plays mp3, mp4. 3gp form my mobile, avi, wmv, mpg, and standard streaming playlists ...

thanks again.

BTW have you made any move, in porting Xine to Solaris , that would be awesome, and make solaris ready for prime time.. . just a thought .. but when u do, success or failure , let me know for sure..


Shruthi.

.
Back to top Go down
Sponsored content





How-To : building mplayer on solaris, the clear way Empty
PostSubject: Re: How-To : building mplayer on solaris, the clear way   How-To : building mplayer on solaris, the clear way Icon_minitime

Back to top Go down
 
How-To : building mplayer on solaris, the clear way
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Sun OS / Solaris :: Soalris Multimedia-
Jump to: