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

windows support #69

Open
talebi1 opened this issue Dec 8, 2022 · 21 comments
Open

windows support #69

talebi1 opened this issue Dec 8, 2022 · 21 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@talebi1
Copy link

talebi1 commented Dec 8, 2022

Hi, Do you have plan to support windows?

@mxrch
Copy link

mxrch commented Dec 10, 2022

image

@nullmastermind
Copy link

I spent a night trying to compile to Windows lol

@retsyo
Copy link

retsyo commented Dec 12, 2022

I tried to compile in MSYS2+Mingw64 on windows 10 64bits, but failed. And the files take so many disk space, I have to delete them now.

I am look forwards to a pre-compiled windows building too.

@nullmastermind
Copy link

Windows users are so "codon."

"codon" means lonely in Vietnamese (cô đơn)

@inumanag
Copy link
Contributor

Right now, you can use WLS to run Codon.

We plan to support Windows in the future. There are only a few POSIXy things that need to be ported over. However, none of the developers use or have access to Windows machines, so we cannot provide an ETA at the moment.

@inumanag inumanag added enhancement New feature or request help wanted Extra attention is needed labels Dec 18, 2022
@liudonghua123
Copy link

Is there any updates about this.

@ghuls ghuls mentioned this issue Jan 5, 2023
@ghost
Copy link

ghost commented Feb 11, 2023

Cant i just use codon to generate LLVM IR then throw it in an LLVM backend to transform it into a native windows exe?

@TashaSkyUp
Copy link

Same question as @PunchCakee.

@Code4SAFrankie
Copy link

You can get a free windows like this: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

For the developers that don't have windows.

@exaloop exaloop deleted a comment from Tosh0kan Mar 23, 2023
@oSethoum
Copy link

Right now, you can use WLS to run Codon.

We plan to support Windows in the future. There are only a few POSIXy things that need to be ported over. However, none of the developers use or have access to Windows machines, so we cannot provide an ETA at the moment.

are we in the future yet 👀?

@WingDust
Copy link

have anyone use zig to compile this

@inumanag
Copy link
Contributor

@PunchCakee probably not--- you will need to compile libcodonrt as well for it to work.

