1

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.

gertvdijk
  • 67,947

2 Answers2

3

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).

gertvdijk
  • 67,947
  • Hey thanks, alot the error from what I am understanding is based on firefox libraries that are shared by gpac (or this is what I've read in gpac forum from others attempting to build source). To be honest most of this is above my head at this point but I will take your word for it thank you all the same it's much appreciated!! – brendosthoughts Jan 16 '13 at 23:42
  • @brendosthoughts Yeah, this is really specific for this package. My common knowledge about building stuff stops here. Try asking how to fix these build errors on the forums of GPAC. – gertvdijk Jan 16 '13 at 23:46
  • you've read my mind I'm first going to attempt to go through what yopu've outlined and see if I can reproduce the same errors (as they are not the same as other's when building of trunk) and if so I'll post in gpac forum thanks again! – brendosthoughts Jan 16 '13 at 23:59
  • I am not able to reproduce same things as you if you , when running the command: 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 – brendosthoughts Jan 17 '13 at 00:14
  • @brendosthoughts Yeah, install those! Don't copy exactly my commands, these were examples from my system. Copy the build dependencies from your output instead! Also, I think I've found why it wouldn't build... posting an update soon. – gertvdijk Jan 17 '13 at 00:17
  • oh okay ill try that – brendosthoughts Jan 17 '13 at 00:20
  • ... re-running debuild with firefox 11 downgrade now .. thank you so much for this (this will prolly take much longer for me as this is running on a small EC2 instance so there not much of a proccesor in it) – brendosthoughts Jan 17 '13 at 00:31
  • @brendosthoughts Works now for me. Ugly fixes in the linker configuration in combination with F11 downgrade were the issue. Found the hints from the comments on this page. – gertvdijk Jan 17 '13 at 00:34
  • hmm okay i got same MP4client error after debuild ... here's my full ouptut: make[3]: *** [MP4Client] Error 1 make[3]: Leaving directory `/home/ubuntu/gpac-0.5.0~dfsg0/applications/mp4client' – brendosthoughts Jan 17 '13 at 00:38
  • I will check out the link page now – brendosthoughts Jan 17 '13 at 00:39
  • sorry ugly linker in configuration? is this referencing needing to point to where firefox is installed in configuration file? as mentioned on said page – brendosthoughts Jan 17 '13 at 00:41
  • @brendosthoughts Yes, sort of. I really don't like this need to add this myself. Packages should do this... Anyway, try the note below (removing the source directory completely) as the clean does not clean up properly. In case you want to try my builds: here. They don't meet any qualification to standards (!), so I'm unable to put them in my PPA... – gertvdijk Jan 17 '13 at 00:43
  • hey sorry how would i try your build? – brendosthoughts Jan 17 '13 at 00:46
  • nevermind dumb question just realizing that now thanks You so much for everything I would never be able to figure this out by myself – brendosthoughts Jan 17 '13 at 00:53
  • 1
    @brendosthoughts Good to hear. Rather than posting "thank you" comments, consider accepting the answer. (this is how this site works) – gertvdijk Jan 17 '13 at 01:04
0

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

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

842Mono
  • 9,790
  • 28
  • 90
  • 153