Comments (14)
ocamlfind -toolchain windows ocamlc -I /freetype2 src/ftintf.c
Here's the problem:
-I /freetype2
from opam-cross-windows.
Hang on. Why are you expecting camlimages-windows
to pick up anything installed via Homebrew? That's not how cross-compilation works; nothing installed in the host environment is relevant.
from opam-cross-windows.
Good point! That should be coming from MXE. All the other packages we use seem to be picking up MXE, except this.
from opam-cross-windows.
So... these two commands fail: https://github.com/whitequark/opam-cross-windows/blob/master/packages/conf-gcc-windows.1/opam#L6-L7
Could you try running them manually? I can set up MXE on my OS X VM but it'll take a while.
from opam-cross-windows.
Of course, replace %{conf-gcc-windows64:prefix}%
with the prefix leading to your gcc
inside MXE.
from opam-cross-windows.
Coming back to this, I think the issue is that freetype is being installed in a freetype2 sub-directory of the include. Adding the symbolic links below makes it work. Is there a better fix?
sakhalin% pwd
/Users/mhayden/plotter/proj/mxe/mxe/usr/x86_64-w64-mingw32.shared/include
sakhalin% ln -s freetype2/
freetype/ ft2build.h
sakhalin% ln -s freetype2/freetype .
sakhalin% ln -s freetype2/ft2build.h .
from opam-cross-windows.
Hm, this freetype idiosyncrasy is supposed to be handled here: https://github.com/whitequark/opam-cross-windows/blob/master/packages/camlimages-windows.4.2.1/opam#L88-L90
from opam-cross-windows.
Specifically, "-I" "%{conf-gcc-windows:c-include}%/freetype2"
fails as you get a -I /freetype2
flag, which means that the variable conf-gcc-windows:c-include
is empty. This is set here: https://github.com/whitequark/opam-cross-windows/blob/master/packages/conf-gcc-windows.1/opam#L4-L7. Something on OS X is behaving funky, probably because I have an implicit GNU assumption somewhere in that horrible script.
from opam-cross-windows.
Oh.
user@users-iMac:~$ readlink -f x
readlink: illegal option -- f
There's... no good way to make everything work without readlink -f
. There are no good solutions to that either (see https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac). Please install GNU readlink and make sure it's in PATH as readlink
.
from opam-cross-windows.
Hi Peter,
I installed coreutils from Homebrew and linked /opt/local/gin/greadlink to ~/bin/link. It still won’t install camlimages-windows. Am I doing something wrong?
—Mark
++ which readlink
- ls -l /Users/mhayden/bin/readlink
lrwxrwxr-x 1 mhayden 501 24 Apr 30 15:03 /Users/mhayden/bin/readlink -> /opt/local/bin/greadlink - readlink -f .
/Users/mhayden/plotter/proj/mxe/ocw - opam install yojson-windows flexdll-windows camlbz2-windows camlzip-windows proj4-windows expat-windows camlimages-windows
[NOTE] Package yojson-windows is already installed (current version is 1.3.2).
[NOTE] Package flexdll-windows is already installed (current version is 0.34).
[NOTE] Package camlbz2-windows is already installed (current version is 0.6.0).
[NOTE] Package camlzip-windows is already installed (current version is 1.05).
[NOTE] Package proj4-windows is already installed (current version is 0.9.1).
[NOTE] Package expat-windows is already installed (current version is 0.9.1).
The following actions will be performed:- install camlimages-windows 4.2.1
Do you want to continue ? [Y/n] y
- install camlimages-windows 4.2.1
=-=- 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-67103-d0f245.env
stdout-file /Users/mhayden/.opam/4.02.3/build/camlimages-windows.4.2.1/camlimages-windows-67103-d0f245.out
stderr-file /Users/mhayden/.opam/4.02.3/build/camlimages-windows.4.2.1/camlimages-windows-67103-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.
sakhalin%
On Apr 30, 2016, at 10:53 AM, whitequark [email protected] wrote:
Oh.
user@users-iMac:~$ readlink -f x
readlink: illegal option -- f
There's... no good way to make everything work without readlink -f. There are no good solutions to that either (see https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac). Please install GNU readlink and make sure it's in PATH as readlink—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #3 (comment)
from opam-cross-windows.
I installed coreutils from Homebrew and linked /opt/local/gin/greadlink to ~/bin/link. It still won’t install camlimages-windows. Am I doing something wrong?
Yeah--as I understand the symlink is named greadlink
, it should be readlink
. I'll look into making the opam build script look for greadlink
on OS X later, but such conditions are irritating to implement due to some of opam's design choices.
from opam-cross-windows.
I named the symlink readlink but things still didn’t work. If readlink is required, maybe the install should fail if it is missing or doesn’t support ‘-f’ option?
—Mark
++ which readlink
- ls -l /Users/mhayden/bin/readlink
lrwxrwxr-x 1 mhayden 501 24 Apr 30 15:03 /Users/mhayden/bin/readlink -> /opt/local/bin/greadlink - readlink -f .
/Users/mhayden/plotter/proj/mxe/ocw
On Apr 30, 2016, at 3:15 PM, whitequark [email protected] wrote:
I installed coreutils from Homebrew and linked /opt/local/gin/greadlink to ~/bin/link. It still won’t install camlimages-windows. Am I doing something wrong?
Yeah--as I understand the symlink is named greadlink, it should be readlink. I'll look into making the opam build script look for greadlink on OS X later, but such conditions are irritating to implement due to some of opam's design choices.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #3 (comment)
from opam-cross-windows.
Sorry--I neglected to mention. After installing readlink you need to reinstall conf-gcc-windows
. That should fix it.
from opam-cross-windows.
Ok; that worked. Thanks! —M
On Apr 30, 2016, at 3:51 PM, whitequark [email protected] wrote:
Sorry--I neglected to mention. After installing readlink you need to reinstall conf-gcc-windows. That should fix it.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #3 (comment)
from opam-cross-windows.
Related Issues (20)
- Include fileutils
- 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 on building ocaml-windows HOT 5
- 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
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.