Git Product home page Git Product logo

Comments (8)

Mokosha avatar Mokosha commented on July 18, 2024

Interesting -- I am not seeing this. Can you tell me what your development environment looks like? For me, running via stack works fine:

C:\Users\Krajc>mkdir temp

C:\Users\Krajc>cd temp

C:\Users\Krajc\temp>stack unpack bindings-GLFW-3.3.2.0
Unpacked bindings-GLFW (from Hackage) to C:\Users\Krajc\temp\bindings-GLFW-3.3.2.0\

C:\Users\Krajc\temp>cd bindings-GLFW-3.3.2.0

C:\Users\Krajc\temp\bindings-GLFW-3.3.2.0>stack init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- .\

Selecting the best among 18 snapshots...

* Matches lts-16.5

Selected resolver: lts-16.5
Initialising configuration using resolver: lts-16.5
Total number of user packages considered: 1
Writing configuration to file: stack.yaml
All done.

C:\Users\Krajc\temp\bindings-GLFW-3.3.2.0>stack build
bindings-DSL > using precompiled package
bindings-GLFW> configure (lib)
Configuring bindings-GLFW-3.3.2.0...
bindings-GLFW> build (lib)
Preprocessing library for bindings-GLFW-3.3.2.0..
Building library for bindings-GLFW-3.3.2.0..
[1 of 1] Compiling Bindings.GLFW
bindings-GLFW> copy/register
Installing library in C:\Users\Krajc\temp\bindings-GLFW-3.3.2.0\.stack-work\install\dfacab28\lib\x86_64-windows-ghc-8.8.3\bindings-GLFW-3.3.2.0-59P015H4CpvITasZ77eQwl
Registering library for bindings-GLFW-3.3.2.0..
Completed 2 action(s).

C:\Users\Krajc\temp\bindings-GLFW-3.3.2.0>

from bindings-glfw.

mastarija avatar mastarija commented on July 18, 2024

@Mokosha I use Cabal and have a very simple setup, basically just MSYS, Cabal and GHC in my path. I've tried cleaning my default environment but with no success. Same problem every time.

Here are the exact details of my setup (it served me well over the years :) :

  • GHC : 8.10.1
  • Cabal : 3.2.0.0

Path

C:\msys64\usr\bin
C:\msys64\mingw64\bin
C:\Program Files\Haskell\ghc-8.10.1\bin
C:\Program Files\Haskell\cabal-install-3.2.0.0

Initially I tried installing it as a dependency in my project, but I get the same thing If I try to build it from source:

PS C:\Users\mastarija\Desktop\bindings-GLFW> cabal build                                            Resolving dependencies...
Build profile: -w ghc-8.10.1 -O1
In order, the following will be built (use -v for more details):
 - bindings-GLFW-3.3.2.0 (lib) (first run)
Configuring library for bindings-GLFW-3.3.2.0..
Preprocessing library for bindings-GLFW-3.3.2.0..
Bindings\GLFW.hsc:62 directive num cannot be handled in cross-compilation mode
PS C:\Users\mastarija\Desktop\bindings-GLFW>  

from bindings-glfw.

Mokosha avatar Mokosha commented on July 18, 2024

bindings-DSL, the package that this library is based on, is a macro library meant to be used with the tool hsc2hs. You will need to make sure that hsc2hs is in your path as well.

from bindings-glfw.

mastarija avatar mastarija commented on July 18, 2024

@Mokosha I do have it in my path, and cabal also downloads it and builds it once I start the build. I'm going to try and purge my package store today and see if that changes anything.

from bindings-glfw.

mastarija avatar mastarija commented on July 18, 2024

@Mokosha I still have no success even after purging all the packages from my store. Can you perhaps try building with Cabal as well?

from bindings-glfw.

Mokosha avatar Mokosha commented on July 18, 2024

Can you give me the list of commands you're running, and I'll try to run them locally?

from bindings-glfw.

mastarija avatar mastarija commented on July 18, 2024

@Mokosha I've wiped my cabal and .ghc directories to have a fresh environment once again. Here's exact commands and output once I've tried to build the bindings:

> git clone https://github.com/bsl/bindings-GLFW.git
> cd .\bindings-GLFW\
> cabal update
> cabal build
PS C:\Users\mastarija> cd Desktop
PS C:\Users\mastarija\Desktop> git clone https://github.com/bsl/bindings-GLFW.git
Cloning into 'bindings-GLFW'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 1218 (delta 1), reused 5 (delta 0), pack-reused 1199
Receiving objects: 100% (1218/1218), 1.48 MiB | 3.41 MiB/s, done.
Resolving deltas: 100% (717/717), done.
PS C:\Users\mastarija\Desktop> cd .\bindings-GLFW\
PS C:\Users\mastarija\Desktop\bindings-GLFW> cabal update
Config file path source is default config file.
Config file C:\Users\mastarija\AppData\Roaming\cabal\config not found.
Writing default configuration to
C:\Users\mastarija\AppData\Roaming\cabal\config
Downloading the latest package list from hackage.haskell.org
PS C:\Users\mastarija\Desktop\bindings-GLFW> cabal build
Resolving dependencies...
Build profile: -w ghc-8.10.1 -O1
In order, the following will be built (use -v for more details):
 - bindings-DSL-1.0.25 (lib) (requires download & build)
 - hsc2hs-0.68.7 (exe:hsc2hs) (requires download & build)
 - bindings-GLFW-3.3.2.0 (lib) (first run)
Downloading  bindings-DSL-1.0.25
Downloaded   bindings-DSL-1.0.25
Downloading  hsc2hs-0.68.7
Starting     bindings-DSL-1.0.25 (lib)
Downloaded   hsc2hs-0.68.7
Starting     hsc2hs-0.68.7 (exe:hsc2hs)
Building     bindings-DSL-1.0.25 (lib)
Building     hsc2hs-0.68.7 (exe:hsc2hs)
Installing   bindings-DSL-1.0.25 (lib)
Completed    bindings-DSL-1.0.25 (lib)
Installing   hsc2hs-0.68.7 (exe:hsc2hs)
Completed    hsc2hs-0.68.7 (exe:hsc2hs)
Configuring library for bindings-GLFW-3.3.2.0..
Preprocessing library for bindings-GLFW-3.3.2.0..
Bindings\GLFW.hsc:62 directive num cannot be handled in cross-compilation mode

from bindings-glfw.

mastarija avatar mastarija commented on July 18, 2024

@Mokosha I just remembered I had problems building network package some time ago using cabal-3.2.0.0 so I downgraded to cabal-3.0.0.0 and now it works!

from bindings-glfw.

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.