Giter Site home page Giter Site logo

Comments (4)

jasonhallen avatar jasonhallen commented on June 2, 2024 1

Thanks for the explanation.  Now I get the problem.  I just installed Csound via Brew, and then I was able to install csound-api via npm.  Success!  Thanks!

Jason

from csound-api.

nwhetsell avatar nwhetsell commented on June 2, 2024

I don’t have an M1 Mac on which I can reproduce this, but on Apple Silicon, Homebrew installs into /opt/homebrew rather than /usr/local, so Clang needs to be told where to find Homebrew-installed headers and libraries.

Can you try running—

CPATH="$(brew --prefix)/include" \
LIBRARY_PATH="$(brew --prefix)/lib" \
npm install https://github.com/nwhetsell/csound-api.git

—and if that still results in an error about boost/lockfree/queue.hpp not being found—

export CPATH="$(brew --prefix)/include"
export LIBRARY_PATH="$(brew --prefix)/lib"
npm install https://github.com/nwhetsell/csound-api.git

I’m hoping that one or both of those will resolve the boost/lockfree/queue.hpp error, but I’m willing to bet you’ll end up with an error that csound/cwindow.h isn’t found. Csound’s installers put headers in a non-standard location, and the simplest way to resolve this is to reinstall Csound from Homebrew:

brew install csound

Rerunning one of the above npm install commands should then install csound-api.

from csound-api.

jasonhallen avatar jasonhallen commented on June 2, 2024

Thanks so much for the fast response, Nate! export CPATH="$(brew --prefix)/include" and export LIBRARY_PATH="$(brew --prefix)/lib" did the trick with finding the Boost library. You're also correct that I'm now getting an error due to the cwindow.h header.

I noticed that the Csound headers appear to be installed on my computer at /Library/Frameworks/CsoundLib64.framework/Headers. Would I be able to use the same export CPATH= command to include this directory? If that's a solution I'd prefer to do that over installing another Csound instance via Brew. Otherwise, I can bite the bullet and do what you suggested.

Thanks!
Jason

from csound-api.

nwhetsell avatar nwhetsell commented on June 2, 2024

@jasonhallen You’re welcome, happy to help!

Would I be able to use the same export CPATH= command to include this directory?

Yes, but that wouldn’t resolve the issue with Clang being able to find csound/cwindow.h. The problem is that on Linux and Windows, Csound puts headers in a folder named csound, so #include <csound/cwindow.h> works. However, Csound’s macOS installer puts headers in the folder you mention—/Library/Frameworks/CsoundLib64.framework/Headers—so #include <csound/cwindow.h> wouldn’t work even if that folder was added to CPATH (but #include <cwindow.h> would work).

The simplest fix for this—by far—is to install Csound using Homebrew. Csound from Homebrew has everything that the “official” installer includes, plus more (like the opcodes that were relegated to https://github.com/csound/plugins).

from csound-api.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.