Comments (5)
Did you install both gcc-mingw-w64-i686
and gcc-mingw-w64-x86-64
as listed in Prerequisites?
from opam-cross-windows.
jackprograms@pop-os:~$ opam install ocaml-windows
The following actions will be performed:
∗ install ocaml-windows32 4.11.2 [required by ocaml-windows]
∗ install ocaml-windows 4.11.2
===== ∗ 2 =====
Do you want to continue? [Y/n] y
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocaml-windows32.4.11.2] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ocaml-windows32 failed at "/home/jackprograms/.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.5 | linux/x86_64 | ocaml-system.4.08.1 | git://github.com/ocaml-cross/opam-cross-windows
# path ~/.opam/default/.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-19868-e0ba4f.env
# output-file ~/.opam/log/ocaml-windows32-19868-e0ba4f.out
### output ###
# [...]
# /home/jackprograms/.opam/default/lib/flexdll-windows/flexlink -chain mingw -stack 16777216 -link -static-libgcc -exe -link "-municode" -g -o ocamlrund.exe prims.o libcamlrund.a -lws2_32 -lversion
# /home/jackprograms/.opam/default/lib/flexdll-windows/flexlink -chain mingw -stack 16777216 -link -static-libgcc -exe -link "-municode" -o ocamlruni.exe prims.o libcamlruni.a -lws2_32 -lversion
# make[1]: Leaving directory '/home/jackprograms/.opam/default/.opam-switch/build/ocaml-windows32.4.11.2/runtime'
# cp runtime/ocamlrun.exe boot/ocamlrun.exe
# make -C stdlib \
# CAMLC='$(BOOT_OCAMLC) -use-prims ../runtime/primitives' all
# make[1]: Entering directory '/home/jackprograms/.opam/default/.opam-switch/build/ocaml-windows32.4.11.2/stdlib'
# /home/jackprograms/.opam/default/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 -nopervasives -c camlinternalFormatBasics.mli
# make[1]: /home/jackprograms/.opam/default/bin/ocamlrun: Command not found
# make[1]: *** [Makefile:209: camlinternalFormatBasics.cmi] Error 127
# make[1]: Leaving directory '/home/jackprograms/.opam/default/.opam-switch/build/ocaml-windows32.4.11.2/stdlib'
# make: *** [Makefile:153: coldstart] Error 2
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-windows32 4.11.2
└─
╶─ No changes have been performed
I installed the mingw in the Prerequisites, but now still an error. ocamlrun
is in my /usr/bin
, not in my opam, which I don't understand why it should be in the opam bin.
I made a link target, so ocamlrun
is added in the opam bin, so it should target to the /usr/bin/ocamlrun
.
I ran the opam install ocaml-windows
again, but another error...
jackprograms@pop-os:~$ opam install ocaml-windows
The following actions will be performed:
∗ install ocaml-windows32 4.11.2 [required by ocaml-windows]
∗ install ocaml-windows 4.11.2
===== ∗ 2 =====
Do you want to continue? [Y/n] y
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocaml-windows32.4.11.2] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ocaml-windows32 failed at "/home/jackprograms/.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.5 | linux/x86_64 | ocaml-system.4.08.1 | git://github.com/ocaml-cross/opam-cross-windows
# path ~/.opam/default/.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-24489-e0ba4f.env
# output-file ~/.opam/log/ocaml-windows32-24489-e0ba4f.out
### output ###
# [...]
# /home/jackprograms/.opam/default/lib/flexdll-windows/flexlink -chain mingw -stack 16777216 -link -static-libgcc -exe -link "-municode" -g -o ocamlrund.exe prims.o libcamlrund.a -lws2_32 -lversion
# /home/jackprograms/.opam/default/lib/flexdll-windows/flexlink -chain mingw -stack 16777216 -link -static-libgcc -exe -link "-municode" -o ocamlruni.exe prims.o libcamlruni.a -lws2_32 -lversion
# make[1]: Leaving directory '/home/jackprograms/.opam/default/.opam-switch/build/ocaml-windows32.4.11.2/runtime'
# cp runtime/ocamlrun.exe boot/ocamlrun.exe
# make -C stdlib \
# CAMLC='$(BOOT_OCAMLC) -use-prims ../runtime/primitives' all
# make[1]: Entering directory '/home/jackprograms/.opam/default/.opam-switch/build/ocaml-windows32.4.11.2/stdlib'
# /home/jackprograms/.opam/default/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 -nopervasives -c camlinternalFormatBasics.mli
# Fatal error: the file '../boot/ocamlc' has not the right magic number: expected Caml1999X025, got Caml1999X028
# make[1]: *** [Makefile:209: camlinternalFormatBasics.cmi] Error 2
# make[1]: Leaving directory '/home/jackprograms/.opam/default/.opam-switch/build/ocaml-windows32.4.11.2/stdlib'
# make: *** [Makefile:153: coldstart] Error 2
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-windows32 4.11.2
└─
╶─ No changes have been performed
It is some weird error that I don't understand.
Can someone explain why this fails to build? What can I do?
from opam-cross-windows.
Are you trying to install 64 bit? If so, try getting rid of the link target and run opam install ocaml-windows64
.
from opam-cross-windows.
I put my OCaml compiler to 4.11.2, and it worked. Other versions like 4.11.1 and 4.08 did not work and errored, so I find the README.md
misleading. Thank you for your help @BarronRauEA
from opam-cross-windows.
from opam-cross-windows.
Related Issues (20)
- Cross-compiler has `ocamlc -config-var os_type` = `"%%OCAML_OS_TYPE%%"`
- Can not resolve symbols for libcamlrun.a(floats_b.o) HOT 4
- Sys.win32 reporting false on 32bit cross-compiler HOT 3
- Building fails due to fno-common being the default in recent versions of gcc HOT 3
- `opam install ocaml-windows` fails with compilation error for `ocaml-windows64` HOT 4
- Supporting ocaml 4.12 HOT 11
- Graphics HOT 4
- Error while compiling HOT 4
- ocamlfind: [WARNING] Undefined toolchain: windows
- ppx_tools_versioned-windows is broken with 4.12.0 HOT 7
- adding repository to opam HOT 1
- flexdll.h not found error when running "ocaml install ocaml-windows" HOT 13
- OCaml-windows 4.12.0 no longer builds HOT 2
- Ocaml 5 support HOT 4
- uutf-windows
- Packaging library with 3rd party dependencies HOT 1
- Cannot install `ocaml-windows` 5.1.1 HOT 6
- error compiling dune-windows (OCaml 5.1.1) HOT 3
- Zmq-windows version too old HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opam-cross-windows.