Skip to content
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

Is this external relocatable? #2

Open
shakfu opened this issue Mar 21, 2022 · 12 comments
Open

Is this external relocatable? #2

shakfu opened this issue Mar 21, 2022 · 12 comments

Comments

@shakfu
Copy link

shakfu commented Mar 21, 2022

Hi Iain,

Just saw your video. Very cool project / iterations over Victor Lazzarini's previous work. Nicely done!

A quick question, does this external statically link to the csound library? If not, may I make a small feature request to have that as an option, since it would be very nice to include a self-contained csound engine in a standalone or package.

Thanks. Just started enjoying Scheme for Max and the efforts you made to get it working for time-critical use cases. This is another rabbit hole (-:

@iainctduncan
Copy link
Owner

thanks! I need to look into the linking options, I don't know whether I can do that with the Csound license or not. But I agree, that would be nice to have. Thanks for checking out the stuff!

@Leofltt
Copy link

Leofltt commented Mar 22, 2022

I think the main issue with that is that the size of the file would increase a lot + add the overhead of having to update the object after every Csound release. I think it is compatible with the Csound license though since that is what often happens when distributing VST/AU/AAX plugins built with Cabbage.
Would also be great to have csound embedded into the object from the start though (at least for releases), would really help move this towards the ideal csound~ object that I was wishing for for years since I started using the other legacy one

@shakfu
Copy link
Author

shakfu commented Mar 23, 2022

In my py-js project, i have a number of build variations possible for the external. In this case, you can have the default to be dynamically linked and a 'relocatable' statically-linked version for standalones and packages.

@iainctduncan
Copy link
Owner

Yeah that's what I was thinking. I just need to learn more about how the csound library linking works and check out options. Rory does something similar I believe for Cabbage for M1.

@shakfu
Copy link
Author

shakfu commented Mar 23, 2022

I had a quick look at the csound code on github

The build system uses cmake and you can 'optionally' also build csound statically as follows:

mkdir build
cmake -DBUILD_STATIC_LIBRARY=ON ..
make

You'll find libcsnd6.a and libCsoundLib64.a in the build directory

@iainctduncan
Copy link
Owner

oh great! if anyone wants to submit a PR for improving the CMake files to allow this, you are welcome to. Otherwise I'll get to it in the next week or so. I would really like there to be a one click install available for all windows, intel mac, and M1 mac.

@shakfu
Copy link
Author

shakfu commented Apr 22, 2023

@iainctduncan

Hi I recently found some time to make a relocatable version for macOS with this fork. It's only tested on x86_64 so far.. and not a lot of testing outside of my homebrew-based setup.

@iainctduncan
Copy link
Owner

Excellent! I am just wrapping up my term and then was actually planning on getting back to this after that. But if you are able to help I would be more than happy to give you commit rights. Is your fork also a universal binary for M1 or intel?

@shakfu
Copy link
Author

shakfu commented Apr 24, 2023

Hi Iain,

Thanks for your feedback. I've only tested it on an intel mac so far, but I don't see any reason why it wouldn't also build on Apple silicon machines. I'm away from my M1 laptop for a while so this is not going to happen soon.

Also note that while there's an option in the root CMakeLists.txt to enable universal binary builds, the dependencies will also have to be universal and I don't think this is the case for Homebrew packages which are typically only built as native. In any case, if it's too much of a pain produce a universal binary, one can just release native builds.

@iainctduncan
Copy link
Owner

Just wanted to update this thread to add that I have put a universal binary for intel Mac now. (not rellocatable though)

@shakfu
Copy link
Author

shakfu commented Oct 24, 2023

Hi Iain,

Thanks for the update. Does that mean that the universal binary now works on both intel Macs and apple silicon Macs?

@iainctduncan
Copy link
Owner

iainctduncan commented Oct 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants