BUilding on Cent0S5 - story so far

  • Nick Parker

    Nick Parker - 2008-03-03

    Hi all, have been having great fun building openipmp on CentOS5.  Have returned to cpp on *nix after an absence of some 7 years and I am amazed how much I have forgotten.  I was hoping that this thread might become a central point for anyone installing on this O/S platform and also as a set of online reminders for me - I realise I am new here and hope this is OK with everyone.

    My platform is as follows:

    MySQL 5.0
    gcc 4.2 (I think.... 4. something anyway)

    I have build the server and run the install scripts, however I was very surprised when I didn't hit the enum -> enm issue - I am worried that I missed it!  I know there were somethings that have not gone perfectly but I am going to come back to these later, for example there is no openIPMP directory in /usr/local/jboss-4.2.2!

    My main point is the compilation of the mpg1.4 client and server.  This got off to a tricky start, some of the packages were missing. This was shown up either a 'missing file' or 'undefined macro' error whilst runing bootsrap. So I used yum to install all the things taht seemed to be missing

    yum install libtools
    yum install gtk2-devel

    Bootstrap now worked and the build started, my box is a new dual core thing so it rattled away with text flying past my eyes so I have no idea which bits were being constructed until I hit an error in one of the libraries which was compaining about some function header woudl break the strict aliasing rules.  After some reading up on gcc it apears that is is now more fussy to ensure that the code is more pure, aliasing being one of these areas.  This can be circumvented by adding


    as a flag to the compiler.  Not being a make guru I edited each Makefile and added -fno-strict-aliasing to the CCCFLAGS macro line.  Hit 'make' again and hey ho off we flew for a few more minutes until....

    In the player I have an undefined reference to XMoveWindow.  I realise that this is in an xlib somewhere so I installed all the X development packages and both Gnome and KDE development libraries. I then hit 'make' in anticipation but alas was thrown off again.  This time I scoured the compiler command on the screen before the error but I am either being blind or daft because I cant see a reference to link to any X libraries.  I am also thinking that it could be a header file that isnt being included, however there is no 'xxx.h' cannot be found so I presume that either the code is incorrect and should be including a header file or that the appropriate library is not being linked against.  I thought if you didnt link against eh correct library you had a 'symbol not found' error.  I must admit that I am a little rusty here as the last time I did any c++ on *nix was 1996!

    I am off to find out what library XMoveWindow is in and what header file needs to be included to provide the prototype.  Does anyone have any ideas (never developed against X before!), oh btw do I need to re-run bootsrap for the whole application if I have downloaded any more libraries - please add your thoughts.

    Catch up soon


    • Nick Parker

      Nick Parker - 2008-03-04

      OK, so now I can build the mp4player. I added the following to the CPPFLAGE in the Makefile for the player

      -L/usr/X11R6/lib -lX11

      So I now have all the DRMPlugin and Demo applications and libraries built.  Next step is to re-visit the server and see why I have no openIPMP directory at the root of the jboss installation.

    • chris mollis

      chris mollis - 2008-03-04

      Cool..  I think the SDL lib requires linking to the X system.  SDL has a few features that we used in the base openIPMP lib.. collections maybe?.. it's been a while, actually.

      Let us know if you have any issues with the server build on that platform.  As long as you have the correct version of the JDK (1.4x), you should be ok. 

      Note: I recently did a build of an older version of the server on Ubuntu 7.1..  It can be a little tricky, but it will work.  Let us know if you have any problems.


    • chris mollis

      chris mollis - 2008-03-04

      NOTE:  you can use MySQL 5.0 with that version of the server also.. You don't have to dig around for the version specified in the documentation.

    • Nick Parker

      Nick Parker - 2008-03-10

      Have been having more fun and games and made some considerable progress since the last post.  Here is what I have found and achieved, hope it provides usefull to someone else in the future.

      I re-visited the server build and discovered that in the initial pass of the build the database tables and accounts had been created but the assets were not deployed into the applicaiton server, so I re-ran - this time paying more attention to the output.  First problem was no ant so a quick

      yum install ant

      fixed that in a jiffy.  This also installed a load of other stuff including java for g++ and about 10 other library packages. I set ANT_HOME to "/usr" since and ended up in "/usr/bin" and when I re ran ./ hey ho we were building java with no problems.

      I am still using jdk1.6 and of course there was the 'enum' problem where it compained that 'enum; is now a reserved word, the code uses enum as an instance of an Enumerator so I read the error messages, found the file and the line and changed three references of enum to enm - sorry but I didn't write down the file name or line numbers but they are all in the same file.

      This time build and install was succesfull so I'm off to start the jboss server and see what happens!

    • Nick Parker

      Nick Parker - 2008-03-10

      JBoss started OK, there were no error messages and I could see the openipmp was installed from the output that the server created.  I started it with -b x.x.x.x where x.x.x.x is the ip of the machine so that I could access the server remotely.  If you do this dont forget to set up some security in jBoss, There is plenty of info on the JBoss web site on how to restrict access to an application.

      Now for the great moment... I pointed my web browser at the server and ran up the login screen


      Sadly there were miles of exception data when the application started...I loked at the first line and I think that what I saw was fairly common.  I think one of the first things the applicaiton does is move its current directory up one level and the look for a directory called openIPMP.  openIPMP is installed at the same level as JBoss root, i.e /usr/local/jboss-4.2.2-GA/openIPMP in my case.  It took me an hour to work out why this was all happenign and what to do about it until it clicked that I had not been in "jboss-4.2.2-GA/bin" when I started the server.  I shut it down and moved to "bin" and then restarted it.  This time the application ran up with no problems.

      I clicked on the 'register' link and then registered myself and downloaded a .p12 file as suggested.

      Next step is to be encding some video, am feeling pretty up about it all as am getting to grips with CentOS and feeling good about it, understanding a little about jBoss and have spent some time with the architecture of openIPMP.

      Will tell you how the encoding went later...

    • Nick Parker

      Nick Parker - 2008-03-14

      My frist go at encoding has been bittersweet!  Sweet beacuse the mp4creator is communicating with the server and receiving the encoding info back from the server, I can see my licence record in the database and am over the moon - bitter because the encoding is not working without errors! - so close!

      here was my command.....

      mp4creator -E -verbose=1 -W="EncoderInfo.xml" -X"UserName:nick" -X"UserPass:XXXXX" -X="License;nick;2007-01-01;2010-01-01;ODRL" -Y="openipmp;bfs" indy1.mp4 enc-indy1.mp4

      The output said there were some unknown atom types but did not complain, the types were all children of 'udta' attom and included 'pvmn','pvti','etag','dnld' and more...  I am not an mpeg expert so I know nothing about these as yet (more bedtime reading!).

      The main problem was the following two items

      MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.iods.visualProfileLevelId
      MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.iods.audioProfileLevelId

      However the output file was produced.  At this point in time I am not sure if it has been corrupted, I need to view it on a Windows platform however I have buiuld encoder and server on a CentOS server with no X facility.  I have downloaded the file but it will not play in either QuickTime or MediaPlayer - there is an error reported saying that it found something in the file it did not like - sorry I cant remember any more detail on the error.

      Am a little lost at the moment and will have to think about where to go next.  What I need to do is ascertain if the file produced was produced correctly and I am unsure about how to do this.  If anyone has any ideas they will be gratefully received.


    • Nick Parker

      Nick Parker - 2008-03-14

      So, I decided to take the plunge and downloaded the video to my PC and attempted to play on Media Player.  Sadly it said it either didnt understand the file or the codec used to encode it.  So here are some questions that I think I need to answer..

      1 - To play on a Windows platform using Media Player or Quick Time I presume I will need a plugin.
      2 - Reading from the Mutable web site there is a plugin from 3ivx available at $6 per user.
      3 - Is there any other codec available for Media Player or Quick Time, is it included in the source and maybe I am missing it!

      If anybody has any ideas put them below!




Log in to post a comment.