Mono Folder was not found

Trying to get a sln with echoes project building on an debian linux machine I get:

$ ebuild "--configuration:Debug" --verbosity:extreme  PortableInterop.sln 
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2019. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2405 (develop) built on talax, 20190517-145551. Commit 1449131.
E: Mono Folder was not found.'

Same with if I run with mono ebuild
Both mono and ebuild are on the path.
Tried setting a few different environment variable, but nothing changed.
Mono is installed with apt-get, looks like mono is at /usr/lib/mono/…
Tried “–setting:FrameworkFolder=/usr/lib/mono/4.5” and variants, but same deal.
Trying to work out what I should I be passing?

This looks like a problem with how we detect the Mono install location in Linux. is this a regular Mono install or something special/manual? what folder is mono in? (run “which mono” or “whereis mono” in terminal to find out)

thanx!

nevermind the last part. i’ll, have a look at the code and will see what might be going on here, in a short while.

Its an old debian instance, installed with apt-get install mono-complete
$ whereis mono
mono: /usr/bin/mono /usr/lib/mono /etc/mono /usr/share/mono /usr/share/man/man1/mono.1.gz

1 Like

This needs a proper fix from me Monday, but as a workaround, try passing --setting:InternalMonoBaseFolder=/usr/lib/mono, where the path you pass is the pat that contains /bin,. /lib. etc subfolders.

More specifically, you’ll want ./lib/mono/<versions subfolders? to exist underneath the path you pass…

Thanks for the help.
Tried the setting with a bunch of different paths, now every time it says
“E: No access to the given key”
Would the target framework in the project be relevant here? Tried changing it to 4.5 but no diff.
Based on the error I tried running sudo ebuild ... , the errors changed to

E: Reference 'mscorlib' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'System' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'System.Data' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'System.Xml' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'System.Core' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'System.Xml.Linq' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'System.Data.DataSetExtensions' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'Swift' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
E: Reference 'Echoes' could not be resolved for target 'Echoes' (Echoes .NET anycpu).

For any path I tried.
Maybe my mono install is borked? Or not whats expected, anyway. I did try an apt-get install again.

Under /usr/lib/mono is

2.0-api  3.5-api  4.0  4.0-api  4.5  4.5-api  aot-cache  gac  mono-configuration-crypto  monodoc  xbuild  xbuild-frameworks

under /usr/lib/mono/4.5 is:

Accessibility.dll                       Mono.Debugger.Soft.dll                       System.IO.Compression.FileSystem.dll
al.exe                                  Mono.Http.dll                                System.Json.dll
browsercaps-updater.exe                 monolinker.exe                               System.Json.Microsoft.dll
caspol.exe                              Mono.Management.dll                          System.Management.dll
etc etc

under 4.5-api is:

Accessibility.dll                       mscorlib.dll                               System.Reactive.Providers.dll
Commons.Xml.Relaxng.dll                 Novell.Directory.Ldap.dll                  System.Reactive.Runtime.Remoting.dll
cscompmgd.dll                           PEAPI.dll                                  System.Reactive.Windows.Forms.dll
CustomMarshalers.dll                    RabbitMQ.Client.dll                        System.Reactive.Windows.Threading.dll
etc etc

That seems like a different/unrelated error. can you run with --debug and see if you get a more detailed error output?

ok, that means the above errors seems a rights issue (we still gotta fix that, you should not need sudo, of course). and the followup means that the path you’re passing is somehow wrong. try running with --debug-reference-resolving.

(side note: I’ll be out off office the rest of the day until tomorrow, so I won’t be able to response further until tomorrow afternoon or Monday; my apologies).

So, if I run variants of $ ebuild --debug --debug-reference-resolving --setting:InternalMonoBaseFolder=/usr/lib/mono project.elements
I get debug output like this:

