osx install fail

erik flister erik.flister at gmail.com
Thu Jul 23 18:09:08 EDT 2009


macbook pro intel, osx 10.5.7

using the .dmg gets as far as launching the start dialog that lets you
select haskell source directories.  after that it dies, and subsequent
attempts to launch just die (icon bounces in doc for a while, then
disappears).

so, i tried to build using cabal.  my first hurdle was figuring out
that one needs ige-mac-integration from macports.  this requires
installing gtk2 and cairo with the +no_x11 +quartz variants.

however, cabal won't see ige-mac-integration for some reason, and has
to be run with
--extra-include-dirs=/opt/local/include/igemacintegration
--extra-lib-dirs=/opt/local/lib

then, cabal fails with:
src/IDE/Leksah.hs:37:7-13:
    Could not find module `IDE.OSX':

and indeed, if you unpack
~/.cabal/packages/hackage.haskell.org/leksah/0.6.1/leksah-0.6.1.tar.gz
there is no OSX.hs in src/IDE/

however, that file is present here: http://code.haskell.org/leksah/src/IDE/

after copying that in, one has to manually install from inside the
unpacked leksah dir:
runhaskell Setup configure --user
--extra-include-dirs=/opt/local/include/igemacintegration
--extra-lib-dirs=/opt/local/lib

without including --user, it claims not to see the installs of binary
and utf8-string, which were installed by my previous failed call to
cabal install (where i did NOT use --user, but those libraries are in
~/.cabal/lib).  i would rather do a global install, but don't know
how.

runhaskell Setup build compiles 56/56 modules OK, but then a linker failure:
ld: library not found for -lgtk-x11-2.0

gtk2 in macports has libgtk-x11-2.0, but it is deactivated in favor of
libgtk-quartz-2.0 by the +no_x11 variant.  so i went back and switched
the variants of cairo and gtk2.  this allowed the build to succeed,
but still gave the linker warnings:
ld warning: atom sorting error for
_ghczm6zi10zi3_LibFFI_Czuffizutype_closure_tbl and
_ghczm6zi10zi3_LibFFI_Czuffizucif_closure_tbl in
/opt/local/lib/ghc-6.10.3/ghc-6.10.3/libHSghc-6.10.3.a(LibFFI.o)
ld warning: atom sorting error for
_ghczm6zi10zi3_LibFFI_Czuffizutype_closure_tbl and
_ghczm6zi10zi3_LibFFI_Czuffizucif_closure_tbl in
/opt/local/lib/ghc-6.10.3/ghc-6.10.3/libHSghc-6.10.3.a(LibFFI.o)

runhaskell Setup install worked fine.  but then of course trying to
run gives you:
dyld: Library not loaded: /opt/local/lib/libgtk-quartz-2.0.0.dylib
  Referenced from: /opt/local/lib/libigemacintegration.0.dylib
  Reason: image not found
Trace/BPT trap

setting the variants back to quartz WITHOUT rebuilding gives:
dyld: Library not loaded: /opt/local/lib/libgtk-x11-2.0.0.dylib
  Referenced from: /Users/eflister/.cabal/bin/leksah
  Reason: image not found
Trace/BPT trap

i thought the following trick would work for injecting the deactivated library:
sudo env DYLD_INSERT_LIBRARIES="/opt/local/var/macports/software/gtk2/2.16.3_0+x11/opt/local/lib/libgtk-x11-2.0.0.dylib"
leksah

but that gives:
env: leksah: No such file or directory

which is not true.  finally i tried being very naughty and copying
libgtk-x11 and libgdk-x11 dylibs into opt/local/lib, and that did
allow leksah to try to launch.  it got as far as the following and
then freezes beyond the reaches of ctrl-c (processors stay spinning at
about 50%):
Xlib:  extension "RANDR" missing on display "/tmp/launch-5AuDM7/:0".
Now updating metadata ...
Metadata collector has nothing to do
Now loading metadata ...
Finished loading ...
File does not exist /home/jutaro/Develop/leksah/data/welcome.txt

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkObject'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkBuildable'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkBuildable'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed

** (leksah:81633): CRITICAL **: ige_mac_menu_set_menu_bar: assertion
`GTK_IS_MENU_SHELL (menu_shell)' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkObject'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkBuildable'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkBuildable'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed

(leksah:81633): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkBuildable'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-GObject-WARNING **: cannot register existing type
`GtkActivatable'

(leksah:81633): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(leksah:81633): GLib-CRITICAL **: g_once_init_leave: assertion
`initialization_value != 0' failed

** (leksah:81633): CRITICAL **: ige_mac_menu_set_quit_menu_item:
assertion `GTK_IS_MENU_ITEM (menu_item)' failed

-erik



More information about the Leksah mailing list