Giter VIP home page Giter VIP logo

Comments (14)

whitequark avatar whitequark commented on June 12, 2024

ocamlfind -toolchain windows ocamlc -I /freetype2 src/ftintf.c
Here's the problem:
-I /freetype2

from opam-cross-windows.

whitequark avatar whitequark commented on June 12, 2024

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.

markghayden avatar markghayden commented on June 12, 2024

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.

whitequark avatar whitequark commented on June 12, 2024

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.

whitequark avatar whitequark commented on June 12, 2024

Of course, replace %{conf-gcc-windows64:prefix}% with the prefix leading to your gcc inside MXE.

from opam-cross-windows.

markghayden avatar markghayden commented on June 12, 2024

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.

whitequark avatar whitequark commented on June 12, 2024

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.

whitequark avatar whitequark commented on June 12, 2024

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.

whitequark avatar whitequark commented on June 12, 2024

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.

markghayden avatar markghayden commented on June 12, 2024

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

=-=- 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.

whitequark avatar whitequark commented on June 12, 2024

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.

markghayden avatar markghayden commented on June 12, 2024

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.

whitequark avatar whitequark commented on June 12, 2024

Sorry--I neglected to mention. After installing readlink you need to reinstall conf-gcc-windows. That should fix it.

from opam-cross-windows.

markghayden avatar markghayden commented on June 12, 2024

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)

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.