-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cabal won't install Monomer because of Nanovg #258
Comments
Hi @liamzee! I don't currently have a Windows box to test, but it seems you're missing a dependency. There are a few OS libraries you need to install before building Monomer. Here are the steps for Windows. In particular, you seem to be missing Freetype, based on this part of the logs:
|
I'm using Cabal over Stack, and I've installed the stuff via mingw. Right now, the point of failure is SDL2: Starting sdl2-2.5.4.0 (lib) Failed to build sdl2-2.5.4.0.
ld.lld: error: undefined symbol: __stack_chk_guard
Error: cabal-3.8.1.0.exe: Failed to build sdl2-2.5.4.0 (which is required by |
Thanks for the fast response! |
Mainly a cabal issue, I guess. :( Wondering if Cabal can be induced to do all of this automatically |
Tried executing a toy program via stack. SDL2 compilation blows up. |
Based on what I see from this issue on Haskell's SDL2 repository, it seems to be an issue with the SDL2 provided by MinGW. I wonder if installing an older version of SDL2 would solve your issue. At some point in the past, I investigated how it could be done, but I'm not sure this still works. You can check it here. For reference, I paste below the original comment:
|
Are there any goals toward better cabal support? As in, can cabal force installation within mingw of the required packages? You know, Cabal won the Cabal vs Stack war, although it's quite obvious where stack is immensely useful. |
@liamzee I'm not planning on giving priority to Cabal over Stack for the moment. While Stack is not receiving much development at the time, its builds work fine everywhere thanks to Stackage releases. There is a proposal to easily use Stackage LTS release from Cabal, but I think there are a couple of things pending. I'm not planning on automating the installation of dependencies, mainly because it would become a maintenance nightmare for me. |
Installed now. Thank you so much! |
Still bugged on windows. I used mingw-w64-x86_64-SDL2-2.0.22-2-any.pkg.tar.zst, which was the last working version. What I get is that all the text is missing, and buttons don't seem to be there. I'll keep on messing around. |
https://gitlab.haskell.org/ghc/ghc/-/issues/22999 Issue created by Tamar Christina. I'm switching to Linux to attempt to get Monomer working, but hopefully build issues will be handled by GHC in future releases. |
@liamzee thanks for letting me know! I'll keep the issue open. Meanwhile: this is far from ideal, and if you're currently using new GHC features it is not even an option, but have you tried using GHC resolver: lts-18.27 I did test this version on Windows in the past, and the examples worked without issues. If you're not using new GHC features, it can be an option until the MinGW situation is fixed. |
Okay, been messing around on Windows and Debian. It looks like the issue is, if you use cabal install to dump it into cabal/bin, or stack install, you end up with monomer programs that don't have their assets affixed. So it's sort of a configuration problem, but ideally, monomer should read defaults from somewhere. === My interest is in getting Haskell to become accessible to everyone, and I think monomer is a great library / project. Thank you so much for your work on Monomer. |
@liamzee I'm not sure I understand the issue you mention in the last comment. The library loads assets using the directory where the application is run as its base path, which is a common behavior. Regarding the original issue, it's something outside the control of the library and should probably be closed. |
fjvallarino: apparently data-files in Cabal is rarely used, and I'm still waiting to get help to get data-files to work. Not sure about the Stack equivalent; trying to config monomer there blew my ghci config. Re my assorted whining, thanks for your patience so far, but I'm going through the library's own source code now and will come back only when I have some pull requests available. You're already using wreq and by extension cryptonite, shouldn't be too hard for me to finagle some settings that allow font downloads in the event that font assets are missing. |
Just opening an update via Ben Gamari on what's going on with the stack protector issue: 9.10.1? :) https://gitlab.haskell.org/ghc/ghc/-/issues/22999#note_520844 |
PS C:\Users\Liam> cabal install monomer
Resolving dependencies...
Error: cabal-3.8.1.0.exe: Could not resolve dependencies:
[__0] next goal: monomer (user goal)
[__0] rejecting: monomer-1.5.1.0 (conflict: pkg-config package glew-any, not
found in the pkg-config database)
[__0] trying: monomer-1.5.0.0
[__1] trying: nanovg-0.8.1.0 (dependency of monomer)
[__2] rejecting: nanovg:-stb_truetype (conflict: pkg-config package
freetype2-any, not found in the pkg-config database)
[__2] rejecting: nanovg:+stb_truetype (manual flag can only be changed
explicitly)
[__2] fail (backjumping, conflict set: nanovg, nanovg:stb_truetype)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: nanovg, monomer, nanovg:stb_truetype
Cabal 3.8.1.0 obviously, Windows 10, GHC 9.4.4.
The text was updated successfully, but these errors were encountered: