Opened 20 years ago

Closed 19 years ago

#3114 closed defect (fixed)

UPDATE: py-gtk2

Reported by: yves@… Owned by: yves@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: jmpp@…, dboitnot@…
Port:

Description

Current version failed on 10.4, so here is v. 2.6.2

Does not seem to have a maintainer, so I am willing to take it

this should resolve bugs 2974, 2680 and 3036, or at least make them obsolete.

Attachments (3)

Portfile (1.1 KB) - added by yves@… 20 years ago.
Portfile
Portfile.diff (951 bytes) - added by jmpp@… 20 years ago.
dports/python/py-gtk2/Portfile.diff
py-gtk2-errors (45.9 KB) - added by anita@… 20 years ago.
Log of py-gtk2 build -vd

Download all attachments as: .zip

Change History (16)

Changed 20 years ago by yves@…

Attachment: Portfile added

Portfile

comment:1 Changed 20 years ago by jmpp@…

Owner: changed from darwinports-bugs@… to yves@…

Hi Yves! A couple of comments on your proposed Portfile:

-) First, I reset maintainership to you, since you're stepping up (great!); -) revision 0 is the default, so no need to put it in explicitly; -) I changed the dep line "path:${prefix}/bin/python:python24" to the new "port:python24" dep spec, since we're looking for something which, if under ${prefix}, should be installed by DarwinPorts to begin with.

Please try my new Portfile and tell me how it goes, I can commit it for you when ready. Ohh, and one last thing: it's easier to handle diffs, not full new files... ;-) Changes proposed as a diff to the current revision of the Portfile in CVS.

Thanks for your efforts!

-jmpp

Changed 20 years ago by jmpp@…

Attachment: Portfile.diff added

dports/python/py-gtk2/Portfile.diff

comment:2 Changed 20 years ago by jmpp@…

attachments.isobsolete: 01

comment:3 Changed 20 years ago by jmpp@…

One last thing Yves: upon approval of the new Portfile, please also confirm the bugs you mentioned in your original comment are properly corrected/deprecated with. I don't see why you can't close them if the are. Thanks again!

-jmpp

comment:4 Changed 20 years ago by yves@…

Your diff works great, thanks

I'll check the other bugs once the new version is online since I can't reproduce them

comment:5 Changed 20 years ago by anita@…

