Thread: [gtk+osx] Compiling Dia with gtk-osx
Status: Beta
Brought to you by:
jralls
From: Lars C. <la...@ra...> - 2005-04-29 17:01:36
|
Hi! I just ran across gtk-osx today. Having wanted to compile Dia for OS X for quite a while, I jumped at the chance. First I tried a simple hello world from the Gtk 1.2 tutorial, and it worked. Trying with Dia 0.90 (ou= r last pre-GTK2 version), I found I had to install gdk-pixbuf first.=20 Getting that (version 0.8.0, I tried ./configure --build=3Dpowerpc-apple-= bsd --ost=3Dpowerpc-apple-bsd --target=3Dpowerpc-apple-bsd (which I'd found somewhere else and helps with poor detection), but had the glib-config test program fail because it tried to use -ldl in its compile (see attached bit of log below). Does anyone have a pointer to what to do about that? Thanks, -Lars configure:2133: checking for GLIB - version >=3D 1.2.0 configure:2232: gcc -o conftest -g -O2 -I/Library/Frameworks/GLib.framework/Head ers conftest.c -F/Library/Frameworks -framework glib -framework glib -ldl 1>&5 ld: can't locate file for: -ldl configure: failed program was: |
From: Andy P. <en...@li...> - 2005-04-29 19:09:46
|
You might try copying config.guess from /usr/local/share/libtool into your Dia project directory (overwriting the one currently there). What seem to be happening is that the linker is looking for libdl.lib, but should instead be looking for libdl.dylib. -Andy Lars Clausen wrote: > Hi! > > I just ran across gtk-osx today. Having wanted to compile Dia for OS X > for quite a while, I jumped at the chance. First I tried a simple hello > world from the Gtk 1.2 tutorial, and it worked. Trying with Dia 0.90 (our > last pre-GTK2 version), I found I had to install gdk-pixbuf first. > Getting that (version 0.8.0, I tried ./configure --build=powerpc-apple-bsd > --ost=powerpc-apple-bsd --target=powerpc-apple-bsd (which I'd found > somewhere else and helps with poor detection), but had the glib-config > test program fail because it tried to use -ldl in its compile (see > attached bit of log below). Does anyone have a pointer to what to do > about that? > > Thanks, > -Lars > > configure:2133: checking for GLIB - version >= 1.2.0 > configure:2232: gcc -o conftest -g -O2 > -I/Library/Frameworks/GLib.framework/Head > ers conftest.c -F/Library/Frameworks -framework glib -framework glib > -ldl 1>&5 > ld: can't locate file for: -ldl > configure: failed program was: |
From: Lars C. <la...@ra...> - 2005-04-29 20:03:59
|
Thanks for the fast reply! On Fri, 2005-04-29 at 12:09 -0700, Andy Prock wrote: > You might try copying config.guess from /usr/local/share/libtool into > your Dia project directory (overwriting the one currently there). Copying that together with config.sub and ltmain.sh does cure the need for specifying host etc. > What seem to be happening is that the linker is looking for libdl.lib, > but should instead be looking for libdl.dylib. This does not seem to be cured, however. Making libdl.lib a symlink to libdl.dylib (for testing) doesn't change a thing, either. I notice, though, that libdl only exists in my /sw (fink) directory. Should it be part of the normal compilation system? -Lars -- Lars Clausen <la...@ra...> |
From: David B. <va...@nt...> - 2005-04-29 21:38:27
|
Lars Clausen wrote: > This does not seem to be cured, however. Making libdl.lib a symlink to > libdl.dylib (for testing) doesn't change a thing, either. I notice, > though, that libdl only exists in my /sw (fink) directory. Should it be > part of the normal compilation system? Which version of OSX are you using? libdl became part of the standard development environment with Panther, before that it was third party. If libdl.dylib is in /sw/lib you'll need to... export LDFLAGS=-L/sw/lib export CPPFLAGS=-I/sw/include before running configure. Dave |
From: Lars C. <la...@ra...> - 2005-04-29 22:21:23
|
On Fri, 2005-04-29 at 22:38 +0100, David Burnett wrote: > Lars Clausen wrote: > > > This does not seem to be cured, however. Making libdl.lib a symlink to > > libdl.dylib (for testing) doesn't change a thing, either. I notice, > > though, that libdl only exists in my /sw (fink) directory. Should it be > > part of the normal compilation system? > > Which version of OSX are you using? libdl became part of the standard > development environment with Panther, before that it was third party. > > > If libdl.dylib is in /sw/lib you'll need to... > > export LDFLAGS=-L/sw/lib > export CPPFLAGS=-I/sw/include > > before running configure. Thanks, that helped. After a bit of cutting out tests I got gdk-pixbuf installed, and can now compile Dia up to the point where it tries to make a dynamic library: (cd . && ln -s polygon.lo polygon.o) (cd . && ln -s beziergon.lo beziergon.o) gcc -bundle -flat_namespace -undefined suppress -o .libs/libstandard_objects.so arc.lo box.lo ellipse.lo textobj.lo line.lo zigzagline.lo polyline.lo bezier.lo standard.lo image.lo polygon.lo beziergon.lo -L/sw/lib -lpng -lz -lc -install_name /usr/local/lib/dia/libstandard_objects.so gcc: -install_name only allowed with -dynamiclib make[3]: *** [libstandard_objects.la] Error 1 The install_name option is not one we set explicitly, but seems to be a libtool thing. I have /usr/bin/libtool as the first in my path. This is much closer than I've gotten before. -Lars -- Lars Clausen <la...@ra...> |
From: Lars C. <la...@ra...> - 2005-04-30 06:43:42
|
Lars Clausen sagde: > On Fri, 2005-04-29 at 22:38 +0100, David Burnett wrote:> (cd . && ln -s polygon.lo polygon.o) > (cd . && ln -s beziergon.lo beziergon.o) > gcc -bundle -flat_namespace -undefined suppress > -o .libs/libstandard_objects.so arc.lo box.lo ellipse.lo textobj.lo > line.lo zigzagline.lo polyline.lo bezier.lo standard.lo image.lo > polygon.lo beziergon.lo -L/sw/lib -lpng -lz -lc > -install_name /usr/local/lib/dia/libstandard_objects.so > gcc: -install_name only allowed with -dynamiclib > make[3]: *** [libstandard_objects.la] Error 1 > > The install_name option is not one we set explicitly, but seems to be a > libtool thing. I have /usr/bin/libtool as the first in my path. Googled for and found a fix, namely running ./configure with --disable-shared and --enable-maintainer-mode (don't know yet if the latter is strictly required). It now compiles (after fixing a couple bad include statements in Dia) but fails at linking. Some of it is apparentl= y that gdk-pixbuf doesn't find its libraries, but there's two gdk_ic_attr_* calls that would appear to be missing from gtk-osx: ld: warning multiple definitions of symbol _locale_charset /sw/lib/libintl.dylib(localcharset.lo) definition of _locale_charset /sw/lib/libiconv.dylib(localcharset.o) definition of _locale_charset ld: Undefined symbols: _gdk_ic_attr_destroy _gdk_ic_attr_new _jpeg_CreateDecompress _jpeg_destroy_decompress _jpeg_finish_decompress _jpeg_read_header _jpeg_read_scanlines _jpeg_resync_to_restart _jpeg_start_decompress _jpeg_std_error _jpeg_stdio_src _TIFFClose _TIFFFdOpen _TIFFGetField _TIFFReadRGBAImage __TIFFfree __TIFFmalloc make[2]: *** [dia] Error 1 Not sure what do do about the locale_charset thing either. I'll see if I can poke gdk-pixbuf into not dying on me, but the gdk_ic things would be up to you. Thanks, -Lars |
From: Andrew R. <awr...@ma...> - 2005-04-30 17:00:06
|
Hi Lars, There is a libdlcompat that can be used with Darwin. It should be available with either DarwinPorts or Fink. Drew On Apr 29, 2005, at 4:42 PM, Lars Clausen wrote: > Hi! > > I just ran across gtk-osx today. Having wanted to compile Dia for OS X > for quite a while, I jumped at the chance. First I tried a simple > hello > world from the Gtk 1.2 tutorial, and it worked. Trying with Dia 0.90 > (our > last pre-GTK2 version), I found I had to install gdk-pixbuf first. > Getting that (version 0.8.0, I tried ./configure > --build=powerpc-apple-bsd > --ost=powerpc-apple-bsd --target=powerpc-apple-bsd (which I'd found > somewhere else and helps with poor detection), but had the glib-config > test program fail because it tried to use -ldl in its compile (see > attached bit of log below). Does anyone have a pointer to what to do > about that? > > Thanks, > -Lars > > configure:2133: checking for GLIB - version >= 1.2.0 > configure:2232: gcc -o conftest -g -O2 > -I/Library/Frameworks/GLib.framework/Head > ers conftest.c -F/Library/Frameworks -framework glib -framework glib > -ldl 1>&5 > ld: can't locate file for: -ldl > configure: failed program was: > |