Giter VIP home page Giter VIP logo

Comments (12)

Neppord avatar Neppord commented on June 2, 2024 4

I tried to build on windows and after finding this issue I'm not surprised that it did not work :).

I'm posting my result here for reference.

$ PATH=$(stack path --bin-path --resolver lts-14.2):$PATH cabal new-build
Resolving dependencies...
cabal.exe: Could not resolve dependencies:
[__0] trying: semantic-0.7.0.0 (user goal)
[__1] next goal: unix (dependency of semantic)
[__1] rejecting: unix-2.7.2.2 (library is not buildable in the current
environment, but it is required by semantic)
[__1] rejecting: unix-2.7.2.1, unix-2.7.2.0, unix-2.7.1.0, unix-2.7.0.1,
unix-2.7.0.0, unix-2.6.0.1, unix-2.6.0.0, unix-2.5.1.1, unix-2.5.1.0,
unix-2.5.0.0, unix-2.4.2.0, unix-2.4.1.0, unix-2.4.0.2, unix-2.4.0.1,
unix-2.4.0.0, unix-2.3.2.0, unix-2.3.1.0, unix-2.3.0.0, unix-2.2.0.0, unix-2.0
(conflict: semantic => unix^>=2.7.2.2)
[__1] fail (backjumping, conflict set: semantic, unix)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: semantic, unix

Using git bash as the shell.

from semantic.

patrickt avatar patrickt commented on June 2, 2024 1

Yup, looks like we need to divest the library core from the unix package. This will be feasible once we tackle #136, as the only usages of the unix package are in the CLI tooling.

from semantic.

patrickt avatar patrickt commented on June 2, 2024

Via @hvr, we should use this this guide for getting started with CI on Win32.

from semantic.

patrickt avatar patrickt commented on June 2, 2024

We should also make sure that this builds and runs with WSL, though I can’t imagine a reason why it wouldn’t.

from semantic.

patrickt avatar patrickt commented on June 2, 2024

We should use this to attempt to provide signal handling on Windows. https://hackage.haskell.org/package/signal-0.1.0.4/docs/System-Signal.html

from semantic.

shiftkey avatar shiftkey commented on June 2, 2024

We should also make sure that this builds and runs with WSL, though I can’t imagine a reason why it wouldn’t.

I poked at this today hoping it was pretty straightforward but found a strange build error:

Failed to build ghc-tcplugins-extra-0.3.
Build log (
/home/shiftkey/.cabal/logs/ghc-8.6.4/ghc-tcplugins-extra-0.3-20b576c0cf25abb37fd1483fca4b604095b0b3e8e9197f3d2a057b4ad43fde2c.log
):
Configuring library for ghc-tcplugins-extra-0.3..
Preprocessing library for ghc-tcplugins-extra-0.3..
Building library for ghc-tcplugins-extra-0.3..
[1 of 1] Compiling GHC.TcPluginM.Extra ( src/GHC/TcPluginM/Extra.hs, dist/build/GHC/TcPluginM/Extra.o )
/usr/bin/ld.gold: error: cannot find -ltinfo
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
cabal: Failed to build ghc-tcplugins-extra-0.3 (which is required by
exe:semantic from semantic-0.6.0). See the build log above for details.

Not sure what it might point to, but happy to try things if you think I'm just missing some dependency.

Full log: https://gist.github.com/shiftkey/91fa9f639d80419938fef7f2417754fc

from semantic.

patrickt avatar patrickt commented on June 2, 2024

@shiftkey Looks like WSL doesn’t provide libtinfo out of the box, which is I guess what ghc-tcplugins-extra uses for… line editing support, I guess? That might be it…

from semantic.

patrickt avatar patrickt commented on June 2, 2024

Possibly related: cockroachdb/cockroach#24492

from semantic.

dcreager avatar dcreager commented on June 2, 2024

tinfo also had a recent soversion bump from 5 to 6, which caused us problems on our internal Docker builds that were based on too old of a Debian image. (The tinfo dep was showing up in the resulting built binaries, IIRR!) But since this is a link-time error, you're right @patrickt that here it looks more like it's just missing, and not a version-mismatch error.

from semantic.

hvr avatar hvr commented on June 2, 2024

...at the risk of stating the obvious, have you tried already with apt-get install libtinfo-dev ?

from semantic.

shiftkey avatar shiftkey commented on June 2, 2024

@hvr that's a good point!

WSL is a very minimal install, so I had to install these additional packages to address build failures:

$ apt-get install libtinfo-dev libz-dev libutf8proc-dev

The other thing I had to do was change core.autocrlf from true (which is set by default in the WSL home directory, probably for interop reasons with Windows) to false and reset the working directory state. The line endings change seems to trigger alot of test failures, but I'll dig into that another time and see whether it needs some documentation tweaks.

The cabal new-test now succeeds but doesn't exit cleanly after emitting the test suite log with a CTRL + C - probably just some interop issue.

With those tweaks I was able to get a working built/test/run of semantic going and see semantic --help work for f7bc9b8, so 🎉

from semantic.

danipen avatar danipen commented on June 2, 2024

I tried to build on windows and I got the same results as @Neppord.

c:\Users\dani_\gitrepos\semantic\semantic>script/bootstrap
Script started, file is /bootstrap
sh-4.4$ cabal v2-build all
Resolving dependencies...
cabal.exe: Could not resolve dependencies:
[__0] trying: semantic-0.11.0.1 (user goal)
[__1] next goal: unix (dependency of semantic)
[__1] rejecting: unix-2.7.2.2 (library is not buildable in the current
environment, but it is required by semantic)
[__1] rejecting: unix-2.7.2.1 (conflict: semantic => unix^>=2.7.2.2)
[__1] skipping: unix-2.7.2.0, unix-2.7.1.0, unix-2.7.0.1, unix-2.7.0.0,
unix-2.6.0.1, unix-2.6.0.0, unix-2.5.1.1, unix-2.5.1.0, unix-2.5.0.0,
unix-2.4.2.0, unix-2.4.1.0, unix-2.4.0.2, unix-2.4.0.1, unix-2.4.0.0,
unix-2.3.2.0, unix-2.3.1.0, unix-2.3.0.0, unix-2.2.0.0, unix-2.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '^>=2.7.2.2' from 'semantic')
[__1] fail (backjumping, conflict set: semantic, unix)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: semantic, unix

As @patrickt pointed, it seems easy to refactor the CLI tooling and make the library win-compatible. Is there any estimate for that? Thank you!!

from semantic.

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.