(In reply to comment #5)

Your diff works great, thanks

I'll check the other bugs once the new version is online since I can't reproduce them

The diff hasn't fixed my inability to build py-gtk2 :(

I'm running OS10.4 , up-to-date pythong build, I've patched the portfile and it's failing with this set of errors:

---> Building py-gtk2 with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_python_py-gtk2/ work/pygtk-2.4.1" && make all" returned error 2 Command output: Could not write function binding_entry_clear: No ArgType for 'GtkBindingSet*' Could not write function gtk_binding_entry_add_signall: No ArgType for 'GtkBindingSet*' Could not write function binding_entry_add_signall: No ArgType for 'GtkBindingSet*' Could not write function binding_parse_binding: No ArgType for 'GScanner*' Could not write function color_selection_set_change_palette_hook: No ArgType for 'GtkColorSelectionChangePaletteFunc' Could not write function color_selection_set_change_palette_with_screen_hook: No ArgType for 'GtkColorSelectionChangePaletteWithScreenFunc' Could not write function file_paths_sort: No ArgType for 'GSList*' Could not write function item_factory_popup_data_from_widget: No ArgType for 'gpointer' Could not write function init_add: No ArgType for 'GtkFunction' Could not write function get_current_event_state: No ArgType for 'GdkModifierType*' Could not write function settings_install_property: No ArgType for 'GParamSpec*' Could not write function settings_install_property_parser: No ArgType for 'GParamSpec*' Could not write function stock_add_static: No ArgType for 'const-GtkStockItem*' Could not write function widget_class_find_style_property: No ArgType for 'GtkWidgetClass*' if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gobject -I/Library/ Frameworks/Python.framework/Versions/2.4/include/python2.4 -DXTHREADS -I/opt/local/include/ gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/pango-1.0 -I/opt/local/include -I/opt/local/include/freetype2 -I/usr/X11R6/include -I/opt/local/include/ glib-2.0 -I/opt/local/lib/glib-2.0/include -g -O2 -Wall -std=c9x -fno-strict-aliasing -MT _gtk_la- gtk.lo -MD -MP -MF ".deps/_gtk_la-gtk.Tpo" \

-c -o _gtk_la-gtk.lo test -f 'gtk.c' || echo './'gtk.c; \

then mv -f ".deps/_gtk_la-gtk.Tpo" ".deps/_gtk_la-gtk.Plo"; \ else rm -f ".deps/_gtk_la-gtk.Tpo"; exit 1; \ fi

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gobject -I/Library/Frameworks/Python.framework/Versions/2.4/

include/python2.4 -DXTHREADS -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/ local/include/atk-1.0 -I/opt/local/include/pango-1.0 -I/opt/local/include -I/opt/local/include/ freetype2 -I/usr/X11R6/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -g -O2 -Wall -std=c9x -fno-strict-aliasing -MT _gtk_la-gtk.lo -MD -MP -MF .deps/_gtk_la-gtk.Tpo -c gtk.c - fno-common -DPIC -o .libs/_gtk_la-gtk.o gtk.override: In function '_wrap_gtk_selection_data_get_text': gtk.override:405: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness gtk.override:405: warning: pointer targets in passing argument 1 of 'PyUnicodeUCS2_DecodeUTF8' differ in signedness gtk.override: In function '_wrap_gtk_selection_dataget_data': gtk.override:366: warning: pointer targets in passing argument 1 of 'PyString_FromStringAndSize' differ in signedness gtktreeview.override: In function '_wrap_gtk_tree_model_foreach': gtktreeview.override:1941: error: invalid storage class for function 'pygtk_tree_foreach_marshal' make[2]: * [_gtk_la-gtk.lo] Error 1 make[1]: * [all-recursive] Error 1 make: * [all] Error 2

comment:6 Changed 20 years ago by yves@…

Could you include a full build -vd output from the start ?

Changed 20 years ago by anita@…

Attachment: py-gtk2-errors added

Log of py-gtk2 build -vd

comment:7 Changed 19 years ago by vaughan@…

bug is caused by GCC 4.0 disallowing declaration of static functions inside other functions. There are a couple of offenders in gtk.c and gdk.c. Removing the 'static' from the function type fixes the problem and py-gtk2 builds OK.

comment:8 Changed 19 years ago by dboitnot@…

Cc: dboitnot@… added

comment:9 Changed 19 years ago by dboitnot@…

(In reply to comment #9)

bug is caused by GCC 4.0...

I got around this by temporarily pointing the gcc link at gcc-3: <br/> <pre> $ cd /usr/bin $ ls -l gcc* lrwxr-xr-x 1 root wheel 7 Jun 1 08:32 gcc -> gcc-4.0 -r-xr-xr-x 1 root wheel 135076 Mar 20 14:59 gcc-3.3 -rwxr-xr-x 1 root wheel 39524 Mar 20 14:56 gcc-4.0 $ sudo rm -f gcc $ sudo ln -s gcc-3.3 gcc $ port install py-gtk2 ... $ sudo rm -f gcc $ sudo ln -s gcc-4.0 gcc </pre>

comment:10 Changed 19 years ago by yves@…

Sorry for being so long to step in

First, if tou need to switch gcc version, use "gcc_select" instead of manually changing links (safe and fast) ex :

sudo gcc_select 3.1 do your stuff sudo gcc_select 4.0

Second, the Portfile is patched, but you still build the old version :

DEBUG: Executing com.apple.extract (py-gtk2) ---> Extracting pygtk-2.4.1.tar.bz2

It is most probable that a commit would fix the problem but I lack the authority

comment:11 Changed 19 years ago by anita@…

Perfect!!

Many thanks,

Anita

Macintosh:~ anita$ sudo gcc_select 3.3 Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1809) Macintosh:~ anita$ sudo port install py-gtk2 ---> Building py-gtk2 with target all ---> Staging py-gtk2 into destroot ---> Packaging tgz archive for py-gtk2 2.4.1_1 ---> Installing py-gtk2 2.4.1_1 ---> Activating py-gtk2 2.4.1_1 ---> Cleaning py-gtk2

comment:12 Changed 19 years ago by yves@…

Cc: jmpp@… added
Owner: changed from yves@… to yves@…

Ready for commit ?

comment:13 Changed 19 years ago by yves@…

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.