Thanks for explaining! Could you share the Perl script please?Hallow XIII wrote: ↑Fri Oct 22, 2021 8:32 amIn many ways, it's still easier to build on Linux. I basically didn't have to do any of the steps involving passing the locations of Qt tools. It's just that the way you link the GUI on Windows is impossible on Linux, since statically linked Haskell libraries aren't position-independent and so can't be linked into a Qt program that uses dynamically linked Qt, which is the default everywhere. So my workaround was to dynamically link the Haskell, but if you do that and your main linker pass isn't controlled by GHC then you have to manually pass the location of all the Haskell dependencies to the linker. Thankfully I found a perl script that can mostly automate this...bradrn wrote: ↑Thu Oct 21, 2021 5:23 pmI’m seriously impressed that you managed to do this — without proper documentation! (I’ve been meaning to write some, but alas, haven’t gotten around to it just yet…) I find it extremely surprising that this was easier to build on Windows than Linux; in my experience, it’s usually the other way around. On the other hand, I was originally intending to link the Haskell dynamically, but gave up when I discovered this is impossible on Windows.Hallow XIII wrote: ↑Thu Oct 21, 2021 9:18 am So I have good news and bad news. The good news is that I've managed to compile and run the brassica GUI on Linux. The bad news is that it was extremely involved to do so, largely because (til) Windows doesn't have a distinction between position-independent and position-dependent code, which lets you get away with more creative linking than on Unixen. The easiest way for me to get it running was to compile everything with -fPIC -fPIE and then dynamically link all the Haskell dependencies, which is also the preferred distribution format for my distribution's package management system.
Follow-up question: do the Haskell dependencies end up as separate dynamic libraries each, or is all the Haskell code+dependencies compiled into one big DLL? (Yes, I know that’s not the right term for Linux, but it’s late at night and I can’t remember what I should be calling it…)