GNOME Bugzilla – Bug 698989
gmmproc fails when building glibmm, gtkmm, etc
Last modified: 2013-04-29 21:50:46 UTC
When building glibmm using autogen.sh, gmmproc fails as follows: :info:build Making all in glib/src :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_devel_glibmm/glibmm/work/glibmm-2.36.0/glib/src' :info:build /opt/local/bin/gmkdir -p .stamps :info:build /opt/local/bin/perl -- ../../tools/generate_wrap_init.pl --namespace=Glib --parent_dir=glibmm ./balancedtree.hg ./bytes.hg ./bytearray.hg ./checksum.hg ./convert.hg ./date.hg ./datetime.hg ./fileutils.hg ./iochannel.hg ./keyfile.hg ./markup.hg ./module.hg ./nodetree.hg ./optioncontext.hg ./optionentry.hg ./optiongroup.hg ./regex.hg ./shell.hg ./spawn.hg ./thread.hg ./threads.hg ./timezone.hg ./unicode.hg ./uriutils.hg ./valuearray.hg ./variant.hg ./variantiter.hg ./varianttype.hg >../glibmm/wrap_init.cc :info:build /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . balancedtree . ../glibmm :info:build /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . bytearray . ../glibmm :info:build /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . bytes . ../glibmm :info:build /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . checksum . ../glibmm :info:build Type of arg 1 to values must be hash or array (not hash element) at ../../tools/pm/Output.pm line 1171, near "}}" :info:build Type of arg 1 to keys must be hash or array (not hash element) at ../../tools/pm/Output.pm line 1172, near "};" :info:build Compilation failed in require at ../../tools/gmmproc line 56. Similar results occur when compiling gtkmm, etc Building using MacPorts on Mac OS X 10.8.3, perl version 5.12.4, glibmm 2.36.0 gmmproc succeeds without error if using glibmm 2.34.1.
Created attachment 242627 [details] [review] Output.pm: convert_args_c_to_cpp(): Reverse mappings hash another way. It seems that there is a Perl compatibility issue (I have 5.14.2 and gmmproc runs fine with that version). Would you be able to test this patch and see if it makes a difference?
Applied patch. New error is as follows: Making all in glib/src make[2]: Entering directory `/opt/local/var/macports/build/_opt_macports_trunk_dports_devel_glibmm/glibmm/work/glibmm-2.36.0/glib/src' /opt/local/bin/gmkdir -p .stamps /opt/local/bin/perl -- ../../tools/generate_wrap_init.pl --namespace=Glib --parent_dir=glibmm ./balancedtree.hg ./bytes.hg ./bytearray.hg ./checksum.hg ./convert.hg ./date.hg ./datetime.hg ./fileutils.hg ./iochannel.hg ./keyfile.hg ./markup.hg ./module.hg ./nodetree.hg ./optioncontext.hg ./optionentry.hg ./optiongroup.hg ./regex.hg ./shell.hg ./spawn.hg ./thread.hg ./threads.hg ./timezone.hg ./unicode.hg ./uriutils.hg ./valuearray.hg ./variant.hg ./variantiter.hg ./varianttype.hg >../glibmm/wrap_init.cc /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . balancedtree . ../glibmm /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . bytearray . ../glibmm /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . bytes . ../glibmm /opt/local/bin/perl -I../../tools/pm -- ../../tools/gmmproc -I ../../tools/m4 --defs . checksum . ../glibmm Type of arg 1 to each must be hash or array (not private variable) at ../../tools/pm/Output.pm line 1175, near "$c_param_mappings) " Compilation failed in require at ../../tools/gmmproc line 56.
Created attachment 242630 [details] [review] modified patch This modified version of the patch works for me both for glibmm and gtkmm.
Created attachment 242697 [details] [review] Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly. Thanks. Does this patch work also?
Yes, it does.
*** Bug 699174 has been marked as a duplicate of this bug. ***
Created attachment 242751 [details] [review] Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly. Apparently the patches don't really fix this issue because now the latest sources don't build with the patches. With this patch the latest sources do build correctly. Does this patch work correctly in your systems?
Comment on attachment 242751 [details] [review] Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly. Yes, that does it, though the semantic difference between this patch and the previous one utterly eludes me. My perl must be getting rusty.
Works for me as well. Do we have a winner?
It looks like this last patch fixes the issues (though, of course I don't claim to be a Perl expert by any means). I've pushed the patch to the master and 2.36 branches. A new glibmm-2.36.1 is also available.