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 #34

Open
1 of 2 tasks
EduardoRFS opened this issue Mar 20, 2021 · 15 comments
Open
1 of 2 tasks

Windows Support #34

EduardoRFS opened this issue Mar 20, 2021 · 15 comments
Labels
help wanted Extra attention is needed

Comments

@EduardoRFS
Copy link
Collaborator

EduardoRFS commented Mar 20, 2021

We should be able to build the following on Windows:

@EduardoRFS
Copy link
Collaborator Author

As the symbolic link that we're currently using on gh-feed-reader doesn't work on Windows, it's still not fully functional, you can build but not link the artifacts with webpack

@anmonteiro anmonteiro added the help wanted Extra attention is needed label Apr 5, 2021
@XantreDev
Copy link

Are this still an issue? I can't find anything about gh-feed-reader in this repo

@jchavarri
Copy link
Member

I think it's still an issue, see recent PR #577.

@anmonteiro
Copy link
Member

@XantreGodlike if you'd like to help us getting Windows support, I'd love to get your help.

I don't currently have access to a Windows machine, but would be more than happy to review patches.

@XantreDev
Copy link

Ok, I will investigate

@XantreDev
Copy link

Opam for windows was freezed since 2022, so latest version of Dune accessable with opam is 3.5. I tried to install it from github, but build fails with this configuration, menhir or ounit aren't compiling.
I think for proper windows support opam 2.2 should be released, because for now all variants of use opam on Windows awful

@anmonteiro anmonteiro mentioned this issue Jun 28, 2023
2 tasks
@hhugo
Copy link
Contributor

hhugo commented Jun 28, 2023

Fyi, js_of_ocaml's CI works on windows including Ocaml5, latest dune, ..
Feel free to get inspiration from there if that helps

@XantreDev
Copy link

I will take a look

@anmonteiro
Copy link
Member

@XantreGodlike I hear OPAM 2.2 also has better Windows support, could you confirm? I believe an alpha has been tagged already.

@XantreDev
Copy link

Hi. You it should, but they is not provided windows executables, I've tried to build opam from source on Windows, but it was failing

@XantreDev
Copy link

I've tried to build opam template project with [email protected], but it failed. Do you have any ideas what can happen wrong?

√ script to run » init

> init
> opam switch create . 5.1.1 -y --deps-only && npm run install-opam-npm


<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><>  🐫
Switch invariant: ["ocaml-base-compiler" {= "5.1.1"} | "ocaml-system" {= "5.1.1"}]
The following actions will be performed:
=== install 38 packages
  ∗ arch-x86_64               1        [required by ocaml-base-compiler]
  ∗ base-bigarray             base
  ∗ base-domains              base
  ∗ base-nnp                  base
  ∗ base-threads              base     [required by dune]
  ∗ base-unix                 base     [required by dune]
  ∗ cmdliner                  1.2.0    [required by melange]
  ∗ conf-mingw-w64-gcc-x86_64 1        [required by mingw-w64-shims]
  ∗ cppo                      1.6.9    [required by melange]
  ∗ dune                      3.15.2   [required by melange-opam-template]
  ∗ dune-build-info           3.15.2   [required by melange, reason]
  ∗ fix                       20230505 [required by reason]
  ∗ flexdll                   0.43     [required by ocaml-base-compiler]
  ∗ host-arch-x86_64          1
  ∗ host-system-mingw         1
  ∗ melange                   3.0.0-51 [required by melange-opam-template]
  ∗ menhir                    20231231 [required by melange, reason]
  ∗ menhirCST                 20231231 [required by menhir]
  ∗ menhirLib                 20231231 [required by menhir]
  ∗ menhirSdk                 20231231 [required by menhir]
  ∗ merlin-extend             0.6.1    [required by reason]
  ∗ mingw-w64-shims           0.1.0    [required by ocaml-base-compiler]
  ∗ ocaml                     5.1.1    [required by melange-opam-template]
  ∗ ocaml-base-compiler       5.1.1
  ∗ ocaml-compiler-libs       v0.12.4  [required by ppxlib]
  ∗ ocaml-config              3        [required by ocaml]
  ∗ ocaml-mingw64-env         1        [required by system-mingw]
  ∗ ocaml-options-vanilla     1
  ∗ ocamlfind                 1.9.5    [required by reason]
  ∗ pp                        1.2.0    [required by melange]
  ∗ ppx_derivers              1.2.1    [required by reason]
  ∗ ppxlib                    0.32.1   [required by melange, reason]
  ∗ reason                    3.11.0   [required by melange-opam-template]
  ∗ reason-react              0.14.0   [required by melange-opam-template]
  ∗ reason-react-ppx          0.14.0   [required by melange-opam-template]
  ∗ sexplib0                  v0.17.0  [required by ppxlib]
  ∗ stdlib-shims              0.3.0    [required by ppxlib]
  ∗ system-mingw              1        [required by ocaml-base-compiler]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
∗ installed arch-x86_64.1
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
⬇ retrieved cmdliner.1.2.0  (cached)
⬇ retrieved cppo.1.6.9  (cached)
⬇ retrieved fix.20230505  (cached)
∗ installed host-arch-x86_64.1
∗ installed host-system-mingw.1
⬇ retrieved flexdll.0.43  (cached)
∗ installed flexdll.0.43
∗ installed conf-mingw-w64-gcc-x86_64.1
⬇ retrieved menhir.20231231, menhirCST.20231231, menhirLib.20231231, menhirSdk.20231231  (cached)
⬇ retrieved dune.3.15.2, dune-build-info.3.15.2  (cached)
⬇ retrieved melange.3.0.0-51  (cached)
⬇ retrieved merlin-extend.0.6.1  (cached)
⬇ retrieved mingw-w64-shims.0.1.0  (cached)
∗ installed ocaml-mingw64-env.1
∗ installed ocaml-options-vanilla.1
⬇ retrieved ocaml-compiler-libs.v0.12.4  (cached)
⬇ retrieved ocamlfind.1.9.5  (cached)
⬇ retrieved ocaml-base-compiler.5.1.1  (cached)
⬇ retrieved pp.1.2.0  (cached)
⬇ retrieved ppx_derivers.1.2.1  (cached)
∗ installed mingw-w64-shims.0.1.0
⬇ retrieved ppxlib.0.32.1  (cached)
⬇ retrieved reason.3.11.0  (cached)
⬇ retrieved reason-react.0.14.0, reason-react-ppx.0.14.0  (cached)
∗ installed system-mingw.1
⬇ retrieved sexplib0.v0.17.0  (cached)
⬇ retrieved stdlib-shims.0.3.0  (cached)
∗ installed ocaml-base-compiler.5.1.1
∗ installed ocaml-config.3
∗ installed ocaml.5.1.1
∗ installed base-domains.base
∗ installed base-nnp.base
∗ installed cmdliner.1.2.0
[WARNING] .install file is missing .exe extension for src/findlib/ocamlfind
[WARNING] .install file is missing .exe extension for src/findlib/ocamlfind_opt
[WARNING] Automatically adding .exe to C:\Users\Xantre\Projects\melange-opam-template\_opam\.opam-switch\build\ocamlfind.1.9.5\src\findlib\ocamlfind.exe
[WARNING] Automatically adding .exe to C:\Users\Xantre\Projects\melange-opam-template\_opam\.opam-switch\build\ocamlfind.1.9.5\src\findlib\ocamlfind_opt.exe
[WARNING] C:\Users\Xantre\Projects\melange-opam-template\_opam\bin\safe_camlp4 is a script; the command won't be available
∗ installed ocamlfind.1.9.5
∗ installed dune.3.15.2
∗ installed cppo.1.6.9
∗ installed menhirCST.20231231
∗ installed pp.1.2.0
∗ installed stdlib-shims.0.3.0
∗ installed ppx_derivers.1.2.1
∗ installed menhirSdk.20231231
∗ installed fix.20230505
∗ installed menhirLib.20231231
∗ installed dune-build-info.3.15.2
∗ installed merlin-extend.0.6.1
∗ installed ocaml-compiler-libs.v0.12.4
∗ installed sexplib0.v0.17.0
∗ installed ppxlib.0.32.1
∗ installed menhir.20231231
∗ installed reason.3.11.0
∗ installed reason-react-ppx.0.14.0
[ERROR] The compilation of melange.3.0.0-51 failed at "dune build -p melange -j 15 @install".

#=== ERROR while compiling melange.3.0.0-51 ===================================#
# context     2.2.0~beta2 | win32/x86_64 | ocaml-base-compiler.5.1.1 | git+https://github.com/dra27/opam-repository.git#windows-initial
# path        ~\Projects\melange-opam-template\_opam\.opam-switch\build\melange.3.0.0-51
# command     ~\Projects\melange-opam-template\_opam\bin\dune.exe build -p melange -j 15 @install
# exit-code   1
# env-file    ~\AppData\Local\opam\log\melange-24272-dd4a1d.env
# output-file ~\AppData\Local\opam\log\melange-24272-dd4a1d.out
### output ###
# [...]
# File "jscomp/core/dune", line 101, characters 0-158:
# 101 | (rule
# 102 |  (targets js_record_map.ml)
# 103 |  (deps j.mli)
# 104 |  (action
# 105 |   (with-stdout-to
# 106 |    %{targets}
# 107 |    (run ./gen/gen_traversal.exe --input %{deps} --mode record-map))))
# (cd _build/default/jscomp/core && gen/gen_traversal.exe --input j.mli --mode record-map) > _build/default/jscomp/core/js_record_map.ml
# main: internal error, uncaught exception:
#       Failure("output_value: not a binary channel")
#



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
┌─ The following actions failed
│ λ build melange 3.0.0-51
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install arch-x86_64               1
│ ∗ install base-bigarray             base
│ ∗ install base-domains              base
│ ∗ install base-nnp                  base
│ ∗ install base-threads              base
│ ∗ install base-unix                 base
│ ∗ install cmdliner                  1.2.0
│ ∗ install conf-mingw-w64-gcc-x86_64 1
│ ∗ install cppo                      1.6.9
│ ∗ install dune                      3.15.2
│ ∗ install dune-build-info           3.15.2
│ ∗ install fix                       20230505
│ ∗ install flexdll                   0.43
│ ∗ install host-arch-x86_64          1
│ ∗ install host-system-mingw         1
│ ∗ install menhir                    20231231
│ ∗ install menhirCST                 20231231
│ ∗ install menhirLib                 20231231
│ ∗ install menhirSdk                 20231231
│ ∗ install merlin-extend             0.6.1
│ ∗ install mingw-w64-shims           0.1.0
│ ∗ install ocaml                     5.1.1
│ ∗ install ocaml-base-compiler       5.1.1
│ ∗ install ocaml-compiler-libs       v0.12.4
│ ∗ install ocaml-config              3
│ ∗ install ocaml-mingw64-env         1
│ ∗ install ocaml-options-vanilla     1
│ ∗ install ocamlfind                 1.9.5
│ ∗ install pp                        1.2.0
│ ∗ install ppx_derivers              1.2.1
│ ∗ install ppxlib                    0.32.1
│ ∗ install reason                    3.11.0
│ ∗ install reason-react-ppx          0.14.0
│ ∗ install sexplib0                  v0.17.0
│ ∗ install stdlib-shims              0.3.0
│ ∗ install system-mingw              1
└─
# Run for /f "tokens=*" %i in ('opam env') do @%i to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [y/n] y

@anmonteiro
Copy link
Member

you may want to try the main branch after #1113 was merged.

@XantreDev
Copy link

I will try to. Thanks

@XantreDev
Copy link

I've encouraged this error. Is it opam specific?

[ERROR] The compilation of opam-core.2.2.0~beta2 failed at "./configure --disable-checks --prefix C:\\Users\\Xantre\\Projects\\melange-opam-template\\_opam".
∗ installed time_now.v0.16.0
∗ installed fiber.3.7.0
∗ installed dune-rpc.3.15.2
∗ installed ppx_inline_test.v0.16.1
∗ installed ocaml-lsp-server.1.17.0
∗ installed ppx_expect.v0.16.0
∗ installed melange.dev
∗ installed reason-react.0.14.0

#=== ERROR while compiling opam-core.2.2.0~beta2 ==============================#
# context     2.2.0~beta2 | win32/x86_64 | ocaml-base-compiler.5.1.1 | git+https://github.com/dra27/opam-repository.git#windows-initial
# path        ~\Projects\melange-opam-template\_opam\.opam-switch\build\opam-core.2.2.0~beta2
# command     ~\Projects\melange-opam-template\_opam\.opam-switch\build\opam-core.2.2.0~beta2\./configure --disable-checks --prefix C:\Users\Xantre\Projects\melange-opam-template\_opam
# exit-code   1
# env-file    ~\AppData\Local\opam\log\opam-core-86424-be72dc.env
# output-file ~\AppData\Local\opam\log\opam-core-86424-be72dc.out
### output ###
# [...]
# checking for string.h... yes
# checking for inttypes.h... yes
# checking for stdint.h... yes
# checking for strings.h... yes
# checking for sys/stat.h... yes
# checking for sys/types.h... yes
# checking for unistd.h... yes
# checking for acl/libacl.h... no
# checking for library containing acl_get_perm... no
# checking for x86_64-w64-mingw32-i686-w64-mingw32-gcc... no
# checking for i686-w64-mingw32-gcc... no
# configure: error: i686 C compiler not found - opam-putenv cannot be built



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
┌─ The following actions failed
│ λ build opam-core 2.2.0~beta2
└─
┌─ The following changes have been performed (the rest was aborted)

I have c compiler just no that one, but idk one that it needs

❯ which gcc
╭───┬─────────┬──────────────────────────────────────────────────────┬──────────╮
│ # │ command │                         path                         │   type   │
├───┼─────────┼──────────────────────────────────────────────────────┼──────────┤
│ 0 │ gcc     │ C:\Users\Xantre\scoop\apps\mingw\current\bin\gcc.exe │ external │
╰───┴─────────┴──────────────────────────────────────────────────────┴──────────╯
❯ scoop list mingw
Installed apps matching 'mingw':

Name  Version            Source Updated             Info
----  -------            ------ -------             ----
mingw 13.2.0-rt_v11-rev1 main   2024-05-16 23:26:30
❯ which i686-w64-mingw32-gcc
╭────────────╮
│ empty list │
╰────────────╯
❯ which x86_64-w64-mingw32-i686-w64-mingw32-gcc
╭────────────╮
│ empty list │
╰────────────╯

@anmonteiro
Copy link
Member

seems like Opam failed to build for some reason. I'm not sure

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

No branches or pull requests

5 participants