New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X support? #316

Open
ronilaukkarinen opened this Issue May 25, 2017 · 15 comments

Comments

Projects
None yet
5 participants
@ronilaukkarinen

ronilaukkarinen commented May 25, 2017

Would love to use this on my Macbook Pro. Any thoughts for OS X support? homebrew has most of the packages and OS X is mostly unix after all.

@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented May 25, 2017

Hi Roni,

I think it would be great to have OS X support. Unfortunately, I don't own any OS X device, so right now I'm trying to prioritise those platforms that I'm more familiar with. Snap packaging (almost there) and dockerization are next in my list. I believe OS X would run on Virtualbox, so I will leave this issue open in case someone wants to contribute any patches or I have some time to work on it.

Thanks for showing interest!

@juanrubio juanrubio added this to the v0.11.0 milestone Oct 21, 2017

@a06kin

This comment has been minimized.

a06kin commented Nov 24, 2017

Hi @juanrubio

I have OSX device. Now I'm trying to compile using autoreconf and make. I will give some update and I will definitely ask questions;

Update for now:

  • autoreconf -ifs
configure.ac:85: warning: macro 'AM_PATH_LOG4C' not found in library
configure.ac:87: error: possibly undefined macro: AM_PATH_LOG4C
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1

TODO: brew install log4c

  • autoreconf -ifs

DONE

  • ./configure
checking python module: soundcloud... no
configure: error: failed to find required module soundcloud
configure: error: ./configure failed for libtizsoundcloud
configure: error: ./configure failed for soundcloud
configure: error: ./configure failed for clients

TODO: easy_install soundcloud

  • ./configure
checking for uuid_generate in -llibuuid... no
checking for uuid >= 2.19.0... no
configure: error: Package requirements (uuid >= 2.19.0) were not met:

No package 'uuid' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables UUID_CFLAGS
and UUID_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
configure: error: ./configure failed for libtizplatform

TODO: brew install ossp-uuid -> FAIL with version
TODO: PKG_CHECK_MODULES([UUID], [uuid >= 2.19.0]) -> 1.6.2

@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented Nov 24, 2017

Hey!,
@a06kin, thanks for trying!

Unfortunately, I don't have an OSX device and my attempts at using a VirtualBox VM have not been very fruitful. So if you get to a working recipe to build on a mac, I would love to have that added to the project docs somewhere!

@a06kin

This comment has been minimized.

a06kin commented Dec 2, 2017

I have some updates

  • autoreconf -ifs && ./configure
checking for dbus-1 >= 0.60... no
configure: error: You need the DBus libraries (version 0.6 or better)
	http://www.freedesktop.org/wiki/Software_2fdbus
configure: error: ./configure failed for libtizrmproxy
configure: error: ./configure failed for rm

TODO: brew install dbus

  • ./configure
checking for dbus-c++-1 >= 0.6.0-pre1... no
configure: error: Package requirements (dbus-c++-1 >= 0.6.0-pre1) were not met:

No package 'dbus-c++-1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DBUS_CFLAGS
and DBUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
configure: error: ./configure failed for libtizrmproxy
configure: error: ./configure failed for rm

TODO: compile&install https://github.com/andreas-volz/dbus-cplusplus

  • ./configure
checking for oggz >= 1.1.1... no
configure: error: Please install liboggz version 1.1.1 or later.
configure: error: ./configure failed for ogg_demuxer
configure: error: ./configure failed for plugins

TODO: brew install liboggz

  • ./configure
checking for opusfile >= 0.5... no
configure: error: Please install libopusfile version 0.5 or later.
configure: error: ./configure failed for opusfile_decoder
configure: error: ./configure failed for plugins

TODO: brew install opusfile

  • ./configure
checking for sndfile >= 1.0.25... no
configure: error: Package requirements (sndfile >= 1.0.25) were not met:

No package 'sndfile' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSNDFILE_CFLAGS
and LIBSNDFILE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
configure: error: ./configure failed for pcm_decoder
configure: error: ./configure failed for plugins

TODO: brew install libsndfile

  • ./configure
checking for alsa... no
configure: error: Package requirements (alsa) were not met:

No package 'alsa' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ALSA_CFLAGS
and ALSA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
configure: error: ./configure failed for pcm_renderer_alsa
configure: error: ./configure failed for plugins

OSX has no alsa; Only CoreAudio;
I need to check code and rewrite parts with alsa;

@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented Dec 2, 2017

There are two OpenMAX IL pcm renderers in Tizonia, one based on Alsa and the other based on PulseAudio.

I don't know if it is feasible to install PulseAudio on OSX. Apparently there is a formula which appears to be active?
http://brewformulas.org/Pulseaudio

If this is a viable route, then a top-level configure option could be added to disable the Alsa renderer on OSX. For testing purposes, you can disable locally by removing pcm_renderer_alsa from both configure.ac and Makefile.am files located in this directory:

https://github.com/tizonia/tizonia-openmax-il/tree/master/plugins

