Open mitchellwrosen opened 6 years ago
fltk-1.4 doesn't seem to be officially released yet. Not even nixpkgs unstable provides it (only 1.3.4). The download link to FLTK 1.4
from the readme is https://github.com/fltk/fltk/archive/master.tar.gz, which points at a 1.3.4
tarball!
On the official downloads page, http://www.fltk.org/software.php, 1.3.4
is recommended, but 1.4.x-r13117
is provided as well. Is this the version that's compatible with fltkhs
?
Oops, I'm wrong about https://github.com/fltk/fltk/archive/master.tar.gz pointing to a 1.3.4
tarball. It is some flavor of 1.4
, I was just looking at the latest changelog entry, which is for 1.3.4
. No changelog has been cut yet for 1.4
.
Ok, well I got everything working just by installing from source and disabling xft (don't want to mess with it right now) :)
Blah, I spoke too soon, now I'm drowning in linker errors like
/home/mitchell/.cabal/store/ghc-8.6.2/fltkhs-0.6.0.0-5ff55cd6967ebc8a12034d16d0ea6a0ff8f9e8a1eb37fc2ec280fdedbb5b124b/lib/libHSfltkhs-0.6.0.0-5ff55cd6967ebc8a12034d16d0ea6a0ff8f9e8a1eb37fc2ec280fdedbb5b124b.a(Widget.o):ghc_350.c:fltkhszm0zi6zi0zi0zm5ff55cd6967ebc8a12034d16d0ea6a0ff8f9e8a1eb37fc2ec280fdedbb5b124b_GraphicsziUIziFLTKziLowLevelziWidget_customWidgetFunctionStruct1_info: error: undefined reference to 'Fl_Widget_default_virtual_funcs'
I installed fltkhs-1.4
into a non-standard location (~/.local/lib
, ~/.local/install
). So I've instrumented my cabal.project
as:
packages: .
extra-lib-dirs: /home/mitchell/.local/lib
extra-include-dirs: /home/mitchell/.local/include
package fltkhs
static: false
and tried building with LD_LIBRARY_PATH=~/.local/lib cabal new-build
. No dice.
Interesting, I'm running Arch myself and haven't hit this. First off, yes, the new release does use an unreleased version of FLTK because there is a bunch of new functionality that seems more or less stable so bundled
is the recommended way to go. Also I did have problems with freetype-config
which is why I created a dummy one which delegates to pkg-config
. It should have been added to PATH
by the build process, unfortunately it seems like it wasn't. Also xft
is more or less required at this point because the new themes functionality uses it to add nicer TTF fonts.
It seems like we have roughly similar setups but you're running into issues. Do you have a stack
installation handy just to test? If so would you mind running through the [installation instructions] using the bundled
option?
Of course I can! Hm, interestingly I'm still getting linker errors with bundled
.
Here's my stack.yaml
:
resolver: lts-12.18
extra-deps:
- fltkhs-0.6.0.0
flags:
fltkhs:
bundled: true
and the build error:
Huh, I never actually tried setting the bundled
flag in the stack.yaml
like that. Good to know.
Can you try cloning the starter kit and it's directory do stack build --flag fltkhs:bundled
?
There's an unfortunate amount of setup involved starting an fltkhs
project which is why I provide the kits. Simply adding fltkhs
as a dependency doesn't work. Wish it did.
Oh! My mistake. I am indeed just inside a new project with an fltkhs
dependency. I'll do it the right way (& I'm sure it will work this time). Will report back in a bit - but thanks!
Ok cool! If that does work, try it with cabal
as you were doing before. Hopefully it should also just work.
An update:
stack build --flag fltkhs:bundled
stack exec fltkhs-light-theme-skeleton
does work, but
cabal new-build --constraint="fltkhs +bundled"
does not seem to find the patched freetype-config
during configure
:
checking for freetype-config... no
Thanks for the update! Not super familiar with the new Cabal workflow, but does it now pull down and build dependencies for you? I would think with Cabal you'd need to install the fltkhs
library as a separate step so that constraint maybe ignored.
new-build
does download and install the package; it's a bit like old-install and old-build at once. Here's the full build log.
But I'm happy using stack
, so feel free to close this issue any time!
Interesting. I appreciate your patience and thanks for the info!
did you try the bundled constraint in the project file? not sure about the command-line syntax.
On Tue, Nov 13, 2018, 17:52 deech <notifications@github.com wrote:
Interesting. I appreciate your patience and thanks for the info!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deech/fltkhs/issues/92#issuecomment-438508041, or mute the thread https://github.com/notifications/unsubscribe-auth/ACNoMY2uY6cTyUGeYwgN_zj51ZB2OLX8ks5uu3dggaJpZM4Yce9j .
@sboosali Yeah, I tried with this cabal.project
as well:
packages: .
package fltkhs
flags: +bundled
Hello! I'm having some difficulty trying out
fltkhs
on my system.fltk
system package is not compatible (Arch currently suppliesfltk-1.3.4
, but this library works with1.4
The
bundled
flag fails to configure the bundled source, because the configure script cannot find libXft:I do have
libXft
installed, but the configure script is usingfreetype-config
, which is no longer provided on Arch linux. From what I can tell it's recommended to usepkg-config freetype2
instead.I suppose my options are...
fltk
to modernize their configure scriptfltkhs-1.4
fltk
manually with--disable-xft
fltkhs-1.4
from nixpkgs, just build everything in anix-shell
Anyways, just thought I'd document this difficulty for anyone else trying to use this library on Arch linux.