idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.51k stars 374 forks source link

Possible build issue on Windows: no entry for fdopen #1763

Open ywata opened 3 years ago

ywata commented 3 years ago

I install idris2 from CI build with https://github.com/ywata/Idris2-windows. After I copy idris2 and chez I setup manual idris2.cmd by myself.

After the installation, I tried to use idris2 from Emacs (idris-mode) but failed. The failure is reproduced without emacs below:

  1. Run idris2 with ide-mode-socket below % idris2 --ide-mode-socket localhost:10000
    1. Setup tcp connection to the port % nc localhost 10000

This produces idris2 exits with the following message.

Exception in foreign-procedure: no entry for "fdopen"

The idris2.cmd setup below.

@echo off
set APPDIR=%~dp0
set PATH=%APPDIR%\idris2_app;%APPDIR%..\..\chez\bin\ta6nt;%PATH%
set IDRIS2_INC_SRC=%APPDIR%\idris2_app
set IDRIS2_PREFIX=%APPDIR%..\

"C:\Users\Username\idris22\chez\bin\ta6nt\scheme.exe" --program "%APPDIR%\idris2_app\idris2.so" %*
ywata commented 3 years ago

I noticed just running idris2 and :load6sum. some file does not work as expected because missing sha256sum. I understand this is an issue about packaging idris2 for MSYS2. I'll investigate about the packaging system. I'll try to create a. MSYS2 package so that idris2 works on Windows.

ywata commented 3 years ago

I checked this and found fdopen issue was already resolved by #1583 in generic way. The issue was msvcrt.dll (window's runtime) does not define fdopen(), instead _fdopen() is defined.

The purpose of this ticket is to use idris-mode on Emacs but it was not succeeded, even after #1583. As far as I tried, Idris2 on Windows