How to build ClojureCLR from source?

90 views
Skip to first unread message

Aleksandar Simic

unread,
May 24, 2019, 10:08:33 AM5/24/19
to clojure-clr
Hello,

my main question:

How to build ClojureCLR on macOS ?


But what prompted me to write here:

I wanted to build ClojureCLR from source, but when I clicked on the link in the README:

https://github.com/clojure/clojure-clr/wiki/Getting-source

it just links to a new page in the wiki.

The went to check the other links and these:

Getting Started (general): http://dev.clojure.org/display/doc/Getting+Started

seem to be irrelevant/forbidden.

Really, this could have all been an issue on GitHub, but it looks like this feature is disabled
for the repo.

Thanks
Alex

Aleksandar Simic

unread,
May 24, 2019, 10:12:18 AM5/24/19
to clojure-clr
On Fri, May 24, 2019 at 2:08 PM Aleksandar Simic <asi...@gmail.com> wrote:

How to build ClojureCLR on macOS ?

To answer my own question, I did find the info:


I remember seeing but couldn't dig it up starting from the README.

Aleksandar Simic

unread,
May 24, 2019, 3:59:57 PM5/24/19
to clojure-clr


On Friday, May 24, 2019 at 2:12:18 PM UTC, Aleksandar Simic wrote:

On Fri, May 24, 2019 at 2:08 PM Aleksandar Simic <asi...@gmail.com> wrote:

How to build ClojureCLR on macOS ?

To answer my own question, I did find the info:


The saga continues:

I tried to build the master branch and the tag clojure-1.9.0.
Both have failed.
I've captured the commands that I've used and the output.

Can you please have a look and let me know what do I need to do to
have a working build?

For ClojureCLR 1.9.0 with mono on macOS:

The same tag 1.9.0 checked out, but built with msbuild instead of xbuild:

Now the build of master as of today, the commands used and the failure:

Thanks
Alex


Aleksandar Simic

unread,
May 26, 2019, 7:24:15 AM5/26/19
to clojure-clr
I fixed the build of master on macOS 10.14.5 with mono.
Or better, I got it to build.

There were multiple issues.

One was fixed here by Microsoft employee Alexander Köplinger:


Another issue, as already noted here:


was the linking of the assemblies by ILMerge.

I resolved this by using ILRepack from here: https://github.com/gluck/il-repack

Since I'm not a "native" to the world of CLR, is ILRepack an OK option to go with?
Or should the now open sourced version of ILMerge be used: https://github.com/dotnet/ILMerge

I just replaced the name of 'ilmerge' with the full path to the newly built 'ILRepack.exe'.


And the final issue was the following error:

Could not find rule set file "MinimumRecommendedRules.ruleset"

which is explained here:

Which seems to be some sort of incompatibility between Visual Studio 2013 and 2015, that needs to be changed in

Clojure.Compile/Clojure.Compile.csproj
Clojure.Main/Clojure.Main.csproj
Clojure.Source/Clojure.Source.csproj
Clojure.Tests/Clojure.Tests.csproj
Simple.Console/Simple.Console.csproj

by just commenting out:

<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>


I've signed the Clojure contributor agreement, would you be open to having this as a pull request?

Thanks
Reply all
Reply to author
Forward
0 new messages