Compiling on Linux?

940 views
Skip to first unread message

Jonny Saunders

unread,
Jan 29, 2020, 11:56:06 PM1/29/20
to Bonsai Users
Hello hello!

I have this little behavior framework that does experiments by distributing them over a swarm of raspis (https://auto-pi-lot.com/), and am going to start developing its ephys capabilities. Had a conversation w/ the Open Ephys folks, and they suggested that I use Bonsai for the acquisition side, and while I'm at it I figure I may as well develop a general-purpose sink so our tools can play nice together. I know that .Net Core is cross platform, but I don't know enough about .Net to know whether that means that C# programs can be compiled on Linux. has anyone tried to compile Bonsai on linux (specifically Raspbian)?

I see some pretty neat ways our systems could complement one another, so i'd love to build source/sink modules to link Autopilot & Bonsai <3.

-Jonny

Gonçalo Lopes

unread,
Jan 30, 2020, 5:25:07 PM1/30/20
to Jonny Saunders, Bonsai Users
Hi Jonny and welcome to the forums!

Nice work with Autopilot :)
Re. compiling on Linux, this is actually perfect timing. Just last week we got a first version of Bonsai running on an Ubuntu machine with both .NET Core and mono. I have no idea about Raspbian, but would be very interested in knowing if any of the below methods works!

These are two different routes for running Bonsai cross-platform, with different limitations, and more importantly different futures. Bonsai 3.0 will aim to target .NET Core, so this is the preferred development path, although for now it can run only a fraction of workflows and packages, and there is no editor support.

Bonsai 2.4.1 supports running a half-broken version of the editor using Mono. Basic functionality should work, but several niceties are gone and UI is rendered terribly. This is useful for now to generate test workflows to run on the .NET Core branch, if you are running the entire stack on top of Linux.

Here are build instructions for both approaches.

.NET Core 3.1

For this method, you need to clone the Bonsai 3.0 branch on the bitbucket repo and install .NET Core SDK.
This sequence should work:

hg clone https://bitbucket.org/horizongir/bonsai -r 3.0 cd bonsai
dotnet build Bonsai.sln

A bunch of errors will show up because several projects do not support .NET Core yet, but you should still be able to get the player to build. To see if it works you can run:

dotnet run --project Bonsai.Player --framework netcoreapp3.1

and this should print the output:

usage: Bonsai.Player <workflowFileName>

If you see this, congratulations, you have a working cross-platform command-line player of Bonsai workflows. There's still loads to figure out regarding resolving dependencies, etc, so this is a path for the brave (but definitely ask further if interested).

Mono for Linux

For this method, you need to clone the Bonsai 2.4-patch branch on the bitbucket repo and install Mono for Linux. You should also install nuget in order to avoid a quirk with the legacy Bonsai project file format: sudo apt install nuget

The following sequence should work:

hg clone https://bitbucket.org/horizongir/bonsai -r 2.4-patch
cd bonsai
nuget restore Bonsai.sln
msbuild Bonsai.sln