@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented Dec 2, 2017

Let me know if PulseAudio is doable on OSX, and I'll add a top-level "--disable-alsa" configure option.

@a06kin

This comment has been minimized.

a06kin commented Dec 3, 2017

@juanrubio PulsaAlsa is ok on osx;
I found pcm_renderer_alsa; But I can't get simple way to disable it;

--disable-alsa will be great

@a06kin

This comment has been minimized.

a06kin commented Dec 3, 2017

Oh. Just read your first comment; I will try "removing pcm_renderer_alsa from both configure.ac and Makefile.am";
Will give you feedback;

@a06kin

This comment has been minimized.

a06kin commented Dec 3, 2017

OSX don' have epoll;
I found that you have support for KQUEUE;

@juanrubio how to set up to use kqueue?

@a06kin

This comment has been minimized.

a06kin commented Dec 3, 2017

Some updates

  • ./configure
checking for alsa... no
configure: error: Package requirements (alsa) were not met:

No package 'alsa' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ALSA_CFLAGS
and ALSA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
configure: error: ./configure failed for pcm_renderer_alsa
configure: error: ./configure failed for plugins

TODO: disable alsa

  • ./configure

DONE

  • make
ld: library not found for -lboost_python

TODO: brew install boost-python

  • make
error: too many arguments to function call, expected 1, have 2

TODO: fix code (ignore argument) !!!BAD TEMPORARY SOLUTION!!!

  • make
fatal error: 'sys/epoll.h' file not found

TODO: support for KQUEUE

  • make
error: use of undeclared identifier 'MSG_NOSIGNAL'

TODO: set MSG_NOSIGNAL to 0

  • make
fatal error: 'fishsound/constants.h' file not found

TODO: brew install libfishsound

  • make
fatal error: 'vpx_decoder.h' file not found

Strange. libvpx is installed;
vpx is not in -I/usr/include/vpx;

TODO: fix Makefile.am

  • make
fatal error: 'fileref.h' file not found

Same as vpx_decoder
TODO: fix Makefile.am

  • make

DONE

  • make install

DONE

@a06kin

This comment has been minimized.

a06kin commented Dec 3, 2017

I compiled and install tizonia;

But on start

tizonia --youtube-audio-stream https://www.youtube.com/watch?v=Eg6f4ZFRpsI

I get

Assertion failed: (p_queue_), function post_cmd, file tizgraphmgr.cpp, line 409.
[1]    39867 abort      tizonia --youtube-audio-stream https://www.youtube.com/watch\?v\=Eg6f4ZFRpsI
@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented Dec 3, 2017

OK, I've created an issue for the top-level configure option

#402

So you've managed to get all the dependencies and workarounds in place to get Tizonia to build. That's great progress!.

As for the crash, we need to figure out what's going on.

First step would be to enable logging to see if that gives us a clue:

  • under config/src you will find a log4crc file.
  • copy this file to "$HOME/.log4crc" (note the dot)
  • then either uncomment the following line
<!--         <category name="root" priority="error" appender="tizlogfile"/> -->

and replace tizlogfile with stdout or leave tizlogfile and just customise this to log on a location of your choosing:

	<appender name="tizlogfile" type="rollingfile" logdir="/tmp" prefix="tizonia.log" layout="tiz" rollingpolicy="tizrolling" />

Of course, a gdb backtrace would be super useful too (I believe it can be installed with homebrew too). You can run like this:

$ gdb --args tizonia --youtube-audio-stream "https://www.youtube.com/watch?v=Eg6f4ZFRpsI"

When it crashes, press b, to get the backtrace.

Thanks!

@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented Dec 4, 2017

Let me know if PulseAudio is doable on OSX, and I'll add a top-level "--disable-alsa" configure option.

This is now implemented in #402. But please note that the actual option is --without-alsa, i.e.

./configure --without-alsa

@tizonia tizonia removed this from the v0.11.0 milestone Feb 11, 2018

@KyleChamberlin

This comment has been minimized.

KyleChamberlin commented Aug 28, 2018

@juanrubio @a06kin

It looks like this has gone largely dormant, is there any active work being done here? I would be happy to pick up where @a06kin left off. I read through the thread here, is there any other documentation I should check out?

Thanks in advance for any help bringing me up to speed.

@juanrubio

This comment has been minimized.

Collaborator

juanrubio commented Aug 29, 2018

@KyleChamberlin :

It would be awesome if someone could pick this up. So thanks in advance if you can do it.

From what I remember, @a06kin was able to compile and install Tizonia (with various functionalities disabled) and he got his first crash while using one of the YouTube options. So I guess one way to start is to try to reproduce up to that point and obtain some backtraces from the crash with GDB. With that, we could investigate the root cause and plan for the next step.

This is the main document to read for building instructions etc.
https://github.com/tizonia/tizonia-openmax-il/blob/master/BUILDING.md

This comment has some info on how to enable logging in Tizonia, etc, which will be essential for this task.

And if there's anything you need, don't hesitate to ask!

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