Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing lfortran/ci/build.xsh #61

Open
4 tasks
certik opened this issue Sep 7, 2024 · 2 comments
Open
4 tasks

Replacing lfortran/ci/build.xsh #61

certik opened this issue Sep 7, 2024 · 2 comments

Comments

@certik
Copy link
Collaborator

certik commented Sep 7, 2024

I would like to use shell to replace https://github.com/lfortran/lfortran/blob/79e7444ca0e58adbaa06db5e839b91d5e9eb915f/ci/build.xsh.

To do that, we need:

  • if statements
  • setting local script variables BUILD_TYPE = "Release"
  • $lfortran_version=$(cat version).strip() (loads a file into a variable)
  • Support "set -ex" #62 (the script must fail on any command failure)
@certik
Copy link
Collaborator Author

certik commented Sep 9, 2024

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]

@certik
Copy link
Collaborator Author

certik commented Sep 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant