errors during mono build

535 views
Skip to first unread message

Thaddeus Norman

unread,
Aug 28, 2020, 5:29:11 PM8/28/20
to HeuristicLab
Hi!,
I'm trying to install HeurisitcLab on my Linux system which is a SUSE Linux Enterprise Server 12 SP5, but I am getting errors when I build using mono.  Attached is a copy of the build errors. 

Any advice would be appreciated.  
Thanks
Thaddeus
build.errors.txt

YOUNESS EL HAMZAOUI

unread,
Aug 28, 2020, 9:54:46 PM8/28/20
to heuris...@googlegroups.com
hi, try to do it using windows operating system


--
You received this message because you are subscribed to the Google Groups "HeuristicLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to heuristiclab...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/heuristiclab/e655cf85-fcf8-46e7-95dc-f0edb7946565n%40googlegroups.com.

Bogdan Burlacu

unread,
Sep 2, 2020, 3:59:02 AM9/2/20
to heuris...@googlegroups.com
Hi,

Those errors are quite strange indeed. In general, the steps for building on linux should be:

1) check out the HL trunk

2) Run prepareProjectsForMono.sh
cd trunk
chmod +x prepareProjectsForMono.sh
./prepareProjectsForMono.sh

3) download nuget:

4) make sure the dependencies are installed via nuget
mono nuget.exe restore HeuristicLab.ExtLibs.sln
mono nuget.exe restore HeuristicLab\ 3.3.sln\

5) build
msbuild HeuristicLab.ExtLibs.sln
msbuild HeuristicLab\ 3.3.sln

There might be some small errors (for example, HeuristicLab.OrTools did not build for me), but you should get 99% of the assemblies in the bin folder.
Then it's just a matter of referencing the ones you want in your project and everything will work.

Let us know if you get any more errors after following these steps. I was able to build the project using Mono 6.10 and msbuild 16.6.0 on Arch linux.

Best,
Bogdan


Thaddeus Norman

unread,
Sep 2, 2020, 4:36:17 PM9/2/20
to heuris...@googlegroups.com
Thanks for the advice.  I followed the instructions, and they worked up to step 3.  Then at step four I got:

$ mono nuget.exe restore HeuristicLab.ExtLibs.sln
MSBuild auto-detection: using msbuild version '' from '/nobackupp16/swbuild/analytix/tools/spack/opt/spack/linux-sles12-sandybridge/gcc-4.8/mono-6.8.0.123-oc33v7sxd2gzw3jbzcd3xbxezmff4h6r/bin'.

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

MSBUILD: error MSBUILD0004: Too many project files specified

What does this error indicate?

Thanks
Thaddeus

Bogdan Burlacu

unread,
Sep 3, 2020, 5:29:10 AM9/3/20
to heuris...@googlegroups.com
Hi,

Seeing as you get a warning about xbuild, I am guessing that in your version of mono msbuild is actually an alias for xbuild (or nuget incorrectly detects msbuild as xbuild).
Then it looks like xbuild does not support the same command line invocation - maybe similar to https://stackoverflow.com/questions/32220678/xbuild-reporting-too-many-project-files-but-works-with-msbuild.

What you could try:
- make sure your mono distribution is up to date (sadly I don't know how it goes on SUSE Enterprise)
- double check if msbuild is actually msbuild or aliased to xbuild (eg check that bin folder for symlinks and such)
- maybe it will be enough to find an actual msbuild binary and replace yours with it
- or you could use mono as a docker image https://www.mono-project.com/download/stable/#download-docker
- or you could try to replace step 4 with brute force (hoping that the xbuild invocation will work with individual csproj files - at least it seems to work in my arch distro): 
find . -type f -name "*.csproj" -exec mono nuget.exe restore {} \;

Hopefully one of these suggestions will work.

Best,
Bogdan

Thaddeus Norman

unread,
Sep 9, 2020, 1:06:36 PM9/9/20
to heuris...@googlegroups.com
Hi,

I pulled the mono-latest container from docker, but I am not authorized to use docker on my system so I attempted the build using Singularity following the given instructions:

1) check out the HL trunk

2) Run prepareProjectsForMono.sh
cd trunk
chmod +x prepareProjectsForMono.sh
./prepareProjectsForMono.sh

3) download nuget:

4) make sure the dependencies are installed via nuget
mono nuget.exe restore HeuristicLab.ExtLibs.sln
mono nuget.exe restore HeuristicLab\ 3.3.sln\

5) build
msbuild HeuristicLab.ExtLibs.sln
msbuild HeuristicLab\ 3.3.sln

