Re: [gtk-osx-users] PyGTK on Lion



On Oct 21, 2011, at 12:04 PM, Shrihari Sankaran wrote:

> Hello,
> 
> I'm trying to build and bundle a PyGTK application on my Lion.
> 
> What I've done so far:
> 	• Created a new user called "gtk-ox" and signed into the terminal as that user.
> 	• Downloaded the shell script
> 	• sh gtk-osx-build-setup.sh
> 	• alias jhbuild="PATH=~/.local/bin:$PATH jhbuild"
> 	• jhbuild bootstrap
> 	• jhbuild build meta-gtk-osx-bootstrap
> 	• jhbuild build meta-gtk-osx-core
> All these went fine. Then I performed:
> 	• jhbuild build meta-gtk-osx-python
> At this point, it skipped the first 12 steps. I got this: http://pastebin.com/XrQShjFu
> 
> I went ahead and open the shell.
> 	• jhbuild shell
> 	• cd myapp
> 	• python my_app.py
> Now, I'm getting this error:
> 
> Traceback (most recent call last):
>   File "my_app.py", line 12, in <module>
>     import gtk
>   File "/Users/gtk-osx/gtk/inst/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>
>     from gtk import _gtk
> ImportError: dynamic module does not define init function (init_gtk)
> 
> Any idea what's wrong here?

Yeah, it's a libtool weirdness in the pygtk tarball that interacts badly with something in the 10.7 linker. It got hashed through last week in the forum [1].

Try this:
Edit pygtk-2.24.0/gtk/Makefile to replace "-export-symbols-regex" with "-export_symbol", delete .../gtk/.libs/_gtk.*, and rerun build.

Regards,
John Ralls



[1] https://sourceforge.net/apps/phpbb/gtk-osx/viewtopic.php?f=3&t=72


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]