ssfrr / AudioIO.jl

[UNMAINTAINED] - Simple Audio IO in Julia
MIT License
61 stars 24 forks source link

Portaudio isn't installed via HomeBrew on OSX #3

Closed ssfrr closed 10 years ago

ssfrr commented 10 years ago

It looks like in order to get this working I'll need to put together a custom formula that will download a portaudio binary, and request that it be added to https://github.com/staticfloat/homebrew-juliadeps.

jfsantos commented 10 years ago

Any updates on this? I've noticed there's Homebrew stuff in build.jl but it does not seem to work. However, if I install portaudio using Homebrew before running Pkg.build("AudioIO"), then it works properly.

ssfrr commented 10 years ago

I've just filed an issue with HomeBrew.jl, so hopefully we can get portaudio and libsndfile binaries in there which will simplify the install process for people.

On Sun, Jun 8, 2014 at 10:46 AM, João Felipe Santos < notifications@github.com> wrote:

Any updates on this? I've noticed there's Homebrew stuff in build.jl but it does not seem to work.

— Reply to this email directly or view it on GitHub https://github.com/ssfrr/AudioIO.jl/issues/3#issuecomment-45438473.

IainNZ commented 10 years ago

I just installed portaudio and libsndfile with Homebrew, but when I do Pkg.build I get

julia> Pkg.build("AudioIO")
INFO: Building Homebrew
HEAD is now at c588ffb Remove git rebasing code that slipped through
HEAD is now at 1b85de5 Update netcdf bottle
INFO: Building AudioIO
cc shim.c -fPIC -c -o shim.o  -g -Wall -Wno-strict-aliasing -fno-omit-frame-pointer -fPIC
shim.c:1:10: fatal error: 'portaudio.h' file not found
#include <portaudio.h>
         ^
1 error generated.
make: *** [shim.o] Error 1
IainNZ commented 10 years ago

Hah ok so I went to /usr/local/include and did the same thing from that location (where the header is) and it worked. woops I lied...

IainNZ commented 10 years ago

Ok so adding -I/usr/local/include got me through the first part, but now I fail on linking in portaudio and shim.o. @dcjones did you get around this somehow?

IainNZ commented 10 years ago

I have libportaudio.a in my /usr/local/lib and I did export LD_LIBRARY_PATH=/usr/local/lib/ and export DYLD_LIBRARY_PATH=/usr/local/lib/, and I'm out of ideas.

ssfrr commented 10 years ago

Hmm, I've never had much trouble after the libs were installed with homebrew. Let's check it out tomorrow.

On Fri, Jun 27, 2014 at 12:12 AM, Iain Dunning notifications@github.com wrote:

I have libportaudio.a in my /usr/local/lib and I did export LD_LIBRARY_PATH=/usr/local/lib/ and export DYLD_LIBRARY_PATH=/usr/local/lib/, and I'm out of ideas.

— Reply to this email directly or view it on GitHub https://github.com/ssfrr/AudioIO.jl/issues/3#issuecomment-47308500.

dcjones commented 10 years ago

I did run into issues with Pkg.build. I just installed portaudio manually (through homebrew), then ran make in deps/src to build the shim.

IainNZ commented 10 years ago

With a fresh look, it was sufficient to add -L/usr/local/lib in the Makefile

ssfrr commented 10 years ago

You mean in the Makefile that builds shim.c?

On Fri, Jun 27, 2014 at 10:45 AM, Iain Dunning notifications@github.com wrote:

With a fresh look, it was sufficient to add -L/usr/local/lib in the Makefile

— Reply to this email directly or view it on GitHub https://github.com/ssfrr/AudioIO.jl/issues/3#issuecomment-47363850.

ssfrr commented 10 years ago

@dcjones Pkg.build currently can't handle the binary dependencies on OSX because they haven't been added to Homebrew.jl yet, I'm currently holding out for the issues I filed to add them.

IainNZ commented 10 years ago

Correct, edited the Makefile

ssfrr commented 10 years ago

@IainNZ I added -L/usr/local/lib to the linker flags, can you build again when you have the chance to make sure everything's cool?

ssfrr commented 10 years ago

Looks like homebrew.jl can now install Portaudio and libsndfile.