@oSethoum et al.:
We currently do not have anybody with Windows development experience on our team and thus cannot prioritize the native Windows version anytime soon (probably by the end of '23 at least). However:

  1. You can use and test Codon on WSL (which is probably good enough for testing and playing with it), and
  2. We will gladly accept patches and PRs that will bring the Windows support and CI testing from people who are familiar with Windows development.

@mushroomfire
Copy link

Any progress now?

@GhDamghani
Copy link

Cant i just use codon to generate LLVM IR then throw it in an LLVM backend to transform it into a native windows exe?

Nope. I tried.

    ninja: build stopped: subcommand failed.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:54 (project)


-- Configuring incomplete, errors occurred!

@ghost
Copy link

ghost commented May 18, 2023

What needs to be ported? I could try adding windows support since i think its really beneficial if i want to make consumer desktop software because the majority of market share goes to window (for home operating systems).

@inumanag
Copy link
Contributor

inumanag commented Jun 9, 2023

This is finally happening: use #403 to track the progress.

@retsyo
Copy link

retsyo commented Sep 3, 2023

short story

where can I download ml.exe for windows 64bits?

long one

there is no sys\mman.h for MSYS2+Mingw64, so I download https://github.com/mcgarrah/mman-win32 according to https://msys2-users.narkive.com/xA2wbH0c/does-msys2-support-mmap-mman

then after

makedir d
cd d
cmake -G "MSYS Makefiles" ..
make 

I get

[  2%] Built target bz2
[  4%] Built target backtrace
[  4%] Built target fmt
[  5%] Built target peg2cpp
[  5%] Built target codon_jupyter
[ 11%] Built target re2
[ 22%] Built target zlibstatic
[ 42%] Built target liblzma
[ 50%] Built target gc
[ 50%] Built target libomp-needed-headers
[ 50%] Built target libomp-needed-windows-files
[ 50%] Building ASM_MASM object _deps/openmp-build/runtime/src/CMakeFiles/omp.dir/z_Windows_
NT-586_asm.asm.obj
/bin/sh: line 1: ml: command not found
make[2]: *** [_deps/openmp-build/runtime/src/CMakeFiles/omp.dir/build.make:495: _deps/openmp-build/runtime/src/CMakeFiles/omp.dir/z_Windows_NT-586_asm.asm.obj] Error 127
make[1]: *** [CMakeFiles/Makefile2:2005: _deps/openmp-build/runtime/src/CMakeFiles/omp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

@Xanderplayz16
Copy link

You can get a free windows like this: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

For the developers that don't have windows.

psst... massgrave.dev

@jschwar313
Copy link

jschwar313 commented Mar 24, 2024

I'm a former developer. I might be able to test stuff. I have a Windows 10 64 bit machine and I could make another drive a Windows 11 machine. I won't be able to do 8 hours a day, but maybe a couple of hours if I have time. I also have built a python application that has been running for quite some time.

@sohdahh
Copy link

sohdahh commented Mar 26, 2024

You can get a free windows like this: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/
For the developers that don't have windows.

psst... massgrave.dev

massgrave is so goated

@TaiXeflar
Copy link

Hey guys
I tested for serval env to compile codon project, with all are failed:

git clone https://github.com/exaloop/llvm-project.git --depth=1
git clone https://github.com/exaloop/codon.git --depth=1 --branch=windows

The LLVM has been built successfully, so the codon build will passing the -DCMAKE_PREFIX_PATH="C:/exaloop/llvm/install_dir".

  • Windows 11, VS2022, MSVC v143
CMAKE_C_COMPILER=cl.exe
CMAKE_CXX_COMPILER=cl.exe
CMAKE_ASM_COMPILER=ml64.exe
CMAKE_GENERATOR=ninja.exe

It will finally stoped at the kmp.h include file which VS2022 (and newer) MSVC compiler not support compile both C/CXX and ASM together.

  • Windows 11, VS2022, Clang/LLVM
CMAKE_C_COMPILER=clang-cl.exe
CMAKE_CXX_COMPILER=clang-cl.exe
CMAKE_ASM_COMPILER=lld-link.exe
CMAKE_GENERATOR=ninja.exe

Compilation returns multi lld-link.exe error.

  • Windows 11, Intel oneAPI(intel 64 + VS2022), Intel C/C++
CMAKE_C_COMPILER=icx.exe
CMAKE_CXX_COMPILER=icx.exe
CMAKE_ASM_COMPILER=ml64.exe
CMAKE_GENERATOR=ninja.exe

somewhat failed too, put a reason here later.......

  • Windows 11, Git for Windows(MinGW64), GCC 14
CMAKE_C_COMPILER=gcc.exe
CMAKE_CXX_COMPILER=g++.exe
CMAKE_GENERATOR=ninja.exe

The compilation stop at a asm file that can't do something like this:

  SE7EN@Zephyrus MINGW64 ~/Desktop/cobuild
  $ cmake --build .
  [1/201] Building ASM_MASM object _deps/openmp-build/runtime/src/CMakeFiles/omp.dir/z_Windows_NT-586_asm.asm.obj
  FAILED: _deps/openmp-build/runtime/src/CMakeFiles/omp.dir/z_Windows_NT-586_asm.asm.obj
  ml -Domp_EXPORTS -IC:/Users/SE7EN/Desktop/codon/. -IC:/Users/SE7EN/Desktop/cobuild/_deps/openmp-build/runtime/src -IC:/Users/SE7EN/Desktop/cobuild/_deps/openmp-src/runtime/src -IC:/Users/SE7EN/Desktop/cobuild/_deps/openmp-src/runtime/src/i18n -IC:/Users/SE7EN/Desktop/cobuild/_deps/openmp-src/runtime/src/include -IC:/Users/SE7EN/Desktop/cobuild/_deps/openmp-src/runtime/src/thirdparty/ittnotify -D _CRT_SECURE_NO_ninja: fatal: GetOverlappedResult: The handle is invalid.
  
  WARNINGS -D _CRT_SECURE_NO_DEPRECATE -D _WINDOWS -D _WINNT -D _WIN32_WINNT=0x0501 -D _USRDLL  -D_M_AMD64 -DOMPT_SUPPORT=0 -DOMPD_SUPPORT=0 -c -Fo _deps/openmp-build/runtime/src/CMakeFiles/omp.dir/z_Windows_NT-586_asm.asm.obj C:/Users/SE7EN/Desktop/cobuild/_deps/openmp-src/runtime/src/z_Windows_NT-586_asm.asm
  CreateProcess failed: The system cannot find the file specified.
  • Ubuntu 22.04 LTS, GCC Mingw64 Cross Compiling (I have 2 machine for one is real Linux not WSL)
CMAKE_C_COMPILER=x86_64-w64-mingw32-gcc 
CMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++
CMAKE_ASM_COMPILER=x86_64-w64-mingw32-as

Error happens on checking on unsinged short/int/long:

-- Check size of unsigned short
CMake Error at /usr/share/cmake-3.22/Modules/CheckTypeSize.cmake:139 (try_compile):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    '/home/txmascot/desktop/codon/build2/CMakeFiles/CheckTypeSize/CMAKE_SIZEOF_UNSIGNED_SHORT.bin'

  Unable to find the executable at any of:

    /home/txmascot/desktop/codon/build2/CMakeFiles/CMakeTmp/cmTC_9c73d
    /home/txmascot/desktop/codon/build2/CMakeFiles/CMakeTmp/Debug/cmTC_9c73d
    /home/txmascot/desktop/codon/build2/CMakeFiles/CMakeTmp/Development/cmTC_9c73d

Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/CheckTypeSize.cmake:270 (__check_type_size_impl)
  /usr/share/cmake-3.22/Modules/TestBigEndian.cmake:55 (CHECK_TYPE_SIZE)
  /usr/share/cmake-3.22/Modules/TestBigEndian.cmake:37 (__TEST_BIG_ENDIAN_LEGACY_IMPL)
  build2/_deps/xz-src/cmake/tuklib_integer.cmake:21 (test_big_endian)
  build2/_deps/xz-src/CMakeLists.txt:129 (tuklib_integer)

Having new testing results will update comments here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests