Should be from pkg-config path, make sure your PKG_CONFIG_PATH is set
to include /Library/Frameworks/{GLib,Gtk,Cairo}.framework
Also, I had a problem where it couldn't find libpng -- I had to add /
usr/X11/lib/pkgconfig to my pkg-config path.
-Ross
On Mar 21, 2009, at 5:02 PM, Colin Adams wrote:
And the reason is that librsvg fails to find cairo, pangocairo and
cairo-png.
Where is it supposed to find them?
2009/3/21 Colin Adams <[email protected]>:
It didn't.
2009/3/21 Ross Mellgren <[email protected]>:
Did the configure for gtk2hs claim that it was going to build
svgcairo? If
something is wrong with the librsvg install, it won't.
-Ross
On Mar 21, 2009, at 4:49 PM, Colin Adams wrote:
OK - I added the --with-user-pkginfo flag.
It nearly all works now - but still no svgcairo - ./configure
doesn't find
it.
2009/3/21 Ross Mellgren <[email protected]>:
(back to the list)
Answers inline:
On Mar 21, 2009, at 2:42 PM, Colin Adams wrote:
Yes, that was the problem, and swapping the PATH order does the
trick.
Thanks.
no prob.
I must still have the macports stuff installed. Can you tell me
how to
get rid of it?
if you really want to get rid of it I believe you just have to
rm -rf
/opt/local and remove any initialization hooks for /opt/local
out of
/etc/profile and ~/.bash_profile
However I still can't install my program - I get missing
dependencies
for gtk glib cairo and svgcairo.
I'm not really that savvy with the package registration magics
-- on my
system after doing sudo make install for gtk2hs, I get the
packages
properly
registered. You can check the registered packages with ghc-pkg
list. It
could be that the package is registered local for your user, but
the
cabal
install line you're using for the application includes --global
(or your
cabal configuration) so it won't look in the user config.
I think Duncan answered some questions about this same problem
recently,
though I don't have a mailing list reference.
I tried some of the gtk2hs demos - they work, but, for
instance, the
actionmenu demo does not put the menus up at the top of the
screen, so
it doesn't look like the framework integration has worked.
Even with the integration everything is still GTK-ish. There's a
separate
framework that comes with the .dmg called ige-mac-integration
that allows
applications to meld with the mac environment better, but no
gtk2hs
bindings
for this exist at the moment. Bindings would have to be created,
and then
you'd have to modify the application to make use of them
(presumably with
CPP or similar switch to control whether you want mac support,
or just
plain
GTK)
-Ross
2009/3/21 Ross Mellgren <[email protected]>:
I think there must be a version inconsistency with your GLib
framework
--
either not the most recent copy of the GTK+ DMG, or your path is
flipped
around and you're using a ports version.
Run glib-mkenums --version to see what version you have... I
have
r...@hugo:~/tmpgtk/GLib.framework/Resources/dev/bin$ ./glib-
mkenums
--version
glib-mkenums version glib-2.18.1
glib-mkenums comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of glib-mkenums under the terms of
the GNU General Public License which can be found in the
GLib source package. Sources, examples and contact
information are available at http://www.gtk.org
Particularly, the error you're getting is because your version
of
glib-mkenums doesn't expand @ENUMPREFIX@ -- if I run glib-
mkenums with
no
arguments, my version reports @ENUMPREFIX@ as a valid
subtitution:
r...@hugo:~/tmpgtk/GLib.framework/Resources/dev/bin$ ./glib-
mkenums
Usage: glib-mkenums [options] [files...]
--fhead <text> output file header
--fprod <text> per input file production
--ftail <text> output file trailer
--eprod <text> per enum text (produced prior to
value
itarations)
--vhead <text> value header, produced before
iterating
over
enum values
--vprod <text> value text, produced for each enum
value
--vtail <text> value tail, produced after
iterating over
enum
values
--comments <text> comment structure
--template file template file
-h, --help show this help message
-v, --version print version informations
Production text substitutions:
@EnumName@ PrefixTheXEnum
@enum_name@ prefix_the_xenum
@ENUMNAME@ PREFIX_THE_XENUM
@ENUMSHORT@ THE_XENUM
@ENUMPREFIX@ PREFIX
@VALUENAME@ PREFIX_THE_XVALUE
@valuenick@ the-xvalue
@type@ either enum or flags
@Type@ either Enum or Flags
@TYPE@ either ENUM or FLAGS
@filename@ name of current input file
Does yours?
You might try moving
/Library/Frameworks/GLib.framework/Resources/dev/bin
to
the front of your path before make'ing pango --
cd pango-1.24.0
export PATH=/Library/Frameworks/GLib.framework/Resources/dev/
bin:$PATH
make
Hope this helps,
-Ross
On Mar 21, 2009, at 1:52 PM, Colin Adams wrote:
Attached.
2009/3/21 Ross Mellgren <[email protected]>:
(taking this off list, to avoid noise)
Could you attach pango-1.24.0/pango/pango-enum-types.h?
Something
hokey
is
going on -- this file is shipped with pango-1.24.0 but may be
overwritten
if
your glib-mkenums does it differently. In any case, since it's
(possibly)
machine generated I would have to see what's going on at
those lines
to
make
progress.
Also, if you could cd pango-1.24.0/pango, and run:
gcc -E -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Pango\"
-DPANGO_ENABLE_BACKEND -DPANGO_ENABLE_ENGINE
-DSYSCONFDIR=\"/usr/local/etc\"
-DLIBDIR=\"/usr/local/lib\" -I.. -DG_DISABLE_CAST_CHECKS
-I/Library/Frameworks/GLib.framework/Headers
-I/Library/Frameworks/Cairo.framework/Headers -I/usr/X11/
include
-DFC_WEIGHT_EXTRABLACK=215 -Wall -MT fonts.lo -MD -MP -MF
.deps/fonts.Tpo
-c -o fonts.i fonts.c
and attach fonts.i, that might shed more light. However,
since the
error
you're getting is a preprocessor one, gcc -E may fail as well.
-Ross
On Mar 21, 2009, at 1:37 PM, Colin Adams wrote:
In file included from ../pango/pango.h:31,
from pango-impl-utils.h:28,
from fonts.c:30:
../pango/pango-enum-types.h:12:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:14:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:17:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:19:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:22:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:25:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:27:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:29:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:31:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:33:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:36:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:38:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:41:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:43:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:45:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:48:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:51:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:54:9: error: macro names must be
identifiers
In file included from ../pango/pango.h:31,
from pango-impl-utils.h:28,
from glyphstring.c:26:
../pango/pango-enum-types.h:12:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:14:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:17:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:19:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:22:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:25:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:27:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:29:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:31:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:33:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:36:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:38:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:41:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:43:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:45:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:48:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:51:9: error: macro names must be
identifiers
../pango/pango-enum-types.h:54:9: error: macro names must be
identifiers
2009/3/21 Ross Mellgren <[email protected]>:
I didn't get any errors like that (nor do I remember ever
having
them),
though if you want to paste them here maybe I can help
with them.
-Ross
On Mar 21, 2009, at 1:27 PM, Colin Adams wrote:
If I try this, pango fails to compile with lots of error
messages
about error: macro names must be identifiers.
I think I've seen this before - some well-known Mac OSX
problem?
(I'm
a linux man myself - so I'm not used to the mac)
2009/3/21 Ross Mellgren <[email protected]>:
I tried making this work, but librsvg requires pango,
and pango
is
a
huge
pain in the ass -- I managed to get the whole thing to
compile,
but
now
it
can't find any fonts, apparently due to some dynaloading
issues.
I think if you need any of the extended modules (e.g.
svgcairo,
gl)
that
the
DMG doesn't directly support then you're best served by
shedding
a
couple
tears and going with macports.
The steps I used to get the broken version were (FYI --
doing
this
causes
all fonts to load as the no-character square in all
gtk2hs apps):
export
PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/lib/
pkgconfig:/Library/Frameworks/Cairo.framework/Resources/
dev/lib/pkgconfig:/Library/Frameworks/GLib.framework/
Resources/dev/lib/pkgconfig:/Library/Frameworks/
Gtk.framework/Resources/dev/lib/pkgconfig
export
PATH=$PATH:/Library/Frameworks/GLib.framework/Resources/
dev/bin
cd pango-1.24.0
CFLAGS="-DFC_WEIGHT_EXTRABLACK=215" ./configure
--prefix=/usr/local
make -j4
sudo make install
cd librsvg-2.26.0
./configure --prefix=/usr/local
make -j4
sudo make install
cd gtk2hs-0.10.0
./configure --disable-gio
make -j4
sudo make install
Running apps linked with this version of gtk2hs gets:
(svgviewer:43314): Pango-CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
'/usr/local/etc/pango/pango.modules'
You should create this file by running:
pango-querymodules > '/usr/local/etc/pango/pango.modules'
(svgviewer:43314): Pango-WARNING **: failed to choose a
font,
expect
ugly
output. engine-type='PangoRenderATSUI', script='latin'
So if anyone knows what Pango is trying to do, maybe
they could
help
resolve
this.
I'm probably going to ditch the use of GTK in my own
project and
use
FFI
bindings to Carbon/Win32, since I don't really need
widgets for
my
own
stuff
and the whole family of GTK related packages is a total
pain in
the
ass
(as
are most things in the GNU family of software, IMO)
-Ross
On Mar 21, 2009, at 10:13 AM, Colin Paul Adams wrote:
"Ross" == Ross Mellgren <[email protected]>
writes:
Ross> While there is not a .dmg for Gtk2Hs, you can
use a .dmg
Ross> installed GHC with a .dmg installed Gtk, and
then build
Ross> gtk2hs straight on top of that, without having
to deal
with
Ross> the dual-GHC macports mess..
Ross>
http://www.haskell.org/haskellwiki/Gtk2hs#Using_the_GTK.2B_OS_X_Framework
I just tried this.
The configure enables cairo, but does not enable
svgcairo. Is
there
anyway round this, or do I have to revert to the
macports gtk?
(my
application uses svgcairo)
--
Colin Adams
Preston Lancashire
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe
<pango-enum-types.h>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe