Giter VIP home page Giter VIP logo

opam-cross-windows's People

Contributors

chimrod avatar dmbaturin avatar hcarty avatar mfp avatar pirbo avatar qnighy avatar shindere avatar smorimoto avatar toots avatar ttamttam avatar vmatthijs avatar wardbrian avatar whitequark avatar wintersteiger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opam-cross-windows's Issues

Sys.win32 = false in cross-compiled executables

Found this when testing the Lwt (cross-)port (it kills all programs linked against lwt.unix, since it uses Sys.win32 during initialization):

$ cat ostype.ml 
open Printf

let () =
  printf "os_type: %S\n" Sys.os_type;
  printf "win32: %b\n" Sys.win32;
  printf "unix: %b\n" Sys.unix;
  printf "cygwin: %b\n" Sys.cygwin;
  printf "word_size: %d\n" Sys.word_size;
  printf "big_endian: %b\n" Sys.big_endian

$ ocamlfind -toolchain windows ocamlopt -o ostype.exe ostype.ml
... later, on windows...    
$ ./ostype.exe 
os_type: "Win32"
win32: false
unix: true
cygwin: false
word_size: 32
big_endian: false

This is seemingly impossible since the same OCAML_OS_TYPE value is used in sys.c to return the os_type value and perform the win32() check (which is just strcmp(OCAML_OS_TYPE, "Win32") ).

Name of default toolchain?

Stupid question, but sometimes while building packages, I need to use tools from one toolchain to override tools from other toolchains. ocamlfind -toolchain windows ocamldep works just fine, but during the build of a package I need ocamlfind -toolchain DEFAULT ocamldep to override explicit -toolchain commands and/or the OCAMLFIND_TOOLCHAIN environment variable.

Stuff like sh -c unset OCAMLFIND_TOOLCHAIN; which ocamldep kind of works sometimes, but there has to be a better way.

pkg.ml (topkg) packages

Hello,

I'm in trouble when I need "topkg" packages at build time (ie native version of the package).

By instance, let's consider fpath: trying opam install fpath is not working:

#=== ERROR while compiling fpath.0.7.2 ========================================#
# context     2.0.4 | linux/x86_64 | ocaml-base-compiler.4.07.0 | https://opam.ocaml.org/#24059019
# path        ~/.opam/windows/.opam-switch/build/fpath.0.7.2
# command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --dev-pkg false
# exit-code   1
# env-file    ~/.opam/log/fpath-7538-d2c37b.env
# output-file ~/.opam/log/fpath-7538-d2c37b.out
### output ###
# pkg.ml: [ERROR] key --dev-pkg: Unknown key.



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build fpath 0.7.2
└─ 
╶─ No changes have been performed

This is quite easy to turn around (see below), but I'm not sure what a more long-term solution would be? Should I add an fpath package to opam-cross-windows repository?

opam source fpath
cd fpath.0.7.2
sed -ie 's/"--dev-pkg" "%{pinned}%"//' opam
opam pin add . -k path -y

Best regards

Help Understanding Crosscompiling via Make

Hello. I'm new both to OCaml and opam cross-compiler for Windows, so I was hoping you could help me out (bare patient with me, I'm trying to pose the problem the best I can, but I'm a bit out of my depth on this).

I've succeeded to install opam-cross-windows, as per instructions, on Ubuntu 16-10 x64 — but only the 64 bit version, the 32 bit failed to compile on two different machine, reporting problems with GCC. But 64 bits would be fine.

So, my setup seems ok, up and running (I didn't take the MXE Env route, though).

The problem is that I'm trying to build an existing project, which uses a makefile, and the instruction page of opam-cross-windows only mentions porting project from OASIS or OPAM .install.

The compilation examples in the instructions always refer to using ocamlfind -toolchain windows, but the project I'm trying to cross compile only refers to ocamlopt as compiler commands. So I haven't managed to work out how to cross compile it. The proejct doesn't have external dependencies.

Here is how the makefile sets up the variables then uses to invoke the compiler:

MLDEP       = ocamldep -native
MLC         = ocamlopt
MLCOPTS     = -inline 23 -unsafe
MLLDOPTS    = unix.cmxa
MLLEX       = ocamllex
MLYACC      = ocamlyacc

(the full makefile source:)

Which way should that be changed to cross compile and create a Windows executable?

I haven't worked out the part of the instructions that says:

Don't forget to add ocaml-windows as a dependency!

I've tried googling this, but haven't managed to find examples.

Any help would be much apreciated. Thanks.

dangling symbolic links

There are symbolic links in ~/.opam/packages/ocaml-windows64/ocaml-windows64.4.02.3/files that point to ../../ocaml-windows32.4.02.3/files. However, ocaml-windows32 need not be installed on an amd64 host/windows64 target, which is the default selected by opam install ocaml-windows (as recommended in the README.md).

Because of these dangling symbolic links, opam update stops working with the following error message:

% opam update

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[windows] git://github.com/whitequark/opam-cross-windows already up-to-date
[default] /home/kaustuv/hacking/opam-repository synchronized
Fatal error:
Sys_error("/home/kaustuv/.opam/packages/ocaml-windows64/ocaml-windows64.4.02.3/files/windows.conf.in: No such file or directory")

In case it is relevant:

$ opam --version
1.2.2
$ ocamlc -vnum
4.02.3
$ uname -a
Linux wash3 3.16-2-amd64 #1 SMP Debian 3.16.3-2 (2014-09-20) x86_64 GNU/Linux

Can not resolve symbols for libcamlrun.a(floats_b.o)

When I try to install ocaml-windows which wants to install ocaml-windows32 on my Ubuntu 16.04, I got all the time this error:

#=== ERROR while compiling ocaml-windows32.4.08.0 =============================#
# context     2.0.3 | linux/x86_64 |  | git://github.com/ocaml-cross/opam-cross-windows
# path        ~/.opam/4.08.0+32bit/.opam-switch/build/ocaml-windows32.4.08.0
# command     ~/.opam/4.08.0+32bit/.opam-switch/build/ocaml-windows32.4.08.0/./build.sh i686-w64-mingw32
# exit-code   2
# env-file    ~/.opam/log/ocaml-windows32-9959-a4abd5.env
# output-file ~/.opam/log/ocaml-windows32-9959-a4abd5.out
### output ###
# (echo '#define CAML_INTERNALS'; \
# [...]
#  sed -e 's/.*/	"&",/' primitives; \
#  echo '	 0 };') > prims.c
# i686-w64-mingw32-gcc -c -O2 -mms-bitfields -fno-strict-aliasing -Wall -fno-tree-vrp -g -DCAML_NAME_SPACE -DUNICODE -D_UNICODE -DWINDOWS_UNICODE=1 -DOCAML_STDLIB_DIR='L"/home/dinosaure/.opam/4.08.0+32bit/windows-sysroot/lib/ocaml"' -I/home/dinosaure/.opam/4.08.0+32bit/lib/flexdll-windows -o prims.o prims.c
# /home/dinosaure/.opam/4.08.0+32bit/lib/flexdll-windows/flexlink -chain mingw -stack 16777216 -link -static-libgcc -exe -link "-municode" -o ocamlrun.exe prims.o libcamlrun.a -lws2_32 -lversion 
# ** Cannot resolve symbols for libcamlrun.a(floats_b.o):
#  __configthreadlocale
# Makefile:279: recipe for target 'ocamlrun.exe' failed
# make[1]: *** [ocamlrun.exe] Error 2
# make[1]: Leaving directory '/home/dinosaure/.opam/4.08.0+32bit/.opam-switch/build/ocaml-windows32.4.08.0/runtime'
# Makefile:323: recipe for target 'coldstart' failed
# make: *** [coldstart] Error 2



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-windows32 4.08.0
└─ 
╶─ No changes have been performed

I don't know how to go further then. May be I missing something? I followed the README.md, note that I tried with 4.08.0+32bit and 4.08.0.

ocaml-migrate-parsetree-windows >= v1.0.10

It would be great to have a windows package for ocaml-migrate-parsetree >= v1.0.10. Is anybody working on this ? If not I will try to take a look.
(We need it for ocamlformat)

error compiling dune-windows (OCaml 5.1.1)

Hello,

I just heard about this project in the announcement of Ocaml-windows 5.1.1, and I'd like to try it on a dune-based project.

Using OCaml 5.1.1, I managed to add the repository, install ocaml-windows, and some packages such as ppxlib-windows, but dune-windows 3.2.0 is failing (** Cannot resolve symbols for /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libws2_32.a(lib64_libws2_32_a-WspiapiLegacyGetNameInfo.o/...).

Before going further, I'd like to check if this is somehow expected, and how should I proceed in debugging this. The announcement message, "Fortunately, adding new dune-based packages has become remarkably easy thanks to dune’s great cross-compilation support" led me to think that dune was working "out of the box", but given there are only 3 versions of it in dune-windows, it seems I misunderstood it. Perhaps I do not need dune-windows at all?

uutf-windows

ocamlfind -toolchain windows ocamldep -package bytes -package uchar -modules src/uutf.ml > src/uutf.ml.depends

  • ocamlfind -toolchain windows ocamldep -package bytes -package uchar -modules src/uutf.ml > src/uutf.ml.depends
    ocamlfind: Package `uchar' not found
    Command exited with code 2.
    pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-toolchain' 'windows'
    '-j' '4' '-tag' 'debug' '-build-dir' '_build' 'opam' 'pkg/META'
    'CHANGES.md' 'LICENSE.md' 'README.md' 'src/uutf.a' 'src/uutf.cmxs'
    'src/uutf.cmxa' 'src/uutf.cma' 'src/uutf.cmx' 'src/uutf.cmi'
    'src/uutf.mli']: exited with 10

mtime-windows fails to build with latest ocamlbuild

If I use the suggested ocamlbuild pin (ocamlbuild's latest master) the mtime-windows build fails for me. Same failure pinning to 0.10.0. However if I pin to https://github.com/ocaml/ocamlbuild.git#90902a0617cee5c95c41e63d012475ce03b04689 explicitly then the build works fine. Seems to be some issue with cmxs creation and the C stubs.

That commit is the one adding -toolchain support to ocamlbuild.

Output from a failed compilation:

$ opam install mtime-windows
The following actions will be performed:
  ∗  install mtime-windows 0.8.3

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ERROR] The compilation of mtime-windows failed at "env OCAMLFIND_TOOLCHAIN=windows ocaml pkg/build.ml native=true native-dynlink=true jsoo=false".
Processing  1/1: [mtime-windows: ocamlfind windows]
#=== ERROR while installing mtime-windows.0.8.3 ===============================#
# opam-version 1.2.2
# os           darwin
# command      env OCAMLFIND_TOOLCHAIN=windows ocaml pkg/build.ml native=true native-dynlink=true jsoo=false
# path         /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3
# compiler     4.04.0
# exit-code    10
# env-file     /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3/mtime-windows-84977-ad8886.env
# stdout-file  /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3/mtime-windows-84977-ad8886.out
# stderr-file  /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/mtime-windows.0.8.3/mtime-windows-84977-ad8886.err
### stdout ###
# [...]
# ocamlfind ocamlopt -c -g -bin-annot -safe-string -I src-os -o src-os/mtime.cmx src-os/mtime.ml
# ocamlfind ocamlopt -a -cclib -lmtime_stubs src-os/mtime_base.cmx src-os/mtime.cmx -o src-os/mtime.cmxa
# ocamlfind ocamlc -c -g -bin-annot -safe-string -I src-os -o src-os/mtime.cmo src-os/mtime.ml
# ocamlfind ocamlc -a -dllib -lmtime_stubs src-os/mtime_base.cmo src-os/mtime.cmo -o src-os/mtime.cma
# ocamlfind ocamlopt -shared -linkall src-os/libmtime_stubs.a src-os/mtime.cmxa -o src-os/mtime.cmxs
# + ocamlfind ocamlopt -shared -linkall src-os/libmtime_stubs.a src-os/mtime.cmxa -o src-os/mtime.cmxs
# ** Fatal error: Cannot find file "libmtime_stubs"
# File "caml_startup", line 1:
# Error: Error during linking
# Command exited with code 2.



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions failed
  ∗  install mtime-windows 0.8.3
No changes have been performed

OCaml-windows 4.12.0 no longer builds

I have a rarely-run github action which stopped building recently.

The error is

   # x86_64-w64-mingw32-gcc -c -O2 -mms-bitfields -fno-strict-aliasing -Wall -fno-tree-vrp -g  -DCAML_NAME_SPACE -DUNICODE -D_UNICODE -DWINDOWS_UNICODE=1 -DOCAML_STDLIB_DIR='L"/home/runner/work/stanc3/stanc3/_opam/windows-sysroot/lib/ocaml"' -I/home/runner/work/stanc3/stanc3/_opam/lib/flexdll-windows -DCAMLDLLIMPORT=  \
  #   -o prims.o prims.c
  # /home/runner/work/stanc3/stanc3/_opam/lib/flexdll-windows/flexlink -chain mingw64 -stack 16777216 -link -static-libgcc -exe -link "-municode" -o ocamlrun.exe prims.o libcamlrun.a -lws2_32 -lversion 
  # /bin/sh: 1: /home/runner/work/stanc3/stanc3/_opam/lib/flexdll-windows/flexlink: not found
  # make[1]: *** [Makefile:265: ocamlrun.exe] Error 127
  # make[1]: Leaving directory '/home/runner/work/stanc3/stanc3/_opam/.opam-switch/build/ocaml-windows64.4.12.0/runtime'
  # make: *** [Makefile:141: coldstart] Error 2

opam-cross-windows for OCaml 4.02.3?

Is cross-windows also available for OCaml 4.02.3?

Can I just switch to it using opam switch 4.02.3+32bit? or is this project tied to the 4.04.0 version?

I'm asking because I'm trying to compile an old OCaml project which is known to fail with OCaml 4.04.0, but compiles fine with 4.02.3.

Is this the first release of this project? will it be maintained throughout future versions of OCaml?

camlgpc-windows

camlgpc-windows is no longer building. See error below. --Mark

% opam install camlgpc-windows
The following actions will be performed:
  - install camlgpc-windows 1.0

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[camlgpc-windows.1.0] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>

#=== ERROR while compiling camlgpc-windows.1.0 ================================#
These patches didn't apply at /Users/mhayden/.opam/windows.dev2/.opam-switch/build/camlgpc-windows.1.0:
  - patches/install-cmx.patch: "/usr/bin/patch -p1 -i /Users/mhayden/.opam/log/processed-patch-81152-6d07ae" exited with code 1
  - patches/cross-compilation.patch: "/usr/bin/patch -p1 -i /Users/mhayden/.opam/log/processed-patch-81152-d8a4ae" exited with code 1



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build camlgpc-windows 1.0
+- 
- No changes have been performed
# Run eval `opam env` to update the current shell environment

Graphics

I tried using this variant with graphics, I endend up having this error message :

┌─<luc@Bouquinbourg in ~/repos/perso/AtomasOCaML>
└─<git@AtomasOCaML:master>──» ocamlfind -toolchain windows ocamlopt -linkpkg -package graphics -package unix atomas.ml -o atomas
File "atomas.ml", line 1:
Error: Files /home/luc/.opam/4.11.1+32bit/windows-sysroot/lib/graphics/graphics.cmxa
       and /home/luc/.opam/4.11.1+32bit/windows-sysroot/lib/ocaml/stdlib.cmxa
       make inconsistent assumptions over implementation Stdlib__sys

Is there a way to fix this ?

camlimages-windows hosted on MacOSX can't find freetype headers

camlimages-windows fails with the error below. It looks like it is not picking up freetype2 headers in /usr/local/include/freetype2 (installed via homebrew).

--Mark

The following actions will be performed:
  - install camlimages-windows 4.2.1
Do you want to continue ? [Y/n] 
y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[camlimages-windows.4.2.1] https://bitbucket.org/camlspotter/camlimages/get/4.2.1.tar.gz downloaded

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of camlimages-windows failed at "ocamlfind -toolchain
        windows ocamlc -I /freetype2 src/ftintf.c".
Processing  1/1: [camlimages-windows: ocamlfind windows]
#=== ERROR while installing camlimages-windows.4.2.1 ==========================#
# opam-version 1.2.2
# os           darwin
# command      ocamlfind -toolchain windows ocamlc -I /freetype2 src/ftintf.c
# path         /Users/mhayden/.opam/4.02.3/build/camlimages-windows.4.2.1
# compiler     4.02.3
# exit-code    2
# env-file     /Users/mhayden/.opam/4.02.3/build/camlimages-windows.4.2.1/camlimages-windows-22733-d0f245.env
# stdout-file  /Users/mhayden/.opam/4.02.3/build/camlimages-windows.4.2.1/camlimages-windows-22733-d0f245.out
# stderr-file  /Users/mhayden/.opam/4.02.3/build/camlimages-windows.4.2.1/camlimages-windows-22733-d0f245.err
### stderr ###
# src/ftintf.c:24:22: fatal error: ft2build.h: No such file or directory
#  #include <ft2build.h>
#                       ^
# compilation terminated.



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
  - install camlimages-windows 4.2.1
No changes have been performed

=-=- camlimages-windows.4.2.1 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing.
   `opam depext camlimages-windows.4.2.1' may help you find the correct
   installation for your system.

Building fails due to fno-common being the default in recent versions of gcc

Running opam install ocaml-windows64 results in this error:

/usr/lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld: libcamlrun.a(backtrace_b.o):~/.opam/windows/.opam-switch/build/ocaml-windows64.4.08.0/runtime/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlrun.a(backtrace_byt_b.o):/home/fabian/.opam/windows/.opam-switch/build/ocaml-windows64.4.08.0/runtime/backtrace_byt.c:47: first defined here

Which has already been fixed in OCaml >= 4.09.1.

Ocaml 5 support

Hello, apologies if an issue is not the right venue for this, but are there plans to update this project for OCaml 5? Is this limited by the incompatibility with MSVC in 5.0.0? The upcoming native opam release should boost windows adoption and I feel this is a compelling argument for having a good, up to date cross compiler :)

build failure for ocaml-windows with the 4.02.3+32bit compiler

When running opam install ocaml-windows on a linux x86_64 host using the 4.02.3+32bit switch, ocaml-windows64 gets built and it fails:

# /home/oandrieu/.opam/4.02.3+32bit/bin/ocamlrun boot/ocamlc -nostdlib -I boot -strict-sequence -w +33..39+48 -warn-error A -bin-annot -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel -c asmcomp/selection.ml
# Makefile.nt:723: recipe for target 'asmcomp/selection.cmo' failed
### stderr ###
# File "asmcomp/selection.ml", line 125, characters 49-59:
# Error: Integer literal exceeds the range of representable integers of type int

and indeed:

method is_immediate n = n <= 0x7FFFFFFF && n >= -0x80000000

doesn't seem to good with 31bits ints.

Shouldn't opam install ocaml-windows be installing ocaml-windows32 instead ?

`opam install ocaml-windows` fails with compilation error for `ocaml-windows64`

#=== ERROR while compiling ocaml-windows64.4.11.1 =============================#
# context     2.0.8 | linux/x86_64 |  | git://github.com/ocaml-cross/opam-cross-windows
# path        ~/_opam/.opam-switch/build/ocaml-windows64.4.11.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./build.sh x86_64-w64-mingw32
# exit-code   2
# env-file    ~/.opam/log/ocaml-windows64-68722-e0ba4f.env
# output-file ~/.opam/log/ocaml-windows64-68722-e0ba4f.out
### output ###
# [...]
# x86_64-w64-mingw32-gcc -c -O2 -mms-bitfields -fno-strict-aliasing -Wall -fno-tree-vrp -g -DCAML_NAME_SPACE -DUNICODE -D_UNICODE -DWINDOWS_UNICODE=1 -DOCAML_STDLIB_DIR='L"/home/xnoe/_opam/windows-sysroot/lib/ocaml"' -I/home/xnoe/_opam/lib/flexdll-windows -o stacks_b.o stacks.c
# In file included from caml/fail.h:26,
#                  from stacks.c:22:
# caml/misc.h:409:18: error: static declaration of ‘caml_snprintf’ follows non-static declaration
#   409 | #define snprintf caml_snprintf
#       |                  ^~~~~~~~~~~~~
# caml/misc.h:408:12: note: previous declaration of ‘caml_snprintf’ was here
#   408 | extern int caml_snprintf(char * buf, size_t size, const char * format, ...);
#       |            ^~~~~~~~~~~~~
# make[1]: *** [Makefile:333: stacks_b.o] Error 1
# make[1]: Leaving directory '/home/xnoe/_opam/.opam-switch/build/ocaml-windows64.4.11.1/runtime'
# make: *** [Makefile:151: coldstart] Error 2

ctypes-windows: ffi.h not found

After following your description to install ocaml-windows, I tried to install ctypes-windows using

# opam install ctypes-windows

I get the following error in the end.

# cd _build/src/ctypes-foreign-base && ocamlfind -toolchain windows ocamlc -c -package bytes   -ccopt -std=c99 -ccopt -Wall -ccopt -g -ccopt -I -ccopt /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes -ccopt -I -ccopt /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/tests -o ffi_call_stubs.o -principal -short-paths -g /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes-foreign-base/ffi_call_stubs.c
# Makefile.rules:111: recipe for target '_build/src/ctypes-foreign-base/ffi_call_stubs.o' failed
### stderr ###
# [...]
# Warning 52: Code should not depend on the actual values of
# this constructor's arguments. They are only for information
# and may change in future versions. (See manual section 8.5)
# /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes-foreign-base/dl_stubs.c: In function ‘ctypes_win32_dlopen’:
# /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes-foreign-base/dl_stubs.c:246:11: warning: ‘ec’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#        ret=get_tagged_error_msg(ec);
#            ^
# /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes-foreign-base/ffi_call_stubs.c:22:17: fatal error: ffi.h: No such file or directory
# compilation terminated.
# make: *** [_build/src/ctypes-foreign-base/ffi_call_stubs.o] Error 2

Running ocamlfind with -verbose shows the compiler call that causes the problem.

x86_64-w64-mingw32-gcc -O2 -mms-bitfields -fno-strict-aliasing -Wall -c -g -std=c99 -Wall -g -I /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes -I /home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/tests '-I/home/mark/.opam/4.04.0/windows-sysroot/lib/bytes' -I'/home/mark/.opam/4.04.0/windows-sysroot/lib/ocaml' '/home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes-foreign-base/ffi_call_stubs.c'
/home/mark/.opam/4.04.0/build/ctypes-windows.0.11.0/src/ctypes-foreign-base/ffi_call_stubs.c:22:17: fatal error: ffi.h: No such file or directory
compilation terminated.

ffi.h exists in /usr/include/x86_64-linux-gnu but that I suppose this is not what mingw is looking for. I am running Ubuntu 16.04. Which package do I need to install to have ffi for mingw?

Tag/branch for last 4.02.3 commit

I think a6fb59f is the last commit before the move to 4.04.0. Could you add a tag or branch for that commit? I can use specific commit hashes when necessary but a tag would be helpful as a quick reference point.

Thanks for the flurry of updates moving to 4.04.0!

Could we configure the cross compiler so that os_type = Win32 ?

ocamlfind -toolchain windows ocamlc -config
returns

[...]
os_type: Unix
[...]

which forbids me to update (easily) lwt to version 3.2.0 (and causes #27 if I'm not mistaken).

Actually, in order to configure the "unix" backend of lwt, jbuilder relies on the output of ocaml -config...

Take care of `"ocaml-windows"` vs `"ocamlfind" {build}` dependency

In the past I made an assumption that "ocaml-windows" implied "ocamlfind" {build}, but I've realized this is actually too strict, as rebuilding ocamlfind shouldn't rebuild the world. So, it looks like the more sensible thing is to add explicit "ocamlfind" {build} dependencies everywhere, including the ocaml-windows package itself.

@toots, can you please do it?

'Unsupported relocation kind 0003' when trying to build zmq-windows with a static MXE

I'm working on a zeromq package/installation for MXE. It works fine with opam-cross-windows when building against a dynamically linked MXE but not statically (MXE_TARGETS:=x86_64-w64-mingw32.static)

Do you have any suggestions on where to start looking? Based on ocaml/flexdll#29 hinting that SEH could be an issue I tried a fresh MXE build with gcc.mk patched to include --enable-sjlj-exceptions but I get the same error aside from a change in the problematic gcc symbol name from __gxx_personality_seh0 to __gxx_personality_sj0

The error when building zmq-windows with OCaml 4.04.0 from opam-cross-windows:

/home/hcarty/.opam/4.04.0/bin/ocamlfind ocamlmklib -o src/ZMQ_stubs -lzmq src/caml_zmq_stubs.o src/socket.o src/context.o src/fail.o src/poll.o
+ /home/hcarty/.opam/4.04.0/bin/ocamlfind ocamlmklib -o src/ZMQ_stubs -lzmq src/caml_zmq_stubs.o src/socket.o src/context.o src/fail.o src/poll.o
** Fatal error: Unsupported relocation kind 0003 for __gxx_personality_seh0 in /home/hcarty/mxe/usr/x86_64-w64-mingw32.static/lib/libzmq.a(src_libzmq_la-clock.o/

followed by the rest of the .o files in the libzmq.a archive.

64bit build fails

Looks like the ocaml-windows64.4.04.0/opam file specifies patches which don't exist:

$ TOOLPREF64=~/mxe64dynamic/usr/bin/x86_64-w64-mingw32.shared- opam install ocaml-windows
The following actions will be performed:
  ∗  install conf-gcc-windows64 1             [required by ocaml-windows64]
  ∗  install flexdll-windows    0.34          [required by ocaml-windows64]
  ∗  install ocaml-windows64    4.04.0        [required by ocaml-windows]
  ∗  install ocaml-windows      4.04.0
===== ∗  4 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[flexdll-windows.0.34] http://alain.frisch.fr/flexdll/flexdll-0.34.tar.gz downloaded
[ocaml-windows64.4.04.0] https://github.com/ocaml/ocaml/archive/4.04.0.tar.gz downloaded

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
∗  installed conf-gcc-windows64.1
∗  installed flexdll-windows.0.34
[ERROR] Patch file "/Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/ocaml-windows64.4.04.0/patches/ar-fix.patch" not found.
[ERROR] Patch file "/Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/ocaml-windows64.4.04.0/patches/ocamldoc.patch" not found.
[ERROR] Patch file "/Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/ocaml-windows64.4.04.0/patches/install_distrib.patch" not found.

#=== ERROR while installing ocaml-windows64.4.04.0 ============================#
These patches didn't apply at /Users/hcarty/.opam/4.04.0+win64bit-shared+flambda/build/ocaml-windows64.4.04.0:
  - patches/install_distrib.patch
  - patches/ocamldoc.patch
  - patches/ar-fix.patch



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions were aborted
  ∗  install ocaml-windows 4.04.0
The following actions failed
  ∗  install ocaml-windows64 4.04.0
The following changes have been performed
  ∗  install conf-gcc-windows64 1
  ∗  install flexdll-windows    0.34

The former state can be restored with:
    opam switch import "~/.opam/4.04.0+win64bit-shared+flambda/backup/state-20161105195439.export"

cmdliner seems broken

On my machine opam install cmdliner-windows -vvv does
[...]

[cmdliner-windows: ocaml] Command started
+ ocamlfind "-toolchain" "windows" "remove" "uutf" (CWD=/home/pirbo/.opam)
+ ocaml "pkg/git.ml" (CWD=/home/pirbo/.opam/4.02.3/build/cmdliner-windows.0.9.8)
- File "pkg/topkg-ext.ml", line 42, characters 12-25:
- Warning 3: deprecated: String.create
- Use Bytes.create instead.
[cmdliner-windows: env ocaml] Command started
+ env "OCAMLFIND_TOOLCHAIN=windows" "ocaml" "pkg/build.ml" "native=true" "native-dynlink=true" (CWD=/home/pirbo/.opam/4.02.3/build/cmdliner-windows.0.9.8)
- /home/pirbo/.opam/4.02.3/bin/ocamldep.opt -modules src/cmdliner.ml > src/cmdliner.ml.depends
- /home/pirbo/.opam/4.02.3/bin/ocamldep.opt -modules src/cmdliner.mli > src/cmdliner.mli.depends
- /home/pirbo/.opam/4.02.3/bin/ocamlc.opt -c -annot -bin-annot -I src -I test -o src/cmdliner.cmi src/cmdliner.mli
- /home/pirbo/.opam/4.02.3/bin/ocamlopt.opt -c -annot -bin-annot -I src -I test -o src/cmdliner.cmx src/cmdliner.ml
- /home/pirbo/.opam/4.02.3/bin/ocamlopt.opt -a src/cmdliner.cmx -o src/cmdliner.cmxa
- /home/pirbo/.opam/4.02.3/bin/ocamlc.opt -c -annot -bin-annot -I src -I test -o src/cmdliner.cmo src/cmdliner.ml
- /home/pirbo/.opam/4.02.3/bin/ocamlc.opt -a src/cmdliner.cmo -o src/cmdliner.cma
- /home/pirbo/.opam/4.02.3/bin/ocamlopt.opt -shared src/cmdliner.cmx -o src/cmdliner.cmxs
[cmdliner-windows: opam-installer cmdliner.install] Command started
+ opam-installer "--prefix=/home/pirbo/.opam/4.02.3/windows-sysroot" "cmdliner.install" (CWD=/home/pirbo/.opam/4.02.3/build/cmdliner-windows.0.9.8)
- Creating directory /home/pirbo/.opam/4.02.3/windows-sysroot/lib/cmdliner
- _build/pkg/META                  => /home/pirbo/.opam/4.02.3/windows-sysroot/lib/cmdliner/META

[...]

(Note the direct use of /home/pirbo/.opam/4.02.3/bin/ocaml* instead of using ocamlfind)
Therefore, the compilation of uutf (that I'm currently packaging) fails when cmdliner-windows is installed with

- + ocamlfind ocamlopt -linkpkg unix.cmxa -package cmdliner src/uutf.cmx test/utftrip.cmx -o test/utftrip.native
- File "_none_", line 1:
- Error: Files /home/pirbo/.opam/4.02.3/windows-sysroot/lib/cmdliner/cmdliner.cmxa
-        and /home/pirbo/.opam/4.02.3/windows-sysroot/lib/ocaml/stdlib.cmxa
-        make inconsistent assumptions over implementation Printexc
- Command exited with code 2.

Supporting ocaml 4.12

Hello! The main lsp-server used for giving type information in editors only works with ocaml 4.12, but we need to cross compile for windows so can't upgrade. It would be very nice if opam-cross-windows supported 4.12 as that would let us update everything

all executable that uses lwt crashes

I know, I'm the maintainer but I need help.

Take for example the program foo.ml:

let () = Lwt_main.run (Lwt_io.print "Hello\n")

opam install lwt-windows.2.6.0 and ocamlfind -toolchain windows opt -linkpkg -package lwt.unix -g -linkpkg -o foo foo.ml will work but

$ wine ./foo
Fatal error: exception Invalid_argument("Lwt_unix.on_signal: unavailable signal")

(It also crash on a real windows 7 and 10)

If you use the former version lwt-windows.2.5.2. it works. It get worse if you try to use lwt.2.7.0 or lwt.3.0.0 (available at https://github.com/pirbo/opam-cross-windows) where the result is now a segfault!

I have no idea how to tackle the issue...

flexdll.h not found error when running "ocaml install ocaml-windows"

Steps to reproduce (from fresh Manjaro install (also occured on Ubuntu)):

Install mingw64: sudo pacman -S mingw-w64-gcc
Install opam: sudo pacman -S opam (or the curl command on the ocaml website, tried both)
Initialize opam normally with the steps here: https://ocaml.org/docs/up-and-running
Then, follow the exact steps in the README.md in this repository.

opam install ocaml-windows fails with this error:

#=== ERROR while compiling ocaml-windows64.4.14.0 =============================#
# context     2.1.2 | linux/x86_64 | ocaml.4.14.0 | git+https://github.com/ocaml-cross/opam-cross-windows.git
# path        ~/.opam/default/.opam-switch/build/ocaml-windows64.4.14.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build /bin/sh ./build.sh x86_64-w64-mingw32
# exit-code   2
# env-file    ~/.opam/log/ocaml-windows64-26776-f3eddf.env
# output-file ~/.opam/log/ocaml-windows64-26776-f3eddf.out
### output ###
# [...]
# checking for flexdll.h... no
# configure: error: flexdll.h is required for native Win32
# make: Entering directory '/home/lonelyfloat/.opam/default/.opam-switch/build/ocaml-windows64.4.14.0/runtime'
# ../Makefile.config_if_required:27: ../Makefile.build_config: No such file or directory
# make: *** No rule to make target '../Makefile.build_config'.  Stop.
# make: Leaving directory '/home/lonelyfloat/.opam/default/.opam-switch/build/ocaml-windows64.4.14.0/runtime'
# make -C runtime sak
# make[1]: Entering directory '/home/lonelyfloat/.opam/default/.opam-switch/build/ocaml-windows64.4.14.0/runtime'
# ../Makefile.config_if_required:27: ../Makefile.build_config: No such file or directory
# make[1]: *** No rule to make target '../Makefile.build_config'.  Stop.
# make[1]: Leaving directory '/home/lonelyfloat/.opam/default/.opam-switch/build/ocaml-windows64.4.14.0/runtime'
# make: *** [Makefile:785: runtime/sak] Error 2

I did the exact same steps on Ubuntu and Manjaro (arch based) and got the same error.
Is there some external dependency that I'm missing?

Cross-compiler has `ocamlc -config-var os_type` = `"%%OCAML_OS_TYPE%%"`

I am trying to set up a toolchain with MXE (basically for GTK+3), and x86_64-w64-mingw32.static.

I can install the ocaml-windows64 fine, but then, when trying to compile my project with dune (dune build @install -x windows, some linking options are clearly wrong (-I /usr/include/...), and the compilation fails.

I am not sure if this is the cause, but I noticed that

$ ./_opam/bin/ocamlc -config-var os_type
Unix
$ ./_opam/windows-sysroot/bin/ocamlc -config-var os_type
%%OCAML_OS_TYPE%%
$ wine64 ./_opam/windows-sysroot/bin/ocamlc.exe -config-var os_type
%%OCAML_OS_TYPE%%

which causes dune to choose the wrong alternative when some files depend on os_type = Win32.

It seemed to be a bug in the ocaml-windows64 package, so I attempted to fix it (AltGr@99b9649).

However, with this fix OCaml no longer compiles, with

.../_opam/bin/ocamlrun ../boot/ocamlc -use-prims ../runtime/primitives -strict-sequence -absname -w +a-4-9-41-42-44-45-48 -g -warn-error A -bin-annot -nostdlib -safe-string -strict-formats   -o stdlib__pervasives.cmo -c pervasives.ml
File "..._opam/.opam-switch/build/ocaml-windows64.4.08.0/stdlib/pervasives.ml", line 19, characters 18-29:
19 | let invalid_arg = invalid_arg

which is quite a surprising outcome. I am guessing that something got broken in the compiler (the compilation line is the same, and there are lots of os_type = "Win32" checks in ocaml's code) ; but I can't figure why, and I thought I would first ask if the above was expected ?

Any help welcome!

ocamldoc

After installing the windows toolchain, the ocamldoc command for that toolchain is a Windows-binary at .../windows-sysroot/bin/ocamldoc.exe, which, when run via

ocamlfind -toolchain windows doc

throws

Fatal error: unknown C primitive `win_waitpid'

(On my WSL Ubuntu.) Since this is usually run on the host anyways, it's fine to use the host-compiled ocamldoc, but either way should really be fixed.

re-windows not building

I get the following error when building re-windows on 4.07.0.

The following dependencies couldn't be met:

  • re-windows -> seq-windows -> ocaml < 4.07.0
    base of this switch (use `--unlock-base' to force)

No solution found, exiting

ocamlfind: [WARNING] Undefined toolchain: windows

This might be related to #64 where I noticed that person also got the ocamlfind: [WARNING] Undefined toolchain: windows. Their issue eventually is resolved, but they don't exactly state what they did to fix it.

Here are some of the things I've tried:

$  opam switch
#  switch                      compiler                    description
→  ocaml-base-compiler.4.11.1  ocaml-base-compiler.4.11.1  ocaml-base-compiler.4.11.1
$  which ocamlfind
/home/nebu/.opam/ocaml-base-compiler.4.11.1/bin/ocamlfind
$ opam list
# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-threads        base
base-unix           base
bigarray-compat     1.0.0       Compatibility library to use Stdlib.Bigarray when possible
conf-gcc-windows    1
conf-gcc-windows32  1           Virtual package specifying the location of GCC cross-compiler for 32-bit Windows
conf-libffi         2.0.0       Virtual package relying on libffi system installation
conf-pkg-config     2           Check if pkg-config is installed and create an opam switch local pkgconfig folder
conf-sdl2           1           Virtual package relying on a SDL2 system installation
ctypes              0.19.1      Combinators for binding to C libraries without writing any C
ctypes-foreign      0.18.0      Virtual package for enabling the ctypes.foreign subpackage.
dune                2.9.0       Fast, portable, and opinionated build system
flexdll-windows     0.37        FlexDLL is a Windows dynamic linker extension allowing DLLs to depend on each other
integers            0.4.0       Various signed and unsigned integer types for OCaml
ocaml               4.11.1      The OCaml compiler (virtual package)
ocaml-base-compiler 4.11.1      Official release 4.11.1
ocaml-config        1           OCaml Switch Configuration
ocamlbuild          0.14.0      OCamlbuild is a build system with builtin rules to easily build most OCaml projects.
ocamlfind           1.9.1       A library manager for OCaml
topkg               1.0.3       The transitory OCaml software packager
tsdl                0.9.8       Thin bindings to SDL for OCaml
$ ocamlfind -toolchain windows ocamlc helloworld.ml -o helloworld.byte
ocamlfind: [WARNING] Undefined toolchain: windows
$ ocamlfind list
bigarray            (version: [distributed with Ocaml])
bigarray-compat     (version: 1.0.0)
bytes               (version: [distributed with OCaml 4.02 or above])
compiler-libs       (version: [distributed with Ocaml])
compiler-libs.bytecomp (version: [distributed with Ocaml])
compiler-libs.common (version: [distributed with Ocaml])
compiler-libs.optcomp (version: [distributed with Ocaml])
compiler-libs.toplevel (version: [distributed with Ocaml])
ctypes              (version: 0.19.1)
ctypes.foreign      (version: 0.19.1)
ctypes.stubs        (version: 0.19.1)
ctypes.top          (version: 0.19.1)
dune                (version: n/a)
dune.configurator   (version: 2.9.0)
dynlink             (version: [distributed with Ocaml])
findlib             (version: 1.9.1)
findlib.dynload     (version: 1.9.1)
findlib.internal    (version: 1.9.1)
findlib.top         (version: 1.9.1)
integers            (version: n/a)
integers.top        (version: n/a)
ocamlbuild          (version: 0.14.0)
ocamldoc            (version: [distributed with Ocaml])
raw_spacetime       (version: [distributed with Ocaml])
stdlib              (version: [distributed with Ocaml])
str                 (version: [distributed with Ocaml])
threads             (version: [distributed with Ocaml])
threads.none        (version: [internal])
threads.posix       (version: [internal])
topkg               (version: 1.0.3)
tsdl                (version: v0.9.8)
tsdl.top            (version: v0.9.8)
unix                (version: [distributed with Ocaml])

Error on building ocaml-windows

jackprograms@pop-os:~/Desktop/OCaml Projects/OCaml Playground$ opam install ocaml-windows
The following actions will be performed:
  ∗ install conf-gcc-windows32 1      [required by conf-gcc-windows, ocaml-windows32]
  ∗ install flexdll-windows    0.37   [required by ocaml-windows32]
  ∗ install conf-gcc-windows   1      [required by ocaml-windows]
  ∗ install ocaml-windows32    4.11.2 [required by ocaml-windows]
  ∗ install ocaml-windows      4.11.2
===== ∗ 5 =====
Do you want to continue? [Y/n] y

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[flexdll-windows.0.37] downloaded from https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz
[ocaml-windows32.4.11.2] downloaded from https://github.com/ocaml/ocaml/archive/4.11.2.tar.gz

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of conf-gcc-windows32 failed at "/home/jackprograms/.opam/opam-init/hooks/sandbox.sh build sh -exc ${TOOLPREF32-i686-w64-mingw32-}gcc --version".

#=== ERROR while compiling conf-gcc-windows32.1 ===============================#
# context     2.0.5 | linux/x86_64 | ocaml-system.4.08.1 | git://github.com/ocaml-cross/opam-cross-windows
# path        ~/.opam/default/.opam-switch/build/conf-gcc-windows32.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build sh -exc ${TOOLPREF32-i686-w64-mingw32-}gcc --version
# exit-code   127
# env-file    ~/.opam/log/conf-gcc-windows32-7951-d474c2.env
# output-file ~/.opam/log/conf-gcc-windows32-7951-d474c2.out
### output ###
# + i686-w64-mingw32-gcc --version
# sh: 1: i686-w64-mingw32-gcc: not found



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build conf-gcc-windows32 1
└─ 
╶─ No changes have been performed

I get this error when I put in opam install ocaml-windows.

I done opam install conf-flambda-windows before, and opam repository add windows git://github.com/ocaml-cross/opam-cross-windows before as well.

Can someone explain why this fails to build? Or what I can do?

Include fileutils

Latest 0.6.1 release of fileutils is once again compatible with Windows and uses dune for its build process.

It's already included in the opam-windows repository, so it would be nice to bring it to opam-cross-windows as well.

However, there's still a chain of missing dependencies (ounit etc.) that needs to be in place to include it. Should be it done in multiple separate pull requests or it's ok to combine multiple packages in one?

Error while compiling

Anyone able to help me with this error? I checked the opam-install man page, but didn't see any options I thought would help.

[ERROR] The compilation of ocaml-windows32 failed at "/home/barron/.opam/opam-init/hooks/sandbox.sh build /bin/sh
        ./build.sh i686-w64-mingw32".

#=== ERROR while compiling ocaml-windows32.4.11.2 =============================#
# context     2.0.3 | linux/x86_64 | ocaml-base-compiler.4.11.1 | git://github.com/ocaml-cross/opam-cross-windows
# path        ~/.opam/4.11.1/.opam-switch/build/ocaml-windows32.4.11.2
# command     ~/.opam/opam-init/hooks/sandbox.sh build /bin/sh ./build.sh i686-w64-mingw32
# exit-code   2
# env-file    ~/.opam/log/ocaml-windows32-6156-4eee66.env
# output-file ~/.opam/log/ocaml-windows32-6156-4eee66.out
### output ###
# [...]
# /home/barron/.opam/4.11.1/bin/ocamlrun ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 -warn-error A -bin-annot -safe-string -strict-formats -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I asmcom[...]
# /home/barron/.opam/4.11.1/bin/ocamlrun ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 -warn-error A -bin-annot -safe-string -strict-formats -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I asmcom[...]
# /home/barron/.opam/4.11.1/bin/ocamlrun ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 -warn-error A -bin-annot -safe-string -strict-formats -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I asmcom[...]
# /home/barron/.opam/4.11.1/bin/ocamlrun ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 -warn-error A -bin-annot -safe-string -strict-formats -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I asmcom[...]
# /home/barron/.opam/4.11.1/bin/ocamlrun ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66 -warn-error A -bin-annot -safe-string -strict-formats -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I asmcom[...]
# /tmp/camlasmac5e20.s: Assembler messages:
# /tmp/camlasmac5e20.s:1081: Warning: 9223372036854775807 shortened to 4294967295
# /tmp/camlasmac5e20.s:1082: Warning: 9223372036854775807 shortened to 4294967295
# /tmp/camlasmac5e20.s:5071: Error: unsupported instruction `push'
# File "/home/barron/.opam/4.11.1/.opam-switch/build/ocaml-windows32.4.11.2/lambda/switch.ml", line 1:
# Error: Assembler error, input left in file /tmp/camlasmac5e20.s
# make: *** [Makefile:1057: lambda/switch.cmx] Error 2```

Problems with omake?

@Drup mentioned to me in passing that you said that omake makes it a PITA to cross compile packages for windows. The package in question being camlimages.

Would you mind expanding on what made it so tough? I use omake for some of my packages and so do others so it would be nice if we correct this problem and make our software more usable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.