This should restore all dependencies and build all projects successfully. Some of the unit test projects may not build as they use a different system, but they are not critical to the purposes of running Bonsai anyway. You may want to simply copy all DLL outputs after a successful build to the editor folder for a quick test: cp **/bin/Debug/*.dll Bonsai/bin/Debug

You can then go to the bin folder and try to launch the editor with the following command:

cd Bonsai/bin/Debug
mono Bonsai.exe --no-boot --lib:.

If everything works, the splash screen should show up, and clicking New Project should show you the editor.

From here on, you can assemble your workflows kind of normally. Unfortunately, to run any packages with native dependencies, you will have to resolve those dependencies manually for now. E.g. for OpenCV you will need to build OpenCV from source and create the appropriate symlinks for the shared object libraries.

To trace the names of the symlinks, assemble a workflow that uses OpenCV and try to run it. It will likely give some error with initialization. To get a more complete stack trace, save the workflow into a file in the editor folder (e.g. crash.bonsai), and then  try to launch it from the command-line, like so:

mono Bonsai.exe --no-boot --no-editor --lib:. crash.bonsai

This should give you a stack trace where the name of the missing shared object will be shown next to a System.DllNotFoundException. Create a symlink to your corresponding OpenCV build with the exact same name (regardless of version) and it should hopefully move on to another error. Repeat until done.

Re. OpenCV, Bonsai is designed to work with any 2.4.x version, and in theory might even work with 3.x versions, but most likely not with 4.x versions where they removed the C-interop API.

If you endure this entire path, you may get to run your image and signal processing pipelines in Bonsai on Linux. I'll leave a picture for inspiration that it is at least possible:

image.png

Hope this helps, and let me know what you find!





--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/0ee44278-7996-4b5e-97b4-5612ff2673cf%40googlegroups.com.

Jonny Saunders

unread,
Jan 30, 2020, 8:14:55 PM1/30/20
to Bonsai Users
YES. ok. thank you so much for the details Gonçalo. got a deadline next week and I'll pick this up then. excited to try this out :)

ps, heard you were going to be at the dlc hack in March, see you there!

Simon Den Haene

unread,
Aug 26, 2020, 4:26:47 AM8/26/20
to Bonsai Users
Hi all,

I'm doing an internship in a neurosciences laboratory and I would like to use Bonsai to do the real-time tracking of our animals in the experimentation arena. However, the computer in the lab is running on Linux, so I tested the two solutions proposed by Gonçalo but I've encountered some problems. I tried to clone the bitbucket repository that you mentionned, but it seems to be unavailable. Is there another link available where I could find this repository ? Or do I need a special access ? Or maybe did you test another approach (as I see the previous messages were from January) to compile Bonsai on a Linux machine that you could share with me ?
Thank you in advance for your answer !

Simon

Gonçalo Lopes

unread,
Aug 26, 2020, 9:57:13 AM8/26/20
to Simon Den Haene, Bonsai Users
Hi Simon,

All the bonsai repositories have moved to GitHub following BitBucket's decision to terminate mercurial support:

Specifically, for the Linux build, you want to download the latest 2.5.1 portable:

And then run these steps:

  1. Install the Mono framework for Linux.
  2. Extract the contents of the archive into a folder and run the following command mono Bonsai.exe.
  3. Install Bonsai - Starter Pack from the package manager.
Then to install specifically OpenCV and video support, you will need these instructions:

  1. Add the earlier release repositories for libjasper:
    sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
    
  2. Follow these instructions to build and install OpenCV 2.4 on your system. Make sure to build the 2.4 branch, or download the zip from GitHub.
  3. OpenCV installs libraries into usr/local/lib, so you may need to configure your environment using one of these options to share libraries at a system level.
  4. Download the DLL map config file for OpenCV.NET and copy it into the folder Packages/OpenCV.Net.3.3.1/lib/net40 in your local Bonsai install file to redirect dependencies to your system install.
We have tested this successfully on Ubuntu 18.04 and Ubuntu 20.04.

Hope this helps, and let us know if you can reproduce it.

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

Simon Den Haene

unread,
Sep 2, 2020, 5:46:44 AM9/2/20
to Bonsai Users
Hi Gonçalo,

Thanks a lot for your explanations ! I've been able to reproduce the installation of Bonsai on the Linux computer of our lab, it will help us a lot.
Now that it's done, we would like to combine Bonsai and DeepLabCut to do our real-time tracking.
I've seen some information on how to proceed to the installation on this GitHub link :  https://github.com/bonsai-rx/deeplabcut .
But I suppose it will not be exactly the same steps as I want to run it on a Linux computer.
Could you give me some more explanations on how to run Bonsai+DeepLabCut on a Linux computer ?
Another thing I'm asking myself is if it would possible to use a TPU (we order the Google USB accelerator for our lab) with the Bonsai+DeepLabCut installation to improve the performances of our tracking system.
Do you have any idea about it ?
Thanks a lot in advance for your help !

Simon

Gonçalo Lopes

unread,
Sep 6, 2020, 7:21:19 PM9/6/20
to Simon Den Haene, Bonsai Users
Hi Simon,

Great to hear that you were able to reproduce it!

Now you're stepping into uncharted territory, as I don't know of anyone who's been able to run Bonsai - DLC on Linux yet, so you would be the first! The best place to start is to make sure you follow the instructions for configuring DLC on Linux, specifically installing the shared libraries for your graphics card or TPU. You need to make sure you use the same version of tensorflow on Linux that Bonsai - DLC is expecting (TensorFlow 1.15).

When you know the file names for the shared objects you should be able to configure a DLL map config file in pretty much the same way as you did for the OpenCV configuration above and point Bonsai to the right place.

Let me know where/if you get stuck, I would be very curious to see how far you can get with this.
Hope this helps.

Simon Den Haene

unread,
Sep 22, 2020, 6:15:45 AM9/22/20
to Bonsai Users
Hi Goncalo,

Thanks for your explanations and sorry for my (very) late reply ! I worked on other stuff in the past weeks.
I have two more questions for you :

1) I've tried to install Bonsai on a Linux computer running on Ubuntu 16.04. I followed exactly the same process you explained me before, but I encountered some problem while running the "make" command as explained on this link you shared with me : https://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html . The error message I get talks about unsupported GNU version. Would you have succeeded to do the Bonsai installation on a Linux computer running on Ubuntu 16.04 ?

2) Before testing the installation of Bonsai + DeepLabCut on a Linux computer, I tried to do it on my own computer running on Windows 7. I followed all the steps mentioned at this link : https://github.com/bonsai-rx/deeplabcut . I've been able to get the DetectPose, GetBodyPart, ... nodes and to build a workflow with them. But when I wanted to run it, I received this message of error : "Could not load file or assembly 'TensorFlowSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The specified file could not be found". After some research, I suppose this problem is linked to the libtensorflow.dll file I'm using. I downloaded the "libtensorflow-cpu-windows-x86_64-1.15.0.zip" file at this link : https://github.com/neargye-forks/tensorflow/releases . After that, I just added the tensorflow.dll file from the lib folder to the Extensions folder of Bonsai, and renamed it to libtensorflow.dll. Would you have any idea of what I'm doing wrong ? Or any solution I could test to finally run Bonsai + DeepLabCut on my Windows 7 computer ?

Thanks in advance for your answer, it would really help me a lot in my work !

Kind regards,

Simon

Gonçalo Lopes

unread,
Sep 26, 2020, 9:18:25 AM9/26/20
to Simon Den Haene, Bonsai Users
Hi Simon,

Apologies for the brief reply:
  1) I have not tried it with Ubuntu 16.04, only 18.04 or 20.04 and indeed it is possible the build instructions would change for that;
  2) Are you trying to run Bonsai 64-bit or 32-bit? Try using the 64-bit DLLs with 64-bit Bonsai. I have not tried using the CPU tensorflow but I've heard it should work the same.

Let us know if you run into issues and I'll check later for updates.

Message has been deleted

Luke Stetzik

unread,
Oct 26, 2020, 3:42:54 PM10/26/20
to Bonsai Users

Hello I'm attempting to reproduce the installation of Bonsai on a machine running ubuntu 18.04
I've been able to follow most of the steps as described, however when I execute  'mono Bonsai.exe'. I get an error and when I close this window I get a follow up (see attached screenshots).

I think this is pretty simple if you know what's wrong but I haven't figured it out. Any help is appreciated. 

thanks,

Luke

error1.png
error2.png

Gonçalo Lopes

unread,
Oct 26, 2020, 8:58:58 PM10/26/20
to Luke Stetzik, Bonsai Users
Hi Luke,

This seems like a firewall issue. To be honest I have never seen this exact error message which is probably being generated by the underlying transport layer protocol. If you can't get the remote connection to work, another option is to download all the packages manually (or from another install e.g. on windows) and drop them in the Gallery folder next to the Bonsai executable. They should be picked up from there.


Hope this helps.

Can

unread,
Sep 1, 2021, 9:14:37 AM9/1/21
to Bonsai Users
Hello

I have been trying to compile Bonsai on a Docker container with latest version of Mono 6.x.x. The dockerfile:
FROM mono:6

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y git

RUN git clone https://github.com/bonsai-rx/bonsai.git
RUN nuget restore bonsai/Bonsai.sln
RUN msbuild bonsai/Bonsai.sln


However, this yields an error, and would appreciate a helping hand:
CopyFilesToOutputDirectory:
  Copying file from "/bonsai/Bonsai.System.Tests/obj/Debug/net462/Bonsai.System.Tests.dll" to "/bonsai/Bonsai.System.Tests/bin/Debug/net462/Bonsai.System.Tests.dll".
  Bonsai.System.Tests -> /bonsai/Bonsai.System.Tests/bin/Debug/net462/Bonsai.System.Tests.dll
  Copying file from "/bonsai/Bonsai.System.Tests/obj/Debug/net462/Bonsai.System.Tests.pdb" to "/bonsai/Bonsai.System.Tests/bin/Debug/net462/Bonsai.System.Tests.pdb".
Done Building Project "/bonsai/Bonsai.System.Tests/Bonsai.System.Tests.csproj" (default targets).
Done Building Project "/bonsai/Bonsai.sln" (default targets) -- FAILED.

Build FAILED.

"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Core/Bonsai.Core.csproj" (default target) (6) ->
(CoreCompile target) ->
  WorkflowBuilder.cs(236,71): warning CS0612: 'SourceBuilder' is obsolete [/bonsai/Bonsai.Core/Bonsai.Core.csproj]
  WorkflowBuilder.cs(236,94): warning CS0612: 'WindowWorkflowBuilder' is obsolete [/bonsai/Bonsai.Core/Bonsai.Core.csproj]
  Expressions/ExpressionBuilder.cs(176,28): warning CS0612: 'SourceBuilder' is obsolete [/bonsai/Bonsai.Core/Bonsai.Core.csproj]
  WorkflowBuilder.cs(325,34): warning CS0612: 'SourceBuilder' is obsolete [/bonsai/Bonsai.Core/Bonsai.Core.csproj]
  WorkflowBuilder.cs(326,34): warning CS0612: 'WindowWorkflowBuilder' is obsolete [/bonsai/Bonsai.Core/Bonsai.Core.csproj]
  Expressions/InspectBuilder.cs(192,13): warning CS0612: 'InspectBuilder.Error' is obsolete [/bonsai/Bonsai.Core/Bonsai.Core.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Core/Bonsai.Core.csproj" (default target) (6) ->
(GenerateNuspec target) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead. [/bonsai/Bonsai.Core/Bonsai.Core.csproj]
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl [/bonsai/Bonsai.Core/Bonsai.Core.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.System/Bonsai.System.csproj" (default target) (8) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead. [/bonsai/Bonsai.System/Bonsai.System.csproj]
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl [/bonsai/Bonsai.System/Bonsai.System.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Arduino/Bonsai.Arduino.csproj" (default target) (9) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead. [/bonsai/Bonsai.Arduino/Bonsai.Arduino.csproj]
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl [/bonsai/Bonsai.Arduino/Bonsai.Arduino.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Player/Bonsai.Player.csproj" (default target) (11) ->
(ILRepack target) ->
  /bonsai/Bonsai.Player/Bonsai.Player.csproj(31,5): warning : ILRepack: Did not write source server data to output assembly. Source server data is only writeable on Windows


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Player/Bonsai.Player.csproj" (default target) (11) ->
(GenerateNuspec target) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead. [/bonsai/Bonsai.Player/Bonsai.Player.csproj]
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl [/bonsai/Bonsai.Player/Bonsai.Player.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Osc/Bonsai.Osc.csproj" (default target) (22) ->
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead. [/bonsai/Bonsai.Osc/Bonsai.Osc.csproj]
  /usr/lib/mono/msbuild/Current/bin/Sdks/NuGet.Build.Tasks.Pack/build/NuGet.Build.Tasks.Pack.targets(198,5): warning : The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl [/bonsai/Bonsai.Osc/Bonsai.Osc.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Core.Tests/Bonsai.Core.Tests.csproj" (default target) (23) ->
(CoreCompile target) ->
  TypeMappingTests.cs(21,39): warning CS0612: 'ExternalizedTimeSpan<int>' is obsolete [/bonsai/Bonsai.Core.Tests/Bonsai.Core.Tests.csproj]


  /bonsai/Bonsai/Bonsai.csproj : error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai/Bonsai.csproj" (default target) (2) ->
  /bonsai/Bonsai/Bonsai.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Editor/Bonsai.Editor.csproj" (default target) (3) ->
  /bonsai/Bonsai.Editor/Bonsai.Editor.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Vision/Bonsai.Vision.csproj" (default target) (4) ->
(OpenCV_init_targets_0 target) ->
  /root/.nuget/packages/opencv.net/3.3.1/build/net40/OpenCV.Net.targets(41,5): error MSB3030: Could not copy the file "/root/.nuget/packages/opencv.net/3.3.1/build/net40/../../build/native/private/coapp.NuGetNativeMSBuildTasks.dll.orig" because it was not found. [/bonsai/Bonsai.Vision/Bonsai.Vision.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Design/Bonsai.Design.csproj" (default target) (5) ->
  /bonsai/Bonsai.Design/Bonsai.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Vision.Design/Bonsai.Vision.Design.csproj" (default target) (7) ->
  /bonsai/Bonsai.Vision.Design/Bonsai.Vision.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Scripting/Bonsai.Scripting.csproj" (default target) (10) ->
  /bonsai/Bonsai.Scripting/Bonsai.Scripting.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Audio/Bonsai.Audio.csproj" (default target) (14) ->
(OpenCV_init_targets_0 target) ->
  /root/.nuget/packages/opencv.net/3.3.1/build/net40/OpenCV.Net.targets(41,5): error MSB3030: Could not copy the file "/root/.nuget/packages/opencv.net/3.3.1/build/net40/../../build/native/private/coapp.NuGetNativeMSBuildTasks.dll.orig" because it was not found. [/bonsai/Bonsai.Audio/Bonsai.Audio.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Dsp.Design/Bonsai.Dsp.Design.csproj" (default target) (15) ->
  /bonsai/Bonsai.Dsp.Design/Bonsai.Dsp.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Dsp/Bonsai.Dsp.csproj" (default target) (16) ->
(OpenCV_init_targets_0 target) ->
  /root/.nuget/packages/opencv.net/3.3.1/build/net40/OpenCV.Net.targets(41,5): error MSB3030: Could not copy the file "/root/.nuget/packages/opencv.net/3.3.1/build/net40/../../build/native/private/coapp.NuGetNativeMSBuildTasks.dll.orig" because it was not found. [/bonsai/Bonsai.Dsp/Bonsai.Dsp.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.System.Design/Bonsai.System.Design.csproj" (default target) (17) ->
  /bonsai/Bonsai.System.Design/Bonsai.System.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Design.Visualizers/Bonsai.Design.Visualizers.csproj" (default target) (18) ->
  /bonsai/Bonsai.Design.Visualizers/Bonsai.Design.Visualizers.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.NuGet.Design/Bonsai.NuGet.Design.csproj" (default target) (19) ->
  /bonsai/Bonsai.NuGet.Design/Bonsai.NuGet.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai32/Bonsai32.csproj" (default target) (20) ->
  /bonsai/Bonsai32/Bonsai32.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Windows.Input/Bonsai.Windows.Input.csproj" (default target) (21) ->
  /bonsai/Bonsai.Windows.Input/Bonsai.Windows.Input.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.Design.Visualizers/Bonsai.Design.Visualizers.csproj" (GetTargetFrameworks target) (18:2) ->
  /bonsai/Bonsai.Design.Visualizers/Bonsai.Design.Visualizers.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.Dsp.Design/Bonsai.Dsp.Design.csproj" (GetTargetFrameworks target) (15:2) ->
  /bonsai/Bonsai.Dsp.Design/Bonsai.Dsp.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.Scripting/Bonsai.Scripting.csproj" (GetTargetFrameworks target) (10:2) ->
  /bonsai/Bonsai.Scripting/Bonsai.Scripting.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.Shaders.Design/Bonsai.Shaders.Design.csproj" (GetTargetFrameworks target) (25) ->
  /bonsai/Bonsai.Shaders.Design/Bonsai.Shaders.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.System.Design/Bonsai.System.Design.csproj" (GetTargetFrameworks target) (17:2) ->
  /bonsai/Bonsai.System.Design/Bonsai.System.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.Vision.Design/Bonsai.Vision.Design.csproj" (GetTargetFrameworks target) (7:2) ->
  /bonsai/Bonsai.Vision.Design/Bonsai.Vision.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.StarterPack/Bonsai.StarterPack.csproj" (default target) (24) ->
"/bonsai/Bonsai.Windows.Input/Bonsai.Windows.Input.csproj" (GetTargetFrameworks target) (21:2) ->
  /bonsai/Bonsai.Windows.Input/Bonsai.Windows.Input.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Shaders/Bonsai.Shaders.csproj" (default target) (26) ->
(OpenCV_init_targets_0 target) ->
  /root/.nuget/packages/opencv.net/3.3.1/build/net40/OpenCV.Net.targets(41,5): error MSB3030: Could not copy the file "/root/.nuget/packages/opencv.net/3.3.1/build/net40/../../build/native/private/coapp.NuGetNativeMSBuildTasks.dll.orig" because it was not found. [/bonsai/Bonsai.Shaders/Bonsai.Shaders.csproj]


"/bonsai/Bonsai.sln" (default target) (1) ->
"/bonsai/Bonsai.Shaders.Design/Bonsai.Shaders.Design.csproj" (default target) (25:2) ->
  /bonsai/Bonsai.Shaders.Design/Bonsai.Shaders.Design.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk.WindowsDesktop' specified could not be found.

    18 Warning(s)
    24 Error(s)

Time Elapsed 00:00:06.88
The command '/bin/sh -c msbuild bonsai/Bonsai.sln' returned a non-zero code: 1

Gonçalo Lopes

unread,
Nov 6, 2021, 9:26:05 AM11/6/21
to Can, Bonsai Users
Hi Can,

  /bonsai/Bonsai/Bonsai.csproj : error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.

This seems to be the root of the issue. I believe Mono is trying to target .NET Core, maybe because the new Bonsai solution uses the new csproj format. Which branch of Bonsai are you trying to target? Bonsai 3.0 is the first branch targeting .NET Core, for the stable main branch for now you still need to use only mono, and even then sometimes there are issues.

Are you trying to just run Bonsai? In that case, why not just run the executable directly with Mono? I believe it might be easier.

Hope this helps.



oren A

unread,
Jan 26, 2022, 11:13:53 AM1/26/22
to Bonsai Users
Hi, I'm losing mouse control when I go to Manage Packages window,
Basically once I click on Manage Packages my mouse stops working, I can use the keyboard, but the mouse stops working. (I use the keyboard to go to the terminal and then ctrl+c to stop mono).
Any idea?
Thanks

Chris Chronopoulos

unread,
Feb 14, 2022, 10:19:47 PM2/14/22
to Bonsai Users
(Trying this on Ubuntu 20.04, with mono 6.12.0)

I am also seeing loss of mouse input on Bonsai 2.6.3. Going back to 2.5.1 seems to avoid the issue, although then I am getting frequent segfaults during routine operations (saving a workflow, closing the package manager etc). Some example output is attached.

Curious what is the current state of Bonsai on Linux? Should I be compiling from source? Or switching to Bonsai 3.0 w/ .NET core?

Thanks,

_chris
bonsai_2.5.1_segfault.txt
Reply all
Reply to author
Forward
0 new messages