Ubuntu: How do I get GPAC v0.5.0 on 12.04 where v0.4.6 is in the repositories?



Question:

I am currently working on a web application which requires streaming video, I am using an EC2 Instance on AWS with Ubuntu 12.04 LTS running on it. As I need to transcode video i am wishing to install GPAC 0.5.0 package, however

apt-get install gpac  

installs version 0.4.6 where some functionality does not work due to segmentation faults. On my own desktop running Ubuntu 12.10 I can properly install 0.5.0 using same commands and properly transcode my video.

Basically my question is can I expect a GPAC 0.5.0 package to be released for Ubuntu on 12.04 LTS or is there a workaround to get the newer version other then using the source (which is breaking apparently due to Mozzila updating parts of there library which the package relies on). any help or insight would be greatly appreciated.


Solution:1

Rather than building from upstream source, try building the package of 12.10 for 12.04.

Warning: this package seems horribly broken... don't expect a nice and clean build. A "nice" package should just build with debuild, this one doesn't.

  1. echo 'DSCVERIFY_KEYRINGS="/etc/apt/trusted.gpg:~/.gnupg/pubring.gpg"' > ~/.devscripts because of Added key, but dget still shows "gpg: Can't check signature: public key not found"

  2. gpg --keyserver keyserver.ubuntu.com --recv-key 311D765A This is the key to verify the source package following below.

  3. dget http://archive.ubuntu.com/ubuntu/pool/universe/g/gpac/gpac_0.5.0~dfsg0-1.dsc to download the source package.

  4. cd gpac-0.5.0~dfsg0/

  5. debuild -uc -us with a failure to expect (example below!):

    dpkg-checkbuilddeps: Unmet build dependencies: freeglut3-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libfaad-dev libjack-dev libmad0-dev libogg-dev libopenjpeg-dev libpulse-dev libsdl1.2-dev libswscale-dev libtheora-dev libvorbis-dev libwxgtk2.8-dev libxmlrpc-c3-dev libxvidcore-dev  
  6. Install the build dependencies (satisfy all above from the output you get), e.g.:

    sudo apt-get install freeglut3-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libfaad-dev libjack-dev libmad0-dev libogg-dev libopenjpeg-dev libpulse-dev libsdl1.2-dev libswscale-dev libtheora-dev libvorbis-dev libwxgtk2.8-dev libxmlrpc-c3-dev libxvidcore-dev  
  7. Downgrade to Firefox 11.0 as shipped with Ubuntu 12.04. (Ugly, but needed to get it built! Do upgrades after build has finished...)

    sudo apt-get install firefox=11.0+build1-0ubuntu4 firefox-dev=11.0+build1-0ubuntu4 firefox-globalmenu=11.0+build1-0ubuntu4  
  8. Fix the linker configuration to point to Firefox's libraries (also ugly):

    echo "/usr/lib/firefox" | sudo tee -a /etc/ld.so.conf.d/firefox-gpac.conf  sudo ldconfig  
  9. Try again: debuild -uc -us (will take a while to compile)

  10. One directory below, cd .., you'll find your packages.

  11. Install them:

    sudo dpkg -i *gpac*.deb  

Note: debuild clean does not clean everything after a non-successful build (bug!!). Remove the whole directory and start all over from the dget command.


Advantages over plain building from source:

  • It tells you what build dependencies aren't met by package name.
  • Uninstalling it is really easy.
  • Everything is handled by your package management.

If not reverting to Firefox 11.0, I'm not getting the 0.5.0 compiled at all in 12.04 due to this error:

scenegraph/vrml_smjs.c: In function ‘JS_InitScriptFields’:  scenegraph/vrml_smjs.c:4239:4: warning: passing argument 6 of ‘JS_DefineProperty’ from incompatible pointer type [enabled by default]  /usr/include/firefox/jsapi.h:4458:1: note: expected ‘JSStrictPropertyOp’ but argument is of type ‘JSBool (*)(struct JSContext *, struct JSObject *, jsid,  JSBool,  union jsval *)’  make[2]: *** [scenegraph/vrml_smjs.o] Error 1  

After installing Firefox 11 (rather than 18), and getting other errors:

../../bin/gcc/libgpac.so: undefined reference to `JS_NewCompartmentAndGlobalObject'  ../../bin/gcc/libgpac.so: undefined reference to `JS_GC'  ../../bin/gcc/libgpac.so: undefined reference to `JS_ConvertStub'  ../../bin/gcc/libgpac.so: undefined reference to `JS_SetRuntimeThread'  [...] much more...  collect2: ld returned 1 exit status  make[3]: *** [MP4Client] Error 1  

You'll need to fix the linker configuration (the ld.conf.so.d/firefox-gpac.conf step).


Solution:2

Why not just grab whichever version you need from the GPAC Nightly Builds site?

https://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »