Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on Windows 10 #86

Open
tjausm opened this issue Nov 28, 2022 · 0 comments
Open

Installation on Windows 10 #86

tjausm opened this issue Nov 28, 2022 · 0 comments

Comments

@tjausm
Copy link

tjausm commented Nov 28, 2022

I'm having trouble building a Cabal project with the z3 bindings.

The following is the minimum (faulty) example:

Using a project initialized by cabal init:

test/
- Main.hs
- Setup.hs
- CHANGELOG.md
- test.cabal

With modified test.cabal:

cabal-version:         3.0
name:                  z3-test
version:               0.1.0.0
extra-source-files:    CHANGELOG.md
executable test
  main-is:             Main.hs
  build-depends:       base                    >=4.14 && <4.15
                       , z3                    ^>=408.2
  default-language:    Haskell2010
  extra-libraries:     C:\z3-4.8.5-x64-win\bin 
  extra-lib-dirs:      C:\z3-4.8.5-x64-win\include

Z3 binaries are located at C:\z3-4.8.5-x64-win. and installed: cabal v1-install z3 --extra-lib-dirs=C:/z3-4.8.5-x64-win/bin --extra-include-dirs=C:/z3-4.8.5-x64-win/include

All the requested packages are already installed:
z3-408.2
Use --reinstall if you want to reinstall anyway.

now building the project using:

cabal v1-build

Results in the error:

Preprocessing executable 'test' for z3-test-0.1.0.0..
Building executable 'test' for z3-test-0.1.0.0..
Linking dist\build\test\test.exe ...
C://ProgramData//chocolatey//lib//ghc//tools//ghc-8.10.2//mingw//bin/ld.exe: cannot find -lC:\z3-4.8.5-x64-win\bin
collect2.exe: error: ld returned 1 exit status
`gcc.exe' failed in phase `Linker'. (Exit code: 1)

Result of cabal v1-build -v3 is

How can I build a project with the z3 bindings?

Note that:

  • I can only use cabal
  • Using cabal install ... or cabal v2-install ... results in Cannot build .. z3 because none of the components are available to build:
@tjausm tjausm changed the title Insallation on Windows 10 Installation on Windows 10 Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant