Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-05-14 Thread James Henstridge

On Mon, 14 May 2001, Christian Robottom Reis wrote:

 On Sun, 13 May 2001 [EMAIL PROTECTED] wrote:

  Christian Skip, I'm having the same problems with gtk+-1.3.5 and the
  Christian latest (CVS) pygtk.
 
  I took the easy way out and or'd in RTLD_GLOBAL to the two dlopen calls at
  the bottom of the .../Python/dynload_shlib.c in the Python source tree.  I
  think James has a better fix in the mix but it requires changes to some
  other Gtk stuff.

 So you mean the fact pygtk is coercing pango to load a .so.la file is a
 result of the RTLD_GLOBAL problem? _That's unusual_.

The gmodule library (a wrapper for various dynamic linker interfaces) in
glib-2.0 is able to load libtool .la files natively.  I guess it tried to
load whatever.so.la as a last resort, and that came out in the error
message.  The problem is to do with incomplete dependency lists for the
pango shaper modules, etc.  Patching python to use RTLD_GLOBAL is a work
around for the problem.


 I've spoken to Owen and he says there will be a fix possibly this week, so
 I'll sit and wait in the meantime.

Well, you know where the bugzilla bug with the patches is if you get
impatient :)

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-05-14 Thread Christian Robottom Reis

On Mon, 14 May 2001, James Henstridge wrote:

  I've spoken to Owen and he says there will be a fix possibly this week, so
  I'll sit and wait in the meantime.

 Well, you know where the bugzilla bug with the patches is if you get
 impatient :)

The problem is the patches aren't against 0.16, and I did start out
applying by hand. However, Owen suggested I wait because other changes he
made were important to pango.

What version of pango did you provide the patches for?

Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-04-17 Thread Skip Montanaro


James This is a known problem or modify python to pass the
James RTLD_GLOBAL flag when dlopen'ing extensions.

James The second option is easier (Red Hat has a patch to do it in
James their python rpms), 

Any pointers to RedHat's RTLD_GLOBAL patch would be appreciated.  I couldn't
find it via their search mechanisms.

Thanks,

-- 
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-04-17 Thread Christian Robottom Reis

On Tue, 17 Apr 2001, Skip Montanaro wrote:

 Any pointers to RedHat's RTLD_GLOBAL patch would be appreciated.  I couldn't
 find it via their search mechanisms.

It's not the correct fix, but anyway.. I guess you know that already. This
was discussed and Guido himself said it was not a reasonable solution.

Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311


--- Python-1.5.2/Python/importdl.c.global   Sat Jul 17 16:52:26 1999
+++ Python-1.5.2/Python/importdl.c  Sat Jul 17 16:53:19 1999
@@ -441,13 +441,13 @@
 #ifdef RTLD_NOW
/* RTLD_NOW: resolve externals now
   (i.e. core dump now if some are missing) */
-   void *handle = dlopen(pathname, RTLD_NOW);
+   void *handle = dlopen(pathname, RTLD_NOW | RTLD_GLOBAL);
 #else
void *handle;
if (Py_VerboseFlag)
printf("dlopen(\"%s\", %d);\n", pathname,
-  RTLD_LAZY);
-   handle = dlopen(pathname, RTLD_LAZY);
+  RTLD_LAZY | RTLD_GLOBAL);
+   handle = dlopen(pathname, RTLD_LAZY | RTLD_GLOBAL);
 #endif /* RTLD_NOW */
if (handle == NULL) {
PyErr_SetString(PyExc_ImportError, dlerror());



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-04-17 Thread James Henstridge

On Tue, 17 Apr 2001, Skip Montanaro wrote:

 
 James This is a known problem or modify python to pass the
 James RTLD_GLOBAL flag when dlopen'ing extensions.
 
 James The second option is easier (Red Hat has a patch to do it in
 James their python rpms), 
 
 Any pointers to RedHat's RTLD_GLOBAL patch would be appreciated.  I couldn't
 find it via their search mechanisms.

Don't have an exact reference (the patch is probably in their source
rpms).  The change is very simple.  Just edit Python/dynload_shlib.c, and
find the call to dlopen close to the bottom of the file.  The second
argument to dlopen() is a set of flags.  You can just or RTLD_GLOBAL
against the flags.  That is, changing the line:
handle = dlopen(pathname, RTLD_NOW);
to:
handle = dlopen(pathname, RTLD_NOW | RTLD_GLOBAL);

(there is no reason to change the second dlopen call, as Linux systems
have the RTLD_NOW flag).

The effect of this is that loaded extension modules can see each other's
symbols (plus the symbols of any other libraries pulled in by shared
library dependencies).  This could potentially cause symbol conflicts, but
in practice doesn't cause problems very often (most extensions only export
a single function -- the initmodulename() function.

I have some patches that fix the dynamic dependencies in glib, pango and
gtk+ (the gtk+ patch still isn't perfect -- the depdendencies for the
gdk-pixbuf modules are not quite right yet).  They make use of
features in libtool-1.3d (a beta release of 1.4).  You can find the
current set of patches attached to this bugzilla bug:
  http://bugzilla.gnome.org/show_bug.cgi?id=50707

At the moment, it is probably easier to patch python rather than 
gtk.  Owen says he doesn't want to switch the official gtk packages to the
newer libtool until libtool-1.4 is released.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-04-12 Thread James Henstridge

On Tue, 3 Apr 2001, Skip Montanaro wrote:

 
 James I just put up a new snapshot of devel pygtk at:
 James   http://www.gnome.org/~james/pygtk2-SNAP-20010330.tar.gz
 
 I managed to get all the prerequisite stuff installed, but can't build the
 pygtk snapshot.  When compiling gtkobject-support.c I get (long lines
 wrapped):

They went and made some changes after my last snapshot, which broke the
pygtk build (as you noticed :)

I put together a new snapshot while at GUADEC, but didn't get round to
announcing it on any mailing lists.  You can grab it from
  http://canvas.gnome.org/~james/pygtk2-SNAP-20010408.tar.gz

It will work fine with the glib/gtk+ 1.3.3 releases (along with whatever
version of pango was released at the time).

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-04-12 Thread Skip Montanaro


James I put together a new snapshot while at GUADEC ...

Thanks very much.  I found it and it installed just fine.

James It will work fine with the glib/gtk+ 1.3.3 releases (along with
James whatever version of pango was released at the time).

I'm having a bit of a problem with pango.  The following simple script gets
a number of GRuntime-CRITICAL errors, then repeatedly tries to open
/usr/local/lib/pango/modules/pango-basic-x.so.la, which fails, finally
terminating with a floating point exception:

import gtk
win = gtk.GtkWindow()
t = gtk.GtkTextView()
win.add(t)
win.connect("destroy", gtk.mainquit)
win.show_all()
gtk.mainloop()

Does it run for you?  If so, I have some config problems.  If not, perhaps
there is something wrong with pango and/or glib and/or libtool.

Thx,

-- 
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-04-02 Thread Skip Montanaro


Brent Actually, they made it quite simple to *avoid* having to know
Brent auto.  Just run ./autogen.sh and it will run generate all the
Brent necessary file for you.

Thanks to Brent and others who pointed out the existence of the autogen.sh
script.  I managed to get glib, pango and pkg-config installed okay, however
the autogen.sh script in the gtk+ directory didn't work.  Executing
autogen.sh there spit out a bunch of ominous messages and removed all
non-directory files from the directory.

Turns out the gettext-devel RPM wasn't installed on my Mandrake system.  I
don't know if I uninstalled it sometime in the dim dark past or if
Mandrake's install process failed to install it.  After installing it,
autogen.sh execution worked fine.

-- 
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-03-31 Thread Roberto J.


--- Skip Montanaro [EMAIL PROTECTED] escreveu:  
 
 I realize the gnome folks are trying to do me a
 favor by making it harder
 for me to build glib, pango and gtk+ so that it is
 correspondingly harder to
 shoot myself in the foot, but I'd like to experiment
 with James's new
 release and find it frustrating that I should need
 to know the ins and outs
 of autoconf and/or automake.  Would someone please
 tell me how to create
 ./configure?  I tried "autoconf" in the glib dir and
 got a configure script,
 but also this error (and a bunch of warnings about
 AC_TRY_RUN):
 
 autoconf: Undefined macros:
 configure.in:201:AC_LIBTOOL_WIN32_DLL
 
 I get the same error when running autoconf on gtk+. 
 No error when running
 in the pango dir, but in all three directories, when
 I run the generated
 configure script I get:
 
 ./configure: line 602: syntax error near
 unexpected token `AM_INIT_AUTOMAKE($PACKAGE,'
 ./configure: line 602:
 `AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)'
 
 Every other package I've ever pulled by CVS that
 uses GNU configure to
 generate config.h has come with a working configure
 script.  Why can't these
 packages?
 
 If it makes any difference, I have autoconf 2.14.1
 and automake 1.4.

