-
Notifications
You must be signed in to change notification settings - Fork 89
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
Linux support #33
Comments
Contributions are welcome 🙂 The building process should be very similar to OSx. |
I've made some steps to build this (and the /libonnxruntime-neuralnote dependency) in Linux.
|
I've created a (pull request](#44) that is dependent on a prebuilt onnxruntime library. It isn't building (linking errors) yet, but I figured its a place to start a discussion. |
just tried running this on wine with yabridge on bitwig, it kinda works but the gui has a weird rendering issues which causes huge delay / latency |
@RustoMCSpit but we have the source-code, so no need for wine. Thnx for the work @gnac not sure if I'll be able to get your stuff tested, but looking forward to see it working! |
no need for wine until it actually is supported you mean right? |
@RustoMCSpit sure, if it works for you and you can play with the software that's great. |
ehhh, 'works' but barely, very bugged |
yeah after a few days the app is pretty unbareable to work with through WINE, if the devs want to see it through they could collect crash reports they get and see whats going on |
@RustoMCSpit if you want to go that route please open a separate ticket so we don't mix up topics. I think it would make more sense to build the program for Linux then to try and debug wine issues. |
Lemme know if this goes anywhere! RN it is only usable in a VM for me ;-( |
just to update, program still really weird on WINE after new update |
@RustoMCSpit please open a separate topic on WINE, this request is about actual Linux builds and NOT any WINE work Lets not dilute either topic by cramming it into the same ticket. |
@gnac Did you get any further with this? I've also managed to build my own version of onnxruntime and actually got NeuralNote to compile. But right now it segfaults when starting. I've so far traced this back to this line of code (juce_XmlElement.cpp):
For some reason, this static variable is not initialized correctly and the pointer inside the string (to the actual text data) is a Null pointer so it crashes when it's being used (in this case, to parse the Linux fontconfig). Might just be a small issue with some JUCE settings required on Linux, I'm sifting through the things, but it's a pretty strange error. |
To me, this looks like a case of "static initialization fiasco". In
Under Linux, this triggers (unless JUCE_FONT_PATH is set) a font lookup that involves parsing Setting JUCE_FONT_PATH seems to solve the problem and makes the program start. Seems to work well so far. I'm not sure why JUCE insists on parsing the fontconfig since this plugin only loads fonts from its local resources. But it's probably a simple patch to fix this (or just set JUCE_FONT_PATH environment to literally anything). So in summary, it's working in Linux for me, note detection etc. is working as expected. Unfortunately, I cannot seem to get MIDI out of the plugin. I can start the dragging, but neither dropping it into my DAW (Bitwig), nor into the file browser seems to be doing anything. |
@polygon you've gotten further than I have. How did you resolve the linker issue? |
I don't remember running into this linker issue to be honest. I've uploaded my current state here: https://github.com/polygon/NeuralNote/tree/linux I re-factored the UIDefines.h code into a singleton provider to work around the initialization order issues. Setting JUCE_FONT_PATH would solve the issue for running the program standalone but not when used as a plugin. With the refactoring, I also got things working in Bitwig. I'm not currently using
This expects to have a Linux built libonnxruntime-neuralnote in place as well, similarly unpacked as described in the |
Hi, and thanks so much for porting this beautiful project in Linux (I'm under Mint). |
Yes it will be really great. |
Thanks ..... I'm waiting.... ;-) |
I drove this a bit further and opened Pull Requests in both project components: #85 However, communication quickly died down (or didn't happen), so I assumed that the maintainers were not interested in this. I finished the packaging for the Linux distribution of my choice (NixOS) and carried on. I'll give a short rundown on how to build this yourself, though. You will need to use my forks of libonnxruntime-neuralnote and NeuralNote. For both, you want the "Linux" branch. I will link my Nix build recipes, since they are also a good indicator on the dependencies that you will need. You can ignore a lot of the CMake download links replacement, that is a Nix/NixOS peculiarity (no internet access during builds). libonnxruntime-neuralnote (Nix-recipe)Once you installed everything unter NeuralNote (Nix-recipe)Again, make sure you have all the tools and dependencies installed. Now, run all the steps under Hopefully this gets you started. Let me know if you get stuck anywhere. |
Thanks for doing this. |
hello and thank you for your interest. But I don't understand how to install it on my Mint system.... |
Ok, thanks for this contribution.
…On Wed, 20 Mar 2024 at 17:57 CodesoundR ***@***.***> wrote:
I drove this a bit further and opened Pull Requests in both project
components:
#85 <#85>
tiborvass/libonnxruntime-neuralnote#2
<tiborvass/libonnxruntime-neuralnote#2>
However, communication quickly died down (or didn't happen), so I assumed
that the maintainers were not interested in this. I finished the packaging
for the Linux distribution of my choice (NixOS) and carried on. I'll give a
short rundown on how to build this yourself, though. You will need to use
my forks of libonnxruntime-neuralnote
<https://github.com/polygon/libonnxruntime-neuralnote> and NeuralNote
<https://github.com/polygon/NeuralNote>. For both, you want the "Linux"
branch.
I will link my Nix build recipes, since they are also a good indicator on
the dependencies that you will need. You can ignore a lot of the CMake
download links replacement, that is a Nix/NixOS peculiarity (no internet
access during builds).
libonnxruntime-neuralnote (Nix-recipe
<https://github.com/polygon/audio.nix/blob/master/vst/neuralnote/libonnxruntime-neuralnote.nix>
)
Once you installed everything unter buildInputs
<https://github.com/polygon/audio.nix/blob/1217ff4ed70c562b5eaf9832151967b3a568c65c/vst/neuralnote/libonnxruntime-neuralnote.nix#L32-L41>,
you just run the instructions under buildPhase
<https://github.com/polygon/audio.nix/blob/1217ff4ed70c562b5eaf9832151967b3a568c65c/vst/neuralnote/libonnxruntime-neuralnote.nix#L52-L55>.
This should yield you a libonnxruntime-neuralnote.tar.gz which you will
need in the next step.
NeuralNote (Nix-recipe
<https://github.com/polygon/audio.nix/blob/master/vst/neuralnote/neuralnote.nix>
)
Again, make sure you have all the tools and dependencies
<https://github.com/polygon/audio.nix/blob/1217ff4ed70c562b5eaf9832151967b3a568c65c/vst/neuralnote/neuralnote.nix#L42-L58>
installed. Now, run all the steps under postPatch
<https://github.com/polygon/audio.nix/blob/1217ff4ed70c562b5eaf9832151967b3a568c65c/vst/neuralnote/neuralnote.nix#L77-L86>
in the root-folder of the repo (in line 83, reference the tar.gz file
from the build above). This also patches a Drag&Drop bug in JUCE. You then
just run CMake like above
<#33 (comment)>
and this should give you the final binary / plugin.
Hopefully this gets you started. Let me know if you get stuck anywhere.
hello and thank you for your interest. But I don't understand how to
install it on my Mint system....
—
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZIUF3B3NWRW67RNGPVVABTYZG5WDAVCNFSM6AAAAAAYBK7CWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJQGA2TKNZUG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
These instructions are to build the project, distribution for specific Linux systems comes later. I'm very sorry, but I don't have the time to build and maintain packages for a Linux distribution I am not using myself. If you find someone who knows how to package for Ubuntu/Mint and is interested, I'm happy to assist getting things started. |
Hi, EDIT: BUT TO DATE I HAVE NOT BEEN ABLE TO FIND ANYONE :-( |
Hi, ./build/NeuralNote_artefacts/Release/Standalone/NeuralNote which is particularily odd, since the newst ORT model version is 5 according to https://onnxruntime.ai/docs/performance/model-optimizations/ort-format-models.html I did run the convert-onnx-to-ort stuff before building the onnxruntime and cp-ing the tar, but my guess is now that something went wrong in that step. |
@karimdjemai I encountered a similar error message on Windows recently when working with onnxruntime. The issue was that my executable was linking with the onnxruntime dynamic library available in my system dynamic library directory. Maybe the same is happening for you on Linux. So check that you successfully get a static lib for onnxruntime and that you link with it and not with some other version available on your system. |
Hi @DamRsn, I checked the dynamic library links of the executable, and onnxruntime was not there. The onnxruntimelib.a file sits in the right location as well. But you might still be onto something, as I could not find a log proving the linking of the static lib in the build output. This might be normal, though. I am very grateful for further ideas on where to look to get it running in general, thanks in advance! |
I finally got it working, so if anyone encounters my problem, here is how I solved it:
BUT when building libonnxruntime-neuralnote, you need to install the requirements.txt into the venv. Here it is important to use the correct python package version of onnxruntime (its 1.14.1) and not the newest. For that I had to downgrade python to below 3.11, so that the onnxruntime package is available. @DamRsn Thanks for your help, without your comment I wouldn't have suspected that my build of libonnxruntime-neuralnote was faulty, also thanks for building this incredible plugin in general. It is super cool! |
I hope to see soon an official version of this software for Linux because it is difficult for me to build it.... :-( |
It took some time but it's finally here! I just released NeuralNote v1.1.0, it includes Standalone and VST3 for Linux! Let me know if it works as expected. If so, I'll close this issue. |
Hey @gnac , thanks for reporting this. What's your Linux distro and what DAW are you using? Is it both on Standalone and VST3? If you're able to compile NeuralNote, testing with a debugger to see what happens when you try to drag would be great. You could put breakpoints in |
I use Manjaro (Arch deriviative) with KDE/Plasma and Bitwig. I see the same behavior in standalone and VST. |
I tried to build master and v1.1.0, but I got |
Instructions for building on Manjaro/Arch.(Updated with fix for std::setw/setfill test errors) Arch Dependencies (install with pacman): gcc pyenv Build libonnxruntime
Add Then, to avoid the release script deleting and re-cloning the onx repo because we've modified it, comment out lines 33-36 in release.sh
Then, at line 49 in release.sh, add
Rerun Build NeuralNoteClone the NeuralNote repo to the parent of the onnxruntime folder.
|
Glad this went well after all, many thanks for the porting effort. Regarding
I had this issue as well. I was debugging this for a while and noticed that I remember the Drag & Drop stuff to be quite complicated so I just ended up changing this function:
Changed |
What permutations did you have to go through to get this to build? I recognize I'm on a slightly different platform, but the build step for linux seem broken or at least incomplete in their current form. |
update 2: I just made a pull request to the libonnxruntime-neuralnote repo to automatically create and package the libonnxruntime.a file needed by NeuralNote into the onnxruntime-v1.14.1-neuralnote.0-linux-x86_64.tar.gz tar ball. |
How is this PR different from this one? That's the on I used to build on Linux and I think I will merge it soon. Concerning the drag and drop, is it solved? If not, I don't want to modify JUCE for this. What we could do instead is to add a button to export the midi file. It would opens a filechooser to select where to save the transcription. |
I think having a filechooser to save the midi file is a reasonable workaround for now. I hadn't seen the other pull request prior so it looks like the static library creation is the effectively the same with a some additional sub libraries added to the final. One minor difference is that the make-archive.sh file currently builds the archive using git commands, whereas the polygon request also build a tar ball in the build-linux script. |
Hi, I am getting the same problem in Reaper on Linux, please add the export midi button soon, I would love to use this software :) There is some talk that the standalone version drag and drop works better here: https://linuxmusicians.com/viewtopic.php?t=26632&sid=896ce3ee3602cfa9a4356ef9ecf52f32&start=15 |
Duh.
The text was updated successfully, but these errors were encountered: