Building LDC on windows, woe is me!

claptrap clap at trap.com
Tue Nov 14 21:47:25 UTC 2023


On Saturday, 21 October 2023 at 08:16:42 UTC, Imperatorn wrote:
> On Monday, 21 August 2023 at 08:55:02 UTC, claptrap wrote:
>> On Monday, 21 August 2023 at 08:15:16 UTC, kinke wrote:
>>> [...]
>>
>> Thanks, I managed to get it all to work, I had to build llvm 
>> from scratch as you suggest.
>>
>> There were a few other things tripping me up but I got there 
>> in the end. I just deleted everything and ran though the 
>> instructions more carefully. With what I learned from the 
>> first try it all went smoothly.
>>
>> Making sure everything was "run as administrator" was probably 
>> the main issue. Like for some reason if I forgot to run the 
>> shell as administrator, CMAKE would run, but it would error 
>> out on odd things. Like it would detect the compilers, but not 
>> the compiler ABI.
>
> You might be the only individual in the universe who have made 
> it.
>
> Can you post some build scrips and setup for how you got 
> everything to work?

I followed the instructions to the letter, same folder names, one 
step at a time, from here...

https://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC

I had to ensure the command prompts were always run as 
administrator. It gave odd error messages if I forgot to do that.

I did it on a fresh install of windows 10, with a fresh install 
of VS2017, I literally tried to replicate everything listed in 
the instructions.

IIRC The only thing I had to do extra was passing 
"-DD_COMPILER=c:\path\to\ldmd2.exe." to ninja, it's listed in the 
section "Building LDC" but doesn't really tell you why you might 
need it.

I'm not 100% sure that's all there was to it but if you can't get 
it to work I can always have a run at it again and keep notes of 
exactly how I got it to work.




More information about the digitalmars-d-ldc mailing list