Open certik opened 2 months ago
With the tricks in #36 I was able to compile LFortran in our shell almost completely, it failed at the very end:
C:\Users\ondrejcertik\repos\lfortran\src\libasr\asr_utils.h(5282,96): warning C
4244: [ [C:\Users\ondrejcertik\repos\lfortran\src\bin\lfortran.vcxproj]
C:\Users\ondrejcertik\repos\lfortran\src\libasr\asr_utils.h(5282,96): warning C
4244: T=float [C:\Users\ondrejcertik\repos\lfortran\src\bin\lfortra
n.vcxproj]
C:\Users\ondrejcertik\repos\lfortran\src\libasr\asr_utils.h(5282,96): warning C
4244: ] [C:\Users\ondrejcertik\repos\lfortran\src\bin\lfortran.vcxproj]
LINK : fatal error LNK1104: cannot open file 'C:\Program Files (x86)\Microsoft
Visual Studio\2019\Enterprise\DIA SDK\lib\amd64\diaguids.lib' [C:\Users\ondrejc
ertik\repos\lfortran\src\bin\lfortran.vcxproj]
Got the same error on another machine:
LINK : fatal error LNK1104: cannot open file 'C:\Program Files (x86)\Microsoft Visua
l Studio\2019\Enterprise\DIA SDK\lib\amd64\diaguids.lib' [C:\Users\ondrejcertik\repo
s\lfortran\src\bin\lfortran.vcxproj]
Based on https://stackoverflow.com/questions/78085548/building-with-llvm-using-cmake-llvm-clang-vs-path-is-wrong it might be due to LLVM being built with an older MSVC.
I found the library in:
~$ ls -l 'C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\lib\amd64\diaguids.lib'
-rwxrwxrwx 1 somebody somegroup 1983854 Sep 10 13:29 'C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\lib\amd64\diaguids.lib'
I went to src/bin/lfortran.vcxproj
and modified that one path to diaguids.lib
(for Release) to the correct one and it built. The same error happened for other executables, but lfortran.exe
was built correctly.
I would like to use
shell
to replace https://github.com/lfortran/lfortran/blob/79e7444ca0e58adbaa06db5e839b91d5e9eb915f/ci/build.xsh.To do that, we need:
BUILD_TYPE = "Release"
$lfortran_version=$(cat version).strip()
(loads a file into a variable)