D:                   Looking for reference 'mscorlib'
D:                   | Checking /home/build/elements/2405/References/Echoes/mscorlib.dll, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/Echoes/mscorlib.dll, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/NET/mscorlib.dll, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/mscorlib.exe, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/Echoes/mscorlib.exe, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/NET/mscorlib.exe, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/mscorlib.winmd, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/Echoes/mscorlib.winmd, ❌
D:                   | Checking /home/build/elements/2405/References/Echoes/NET/mscorlib.winmd, ❌
D:                   | Checking /home/build/elements/2405/References/Gotham/mscorlib.gx, ❌
D:                   | Checking /home/build/elements/2405/References/Gotham/Echoes/mscorlib.gx, ❌
D:                   | Checking /home/build/elements/2405/References/Cirrus/mscorlib.dll, ❌
D:                   | Checking /home/build/elements/2405/References/Cirrus/Echoes/mscorlib.dll, ❌
E:                   Reference 'mscorlib' could not be resolved for target 'Echoes' (Echoes .NET anycpu).

Eg, the InternalMonoBaseFolder doesn’t appear in the list of places checked (no matter what I specify). /home/build/elements/2405 is where EBuild etc is installed.
So I symlink’d my references into References/Echoes/mscorlib.dll to /usr/lib/mono/4.5/mscorlib.dll etc and the build ran and passed
Obviously not ideal, but hopefully will get me out of trouble

Hmm. curious. so just to be sure, /usr/lib/mono/lib/mono/4.5/mscorlib.dll & co did exist, but they aren’t found there, only when you symlink them into the root folder as /usr/lib/mono/mscorlib.dll?

That does not line up with what I see the code doing, but I’ll do some more review/testing…

What is your TargetFramework set to, in the project?

Neverkind, found the problem. Investigating a proper fix now (well, two parts, (a) it should just find Mono on it’s own, but (b) if you specify InternalMonoBaseFolder, it should find the files in there, properly :wink:

cool, thanks

  • They exist at /usr/lib/mono/4.5/mscorlib.dll etc (slightly different to what you wrote)
  • I symlinked them in the References/Echoes folder, as thats where the debug logs says ebuild was looking, It was never looking anywhere in /usr/lib/mono/**
  • Target is 4.0. I did try switching it to 4.5 at one point but it had no effect. That was before all the stuff you gave me to try, though.

Cheers

Think it’s all fixed. I’d like to send you a new build in about an hour, I’ll put it on your Personal Downloads page.

Jon,

new build is up.

I tried it, but am pretty confused, as I got exactly the same behaviour as previously - 'Mono folder not found’when running without switches, then not searching in whatever I specify for --setting:InternalMonoBaseFolder=/usr/lib/mono
It’s reporting the right version (2408), so I’m not sure what’s going on

Hmm, it looks like that build might not actually have had my fix merged in; checking…

Indeed that’s what happened, by push for the merge did not go thru and I missed that. my sincerest apologies. A new build is running now and I’ll upload it for you when dine, in about one hour.

yours,
marc

RemObjects Elements - Full Zip Distro - develop-20190528-132226 - 3313fac - 10.0.0.2408 is u now for you, which should have my fixes. My sincerest apologies for the mixup yesterday.

Hi Marc, got back to this, with the new build I am getting the new error message:
-> Task RemObjects.EBuild.Elements.ElementsPrepareEchoesPlatform started for InteropUtil.Net, Echoes.
E: Could not determine path to the standard Mono reference libraries.’
<- Task RemObjects.EBuild.Elements.ElementsPrepareEchoesPlatform failed for InteropUtil.Net, Echoes, took 0.0309s (0.0324s).

Whether or not I pass --setting:InternalMonoBaseFolder (for --setting:InternalMonoBaseFolder=/usr/lib/mono, --setting:InternalMonoBaseFolder=/usr/lib/mono/4.5 m --setting:InternalMonoBaseFolder=/usr/lib/mono/4.5-api etc)
What does it actually look for?