Closed maoe closed 4 years ago
I started calling for Windows maintainer(s) on reddit: https://www.reddit.com/r/haskell/comments/e66p4y/call_for_maintainers_threadscope_on_windows/
I got to be able to reproduce the same error on my machine. I start to check the details.
The error seems a gtk2hs's problem. There is a PR for gtk2hs which is created just two days ago, https://github.com/gtk2hs/gtk2hs/pull/289. But this PR is not enough, and so I created a new PR toward the PR, https://github.com/PaulJohnson/gtk2hs/pull/1.
I made ThreadScope use the fixed revision (the diff is https://github.com/haskell/ThreadScope/compare/master...kakkun61:windows).
Another new error occurred, although the error which occurred on AppVeyor was fixed.
With GHC 8.8.1 and Cabal 3.0.0.0 on PowerShell,
The MinGW64 shell seems unnecessary when using cabal v2-build, and I encountered the same error with MinGW64 shell.
I don't know why MIN_VERSION_gtk
is not generated. Does anyone have any information about this?
Ah, I found my mistake. I changed the dependency from gtk to gtk3, so MIN_VERSION_gtk3
should be used.
Thanks for the heads up. Nice to hear that you fixed the original issue.
As for the version macros, note that ThreadScope is currently written for gtk2. Porting it to gtk3 needs non-trivial amount of work and perhaps should be done with #100. So I think it's better to focus on the build issue and stick to gtk2 for now.
This isn't an issue with ThreadScope. The current version of hsc2hs are broken on Windows. Because of this any haskell project using Windows is currently unstable until the next version is released. Your builds will randomly fail or pass. See https://github.com/haskell/hsc2hs/blob/master/changelog.md
Ah no sorry this is a different issue, I didn't notice the first part of the error. But keep in mind that your builds will be unstable till the new version of hsc2hs.
I have been able to build the latest ThreadScope on Windows finally!
After the PR of https://github.com/gtk2hs/gtk2hs/pull/289 is merged and the gtk package and so on are released, we can build it.
If you build it now, use this cabal.project https://github.com/haskell/ThreadScope/compare/master...kakkun61:windows.
@kakkun61 Nice. Unfortunately in your windows branch glib doesn't seem to build on macOS though:
% PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig" cabal build --constraint='gtk +have-quartz-gtk' -w ghc-8.6.5
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- glib-0.13.7.1 (lib:glib) (first run)
- pango-0.13.6.1 (lib:pango) (first run)
- gio-0.13.6.1 (lib:gio) (first run)
- gtk-0.15.3 (lib:gtk) (first run)
- gtk-mac-integration-0.3.4.0 (lib:gtk-mac-integration) (requires build)
- threadscope-0.2.11.1 (exe:threadscope) (configuration changed)
Preprocessing library for glib-0.13.7.1..
setup: Error in C header file.
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:154: (column 17) [FATAL]
>>> Syntax error!
The symbol `__attribute__' does not fit here.
cabal: Failed to build glib-0.13.7.1 (which is required by
threadscope-0.2.11.1).
@maoe I don't know why, but this patch may fix it by any chance, https://github.com/gtk2hs/gtk2hs/pull/289#issuecomment-562409162.
AppVeyor builds are fixed.
GHC 8.0 is failing due to https://github.com/gtk2hs/gtk2hs/issues/285. 8.2 and 8.4 are failing as follows:
See https://ci.appveyor.com/project/maoe/threadscope-44t6e/build/job/p4v7ub35q7rrwlx7 for the full log.
Related #97