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

Base.v.16.0 doesn't build on windows #23889

Merged
merged 2 commits into from
Jun 16, 2023
Merged

Base.v.16.0 doesn't build on windows #23889

merged 2 commits into from
Jun 16, 2023

Conversation

hhugo
Copy link
Contributor

@hhugo hhugo commented Jun 6, 2023

Here is the corresponding GH issue on the base repo janestreet/base#150

@@ -15,7 +15,7 @@ depends: [
"dune" {>= "2.0.0"}
"dune-configurator"
]
available: arch != "arm32" & arch != "x86_32"
available: arch != "arm32" & arch != "x86_32" & os != "win32"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what to use here. There are a bunch of variant in the repo:

  • os-family != "windows"
  • os != "cygwin"
  • os != "windows"

Copy link
Member

@mseri mseri Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems correct, see e.g. for a windows-only package:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os-family = "windows" is often likely to be a mistake, os != "windows" is an actual mistake (see #23946)

@hhugo
Copy link
Contributor Author

hhugo commented Jun 6, 2023

cc @dra27

@mseri
Copy link
Member

mseri commented Jun 6, 2023

For reference

#=== ERROR while compiling base.v0.16.0 =======================================#
# context     2.0.10 | win32/x86_64 | ocaml-variants.4.14.1+mingw64c | git+https://github.com/ocaml/opam-repository.git
# path        D:/a/js_of_ocaml/js_of_ocaml/_opam/.opam-switch/build/base.v0.16.0
# command     D:\a\js_of_ocaml\js_of_ocaml\_opam\bin\dune.exe build -p base -j 2
# exit-code   1
# env-file    D:/.opam/log/base-1484-ccda7f.env
# output-file D:/.opam/log/base-1484-ccda7f.out
### output ###
# File "src/dune", line 10, characters 0-500:
# 10 | (library (name base) (public_name base)
# 11 |  (ocamlopt_flags :standard (:include ocamlopt-flags))
# 12 |  (libraries base_internalhash_types caml sexplib0 shadow_stdlib)
# 13 |  (c_flags :standard -D_LARGEFILE64_SOURCE (:include mpopcnt.sexp))
# 14 |  (c_names bytes_stubs exn_stubs int_math_stubs hash_stubs am_testing)
# 15 |  (preprocess no_preprocessing)
# 16 |  (lint
# 17 |   (pps ppx_base ppx_base_lint -check-doc-comments -type-conv-keep-w32=both
# 18 |    -apply=js_style,base_lint,type_conv,cold))
# 19 |  (js_of_ocaml (javascript_files runtime.js)))
# (cd _build/default && D:\a\js_of_ocaml\js_of_ocaml\_opam\bin\ocamlopt.opt.exe -w -40 -g -shared -linkall -I src -o src/base.cmxs src/base.cmxa)
# /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: D:\cygwin\tmp\build_8402e2_dune\dyndll413622.o::(.data+0x3378): undefined reference to `caml_csel_value'
# /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: D:\cygwin\tmp\build_8402e2_dune\dyndllc7ad59.o::(.data+0x2e60): undefined reference to `caml_csel_value'
# /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: D:\cygwin\tmp\build_8402e2_dune\dyndll933c30.o::(.data+0xe60): undefined reference to `caml_csel_value'
# /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: D:\cygwin\tmp\build_8402e2_dune\dyndlle4b807.o::(.data+0xc0): undefined reference to `caml_csel_value'
# /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: D:\cygwin\tmp\build_8402e2_dune\dyndll6c0139.o::(.data+0x1b90): undefined reference to `caml_csel_value'
# /usr/lib/gcc/x86_64-w64-mingw32/11/../../../../x86_64-w64-mingw32/bin/ld: D:\cygwin\tmp\build_8402e2_dune\dyndll5105e7.o::(.data+0x1b50): more undefined references to `caml_csel_value' follow
# collect2: error: ld returned 1 exit status
# ** Fatal error: Error during linking
# 
# File "caml_startup", line 1:
# Error: Error during linking (exit code 2)

@mseri
Copy link
Member

mseri commented Jun 6, 2023

I'll wait for @dra27 before doing anything

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slowness - LGTM!

@mseri mseri merged commit 091373a into ocaml:master Jun 16, 2023
@hhugo hhugo deleted the base-win branch June 17, 2023 19:20
@avsm avsm mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants