codon
codon copied to clipboard
windows support
Hi, Do you have plan to support windows?
I spent a night trying to compile to Windows lol
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.
Windows users are so "codon."
"codon" means lonely in Vietnamese (cô đơn)
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.
Is there any updates about this.
Cant i just use codon to generate LLVM IR then throw it in an LLVM backend to transform it into a native windows exe?
Same question as @PunchCakee.
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.
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 👀?
have anyone use zig to compile this
@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:
- You can use and test Codon on WSL (which is probably good enough for testing and playing with it), and
- We will gladly accept patches and PRs that will bring the Windows support and CI testing from people who are familiar with Windows development.
Any progress now?
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!
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).
This is finally happening: use #403 to track the progress.
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
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
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.
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
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.