HI,

-Try this:

~# ./autogen.sh

~# make

~# make install

-Note that others dependencies could exist, requerided
to build those cvs packages.


s,
roberto




 Roberto J. Teixeira Junior - krivilli
'-'
' http://alsabrazil.sourceforge.net   '
' [EMAIL PROTECTED]   '
'-'

http://www.alsa-project.org


O YAHOO! GEOCITIES CHEGOU AO BRASIL!
Crie sua home page com tudo em portugus - http://br.geocities.com
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-03-31 Thread James Henstridge

On Fri, 30 Mar 2001, Skip Montanaro wrote:

 
 James I just put up a new snapshot of devel pygtk at:
 James   http://www.gnome.org/~james/pygtk2-SNAP-20010330.tar.gz
 
 James It requires python = 2.0 and recent CVS checkouts of glib, pango
 James and gtk+ to compile.  It is not fully up to date with all the API
 James additions/changes, but it compiles and runs.
 
 *sigh*...
 
 I realize the gnome folks are trying to do me a favor by making it harder
 for me to build glib, pango and gtk+ so that it is correspondingly harder to
 shoot myself in the foot, but I'd like to experiment with James's new
 release and find it frustrating that I should need to know the ins and outs
 of autoconf and/or automake.  Would someone please tell me how to create
 ./configure?  I tried "autoconf" in the glib dir and got a configure script,
 but also this error (and a bunch of warnings about AC_TRY_RUN):

I have never tried building gtk on win32, so probably won't be able to
help that much.  From posts to gtk-devel-list, it sounds like you need CVS
libtool in order to compile it on win32.  I don't know about the other
details.

It probably has build problems on x11 too, because the gtk-2.0.m4 autoconf
macro I was using is broken (it uses gtk-config-2.0 macro, which doesn't
exist anymore -- there is a bug in bugzilla about this).

As far as pygtk goes, you probably want to use the snapshot tarball,
rather than CVS, as the tarball is built with the CVS version of automake
(needed for python support).

James.

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] new pygtk for gtk 2.0 snapshot

2001-03-30 Thread James Henstridge

I just put up a new snapshot of devel pygtk at:
  http://www.gnome.org/~james/pygtk2-SNAP-20010330.tar.gz

It requires python = 2.0 and recent CVS checkouts of glib, pango and gtk+
to compile.  It is not fully up to date with all the API 
additions/changes, but it compiles and runs.

This release also has support for creating new signals, complete with a
class closure.  See examples/gobject/signal.py for an example:
  http://cvs.gnome.org/lxr/source/gnome-python/pygtk/examples/gobject/signal.py

Currently you can only use it to add signals to existing GTypes.  Creating
new GTypes is not currently supported due to some required glib APIs not
having been implemented yet.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] new pygtk for gtk 2.0 snapshot

2001-03-30 Thread Skip Montanaro


James I just put up a new snapshot of devel pygtk at:
James   http://www.gnome.org/~james/pygtk2-SNAP-20010330.tar.gz

James It requires python = 2.0 and recent CVS checkouts of glib, pango
James and gtk+ to compile.  It is not fully up to date with all the API
James additions/changes, but it compiles and runs.

*sigh*...

I realize the gnome folks are trying to do me a favor by making it harder
for me to build glib, pango and gtk+ so that it is correspondingly harder to
shoot myself in the foot, but I'd like to experiment with James's new
release and find it frustrating that I should need to know the ins and outs
of autoconf and/or automake.  Would someone please tell me how to create
./configure?  I tried "autoconf" in the glib dir and got a configure script,
but also this error (and a bunch of warnings about AC_TRY_RUN):

autoconf: Undefined macros:
configure.in:201:AC_LIBTOOL_WIN32_DLL

I get the same error when running autoconf on gtk+.  No error when running
in the pango dir, but in all three directories, when I run the generated
configure script I get:

./configure: line 602: syntax error near unexpected token 
`AM_INIT_AUTOMAKE($PACKAGE,'
./configure: line 602: `AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)'

Every other package I've ever pulled by CVS that uses GNU configure to
generate config.h has come with a working configure script.  Why can't these
packages?

If it makes any difference, I have autoconf 2.14.1 and automake 1.4.

Thanks,

-- 
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk