clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
borkdude 2019-12-27T00:12:01.017400Z

I guess this can function as a Graal POC. Let me know what you think.

littleli 2019-12-27T00:39:32.017500Z

I think I'm almost there 🙂 https://github.com/littleli/scoop-clojure/pull/14

seancorfield 2019-12-27T00:44:58.018400Z

@borkdude Wow, very nice. Does exactly what it says on the tin, for Windows cmd!

seancorfield 2019-12-27T00:45:26.018900Z

The set CLOJURE_TEST_CP=... thing doesn't seem to work in Powershell, but works fine in cmd.

borkdude 2019-12-27T00:46:03.019400Z

yeah, I only tested this from cmd.exe

littleli 2019-12-27T00:47:09.019600Z

I'm going to merge it. I cannot test this though. I'm far away from my windows box.

borkdude 2019-12-27T00:49:00.020Z

it's CLOJURE_TOOLS_CP btw, not TEST

seancorfield 2019-12-27T00:49:59.020600Z

Yeah, my typo. I got it right in Windows. Just typed it wrong here because I was thinking about "testing" stuff 🙂

borkdude 2019-12-27T00:50:18.021Z

thought so 🙂 I'm afk now, got way too late

littleli 2019-12-27T00:52:16.021100Z

hopefully scoop install deps.clj`` I'm afraid little bit about the .

seancorfield 2019-12-27T00:52:25.021300Z

It works. Just tested it.

littleli 2019-12-27T00:52:44.021500Z

Very well, thanks Sean

seancorfield 2019-12-27T04:53:03.024300Z

@borkdude I installed it on another Windows machine and when I try to run deps I get an error that MSVCR100.dll is missing -- and so far none of the things I've tried to fix that from the web have worked. If anyone here has some more suggestions, I'm all ears. (it's the Microsoft Visual C++ Redistributable DLL in case folks don't know -- but installing various versions from Microsoft's sites hasn't fixed this error) Success! I found a new page that had direct downloads of that DLL and after putting it in Windows\system32, deps worked just fine!

littleli 2019-12-27T10:57:02.026900Z

I should probably put Microsoft Visual C++ 2010 x64 Redistributable to scoop recommendations. I believe it could be installed with scoop as well.

borkdude 2019-12-27T11:08:51.027100Z

Good idea

borkdude 2019-12-27T11:09:32.027300Z

I'm now adding functionality to download the clojure tools jar when it isn't found yet. So then there's no need to download any zip files yourself.

borkdude 2019-12-27T11:19:41.027600Z

Released! https://github.com/borkdude/deps.clj/releases/tag/v0.0.3

borkdude 2019-12-27T11:33:48.027800Z

Added the scoop to the README now

littleli 2019-12-27T12:28:18.029300Z

I'll add issue to scoop-clojure repository, it should eventually happen

borkdude 2019-12-27T12:29:22.029500Z

Cool. I made a note in the README as well.

borkdude 2019-12-27T12:32:08.029700Z

Done: https://github.com/borkdude/deps.clj#windows

littleli 2019-12-27T12:41:46.030Z

https://github.com/littleli/scoop-clojure/issues/17 I'll take a look later

👍 1
littleli 2019-12-27T14:27:49.031300Z

I added suggest section to scoop manifest for clj-kondo and deps.clj I would like to kindly ask for confirmation that I didn't break anything. @seancorfield

seancorfield 2019-12-27T16:49:51.035900Z

It'll be tonight at the earliest before I can test that. Well try to remember after work.

borkdude 2019-12-27T16:50:45.036200Z

I'll also try in a virtual machine

borkdude 2019-12-27T08:19:59.025800Z

@seancorfield might be good to document what your problem was and what the solution was: Windows version, dll version and source

borkdude 2019-12-27T09:02:19.026800Z

Here I read: > It turns out that msvcr100.dll from VS C++ Redistributable 2010 must be present or the application will fail to start. Maybe installing VS C++ Redistributable 2010 would have helped @seancorfield? Might be good to try

borkdude 2019-12-27T12:25:04.028500Z

The message is reproducable when I uninstall the C++ redistributable. Then when I install https://www.microsoft.com/en-us/download/details.aspx?id=14632 again, it works. I'll add that to the README.

littleli 2019-12-27T12:48:01.030500Z

Perfect, thanks for the confirmation :)

littleli 2019-12-27T12:48:34.030700Z

Just to make sure, this applies to all the binaries created with native-image right?

borkdude 2019-12-27T13:13:15.031100Z

Think so yes

2019-12-27T16:38:41.033400Z

wasn't there an oracle/graal issue along these lines? may be if it doesn't have this info already it would be worth adding.

2019-12-27T16:40:14.034Z

here is something that seems related: https://github.com/oracle/graal/issues/1762

2019-12-27T16:41:22.034700Z

here is another: https://github.com/oracle/graal/issues/1407

borkdude 2019-12-27T17:10:52.036700Z

@ales.najmann I installed deps.clj 0.0.3 using your scoop:

Installing 'deps.clj' (0.0.3) [64bit]
deps.clj-0.0.3-windows-amd64.zip (2.6 MB) [===================================================================] 100%
Checking hash of deps.clj-0.0.3-windows-amd64.zip ... ok.
Extracting deps.clj-0.0.3-windows-amd64.zip ... done.
Linking ~\scoop\apps\deps.clj\current => ~\scoop\apps\deps.clj\0.0.3
Creating shim for 'deps'.
'deps.clj' (0.0.3) was installed successfully!
'deps.clj' suggests installing 'extras/vcredist2010'.
'itcode"' is not recognized as an internal or external command,
operable program or batch file.

borkdude 2019-12-27T17:11:18.037100Z

After this, calling deps works fine:

C:\Users\borkdude>deps -Sdescribe
{:deps-clj-version "0.0.3"
 :version "1.10.1.492"
 :config-files ["C:\\Users\\borkdude\\.clojure\\deps.edn"]
 :config-user "C:\\Users\\borkdude\\.clojure\\deps.edn"
 :config-project "deps.edn"
 :install-dir nil
 :cache-dir "C:\\Users\\borkdude\\.clojure\\.cpcache"
 :force ""
 :repro ""
 :resolve-aliases ""
 :classpath-aliases ""
 :jvm-aliases ""
 :main-aliases ""
 :all-aliases ""}

C:\Users\borkdude>

borkdude 2019-12-27T17:11:51.037400Z

Not sure what this means: > 'itcode"' is not recognized as an internal or external command, operable program or batch file.

borkdude 2019-12-27T17:12:30.037900Z

Installing clj-kondo also worked, with the same suggestion and without the itcode message.

littleli 2019-12-27T17:17:22.038Z

you're using cmd.exe right?

littleli 2019-12-27T17:18:06.038200Z

I don't know what above issue means. But there is similar report here https://github.com/lukesampson/scoop/issues/1935

borkdude 2019-12-27T17:18:38.038500Z

yeah

borkdude 2019-12-27T17:19:41.038700Z

I now uninstalled it and installed it again, now I don't get the message.

borkdude 2019-12-27T17:19:45.038900Z

So you can probably ignore this.

borkdude 2019-12-27T17:35:27.039100Z

👍 2
littleli 2019-12-27T17:53:18.039500Z

I put an issue with "won't fix" label to my project and I'll take a look later, if there is a way to improve installation from cmd.exe

borkdude 2019-12-27T17:54:07.039700Z

note that the installation worked, in spite of this message

littleli 2019-12-27T18:04:27.039900Z

Sure. I won't burn time on it 🙂