Skip to content

Instantly share code, notes, and snippets.

@fenderstic
Last active September 25, 2019 04:47
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fenderstic/4df008737479cb7f1680 to your computer and use it in GitHub Desktop.
Save fenderstic/4df008737479cb7f1680 to your computer and use it in GitHub Desktop.
A walkthrough 'Building GStreamer On OSX (El Capitan)'

The document for building gstreamer from source is not found. So, I decided to upload this document for beginners of gstreamer. Please DO NOT take this document SERIOUSLY : ) It might have some mistakes, cause I'm a newbie as you.

Get started with XCODE and BREW

I had tried to install all kind of build tools with source build and installation. And I realized it was stupid things that waste my priceless time.

  • XCODE install on terminal
    • xcode-select --install
  • Brew install on terminal

Get module source from gstreamer site

Gstreamer consists of several important modules. I picked up below modules by instinct : ) gstreamer-1.6.1, gst-plugins-base-1.6.1, gst-libav-1.6.1, gst-plugins-good-1.6.1 in http://gstreamer.freedesktop.org/src/

gstreamer-1.6.1

All you need is './autogen.sh'. But,

You might have

configure: error: You need to have gtk-doc >= 1.12 installed to build GStreamer configure failed

brew install gtk-doc (before running it.. please read below)

You might also have ..... !!!

I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl" compilation error: file /usr/local/Cellar/gtk-doc/1.24/share/gtk-doc/data/gtk-doc.xsl line 10 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl make[5]: *** [html-build.stamp] Error 5 make[4]: *** [all] Error 2 make[3]: *** [gst] Error 2 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

I don't think these documentation are not needed, cause I'm 24 hours on the line. So, autogen.sh is modified. 49, 53 lines.

-- CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
++ CONFIGURE_DEF_OPT='--enable-maintainer-mode --disable-gtk-doc'
-- CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
++ CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --disable-docbook --enable-failing-tests --enable-poisoning"

./autogen.sh again and make !

make install (sudo might be needed)

##gst-plugins-base-1.6.1 ./autogen.sh --disable-gtk-doc (instead of editing autogen.sh)

configure: *** Orc acceleration disabled. Requires Orc >= 0.4.23, which was not found. Slower code paths will be used.

'Slower' seems disaster, so just type 'brew install Orc' for resolving.

./autogen.sh --disable-gtk-doc and make make make install (sudo might be needed)

##gst-libav-1.6.1 ./autogen.sh --disable-gtk-doc again!

You might have

yasm/nasm not found or too old. Use --disable-yasm for a crippled build.

which seems important module. So, just have 'brew install yasm'.

make and make install (sudo might be needed!)

##gst-plugins-good-1.6.1 ./autogen.sh --disable-gtk-doc again!... : ) make and make install without errors. However, playbin2 with http source is not working due to lack of http element. So, I had 'brew install libsoup' and re-start from autogen.sh

#Finally !!! Please have below command on terminal.

gst-launch-1.0 playbin uri=http://media.w3.org/2010/05/sintel/trailer.mp4 You might see the greatest SINTEL movie.

@bangonkali
Copy link

bangonkali commented Aug 7, 2019

Successfully compiled gstreamer but failed on gst-plugins-base for 1.17 lane.

./autogen.sh --disable-gtk-doc && make -j 8 && sudo make install

Error

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libkern/OSAtomicDeprecated.h:201:9: note: 'OSAtomicDecrement32Barrier' has been explicitly
      marked deprecated here
int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue );
        ^
  CC       libgstvpx_la-gstvp8enc.lo
2 errors generated.
make[3]: *** [libgsttaglib_la-gstid3v2mux.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
  CC       libgstvpx_la-gstvp8utils.lo
  CC       libgstvpx_la-gstvp9dec.lo
  CC       libgstvpx_la-gstvp9enc.lo
  CC       libgstvpx_la-plugin.lo
In file included from gstapev2mux.cc:53:
In file included from /usr/local/Cellar/taglib/1.11.1/include/taglib/apetag.h:31:
In file included from /usr/local/Cellar/taglib/1.11.1/include/taglib/tmap.h:197:
In file included from /usr/local/Cellar/taglib/1.11.1/include/taglib/tmap.tcc:26:
/usr/local/Cellar/taglib/1.11.1/include/taglib/trefcounter.h:83:18: error: 'OSAtomicIncrement32Barrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_fetch_add() from <atomic> instead
      [-Werror,-Wdeprecated-declarations]
    void ref() { OSAtomicIncrement32Barrier(const_cast<int32_t*>(&refCount)); }
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libkern/OSAtomicDeprecated.h:182:9: note: 'OSAtomicIncrement32Barrier' has been explicitly
      marked deprecated here
int32_t OSAtomicIncrement32Barrier( volatile int32_t *__theValue );
        ^
In file included from gstapev2mux.cc:53:
In file included from /usr/local/Cellar/taglib/1.11.1/include/taglib/apetag.h:31:
In file included from /usr/local/Cellar/taglib/1.11.1/include/taglib/tmap.h:197:
In file included from /usr/local/Cellar/taglib/1.11.1/include/taglib/tmap.tcc:26:
/usr/local/Cellar/taglib/1.11.1/include/taglib/trefcounter.h:84:29: error: 'OSAtomicDecrement32Barrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_fetch_sub() from <atomic> instead
      [-Werror,-Wdeprecated-declarations]
    bool deref() { return ! OSAtomicDecrement32Barrier(const_cast<int32_t*>(&refCount)); }
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libkern/OSAtomicDeprecated.h:201:9: note: 'OSAtomicDecrement32Barrier' has been explicitly
      marked deprecated here
int32_t OSAtomicDecrement32Barrier( volatile int32_t *__theValue );
        ^
2 errors generated.
make[3]: *** [libgsttaglib_la-gstapev2mux.lo] Error 1
make[2]: *** [taglib] Error 2
make[2]: *** Waiting for unfinished jobs....
  CCLD     libgstvpx.la
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment