After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698989 - gmmproc fails when building glibmm, gtkmm, etc
gmmproc fails when building glibmm, gtkmm, etc
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: build
2.36.x
Other Mac OS
: Normal major
: ---
Assigned To: gtkmm-forge
gtkmm-forge
: 699174 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-04-26 18:36 UTC by David Evans
Modified: 2013-04-29 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output.pm: convert_args_c_to_cpp(): Reverse mappings hash another way. (1.49 KB, patch)
2013-04-26 21:27 UTC, José Alburquerque
none Details | Review
modified patch (856 bytes, patch)
2013-04-26 23:24 UTC, David Evans
none Details | Review
Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly. (2.23 KB, patch)
2013-04-28 04:39 UTC, José Alburquerque
none Details | Review
Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly. (1.28 KB, patch)
2013-04-28 21:12 UTC, José Alburquerque
committed Details | Review

Description David Evans 2013-04-26 18:36:31 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.
Comment 1 José Alburquerque 2013-04-26 21:27:56 UTC
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?
Comment 2 David Evans 2013-04-26 21:53:47 UTC
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.
Comment 3 David Evans 2013-04-26 23:24:04 UTC
Created attachment 242630 [details] [review]
modified patch

This modified version of the patch works for me both for glibmm and gtkmm.
Comment 4 José Alburquerque 2013-04-28 04:39:46 UTC
Created attachment 242697 [details] [review]
Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly.

Thanks.  Does this patch work also?
Comment 5 David Evans 2013-04-28 06:51:46 UTC
Yes, it does.
Comment 6 José Alburquerque 2013-04-28 20:51:33 UTC
*** Bug 699174 has been marked as a duplicate of this bug. ***
Comment 7 José Alburquerque 2013-04-28 21:12:14 UTC
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 8 John Ralls 2013-04-28 22:21:29 UTC
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.
Comment 9 David Evans 2013-04-29 00:15:30 UTC
Works for me as well.  Do we have a winner?
Comment 10 José Alburquerque 2013-04-29 21:50:25 UTC
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.