no errors were observed until the last command (msbuild HeuristicLab\ 3.3.sln) where some errors were generated.  When I changed directory to bin I could not find the HeuristicLab.exe.  Attached is the log file.  Any suggestions?
Thanks
Thaddeus

build_log.txt

Bogdan Burlacu

unread,
Sep 10, 2020, 4:14:41 AM9/10/20
to HeuristicLab
Hi,

Unfortunately this is normal. The errors you got refer to the GUI part of HeuristicLab which uses Windows Forms, unsupported on Linux.
This means that you won't be able to run the graphical interface, but you can nevertheless directly use the assemblies implementing the framework's business logic (those are the dll files not ending with .Views).
I've attached a sample console application which shows how to programmatically create and run a genetic algorithm, by referencing the components from the framework.
We can of course help with further programming advice if you have more specific goals.

Best,
Bogdan
hl-console-app.7z

YOUNESS EL HAMZAOUI

unread,
Sep 10, 2020, 4:18:35 AM9/10/20
to heuris...@googlegroups.com
Try to do it with windows 10
Good luck!

Youness El Hamzaoui

unread,
Sep 10, 2020, 4:19:33 AM9/10/20
to heuris...@googlegroups.com
Try to do it with windows 10
Good luck!

El jue., 10 sept. 2020 a las 3:18, Bogdan Burlacu (<bogdan....@fh-ooe.at>) escribió:
Boxbe This message is eligible for Automatic Cleanup! (bogdan....@fh-ooe.at) Add cleanup rule | More info
Hi,

Unfortunately this is normal. The errors you got refer to the GUI part of HeuristicLab which uses Windows Forms, unsupported on Linux.
This means that you won't be able to run the graphical interface, but you can nevertheless directly use the assemblies implementing the framework's business logic (those are the dll files not ending with .Views).
I've attached a sample console application which shows how to programmatically create and run a genetic algorithm, by referencing the components from the framework.
We can of course help with further programming advice if you have more specific goals.

Best,
Bogdan


On Wednesday, September 9, 2020 at 7:06:36 PM UTC+2 brew...@gmail.com wrote:
Hi,

I pulled the mono-latest container from docker, but I am not authorized to use docker on my system so I attempted the build using Singularity following the given instructions:

1) check out the HL trunk

2) Run prepareProjectsForMono.sh
cd trunk
chmod +x prepareProjectsForMono.sh
./prepareProjectsForMono.sh

3) download nuget:

4) make sure the dependencies are installed via nuget
mono nuget.exe restore HeuristicLab.ExtLibs.sln
mono nuget.exe restore HeuristicLab\ 3.3.sln\

5) build
msbuild HeuristicLab.ExtLibs.sln
msbuild HeuristicLab\ 3.3.sln

no errors were observed until the last command (msbuild HeuristicLab\ 3.3.sln) where some errors were generated.  When I changed directory to bin I could not find the HeuristicLab.exe.  Attached is the log file.  Any suggestions?
Thanks
Thaddeus

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

johanne...@gmail.com

unread,
Sep 10, 2020, 4:33:09 AM9/10/20
to HeuristicLab
Hi Thaddeus,
Hi Bogdan,

actually, you should be able to build the GUI part too if you have access to the System.Windows.Forms.DataVisualization DLL of the .NET Framework. Put the DLL in your bin folder and run prepareProjectsForMono.sh. It should update the project references accordingly.

Best regards,
Johannes
---

Thaddeus Norman

unread,
Sep 11, 2020, 12:47:18 PM9/11/20
to heuris...@googlegroups.com
Hi Johanne,
I do have the System.Windows.Forms.DataVisualization.dll in the bin directory.  When I compile and run a program will the GUI appear? 

I'm new to HeuristicLab and am not actually the end user, but will act as technical support for the end user so  I need to learn how the software stack works.

Thanks
Thaddeus

--
You received this message because you are subscribed to a topic in the Google Groups "HeuristicLab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/heuristiclab/jTmdpkNOkQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to heuristiclab...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/heuristiclab/e388cd2a-618d-43d6-8d5c-d7c06e63449en%40googlegroups.com.

johanne...@gmail.com

unread,
Sep 17, 2020, 8:32:35 AM9/17/20
to HeuristicLab
Hi Thaddeus,

it has been a while since I compiled HL on Linux using Mono, but back then I got the GUI running, yes. When you run prepareProjectsForMono.sh, it will not only update the references to System.Windows.Forms.DataVisualization, but also remove certain projects that won't work on Linux from the solution. Give it a try. You might have to extend the list of projects to be removed.

Best regards,
Johannes
Reply all
Reply to author
Forward
0 new messages