Skip to content

python2Packages.pygtk: fix build with -fpermissive - #368107

Merged
pbsds merged 1 commit into
NixOS:masterfrom
bryango:python2
Feb 17, 2025
Merged

pbsds merged 1 commit into
NixOS:masterfrom
bryango:python2

Conversation

@bryango

@bryango bryango commented Dec 25, 2024 •

Copy link
Copy Markdown
Member
  • fix build with -fpermissive, previously failing with -Wall
  • adopt the package: add @bryango to maintainers.
P.S. build failure log
python2.7-pygtk> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/nix/store/iml7d74jcxijq03k57pw9lcr4b4csrkb-python-2.7.18.8/include/python2.7 -I/nix/store/iml7d74jcxijq03k57pw9lcr4b4csrkb-python-2.7.18.8/include/python2.7 -I/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include -I/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0 -I/nix/store/rb870mk51kxlxq9crkldzs8n4vwr9sk4-glib-2.82.1/lib/glib-2.0/include -I/nix/store/y2f8mjbk85by3lak018g8aq71g52q91k-python2.7-pygobject-2.28.7/include/pygtk-2.0 -pthread -I/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include -I/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0 -I/nix/store/rb870mk51kxlxq9crkldzs8n4vwr9sk4-glib-2.82.1/lib/glib-2.0/include -I./gtk -I/nix/store/akxwqfa5h9n4giv2zp04m3v4ngabb18j-pango-1.54.0-dev/include/pango-1.0 -I/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include -I/nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0 -I/nix/store/rb870mk51kxlxq9crkldzs8n4vwr9sk4-glib-2.82.1/lib/glib-2.0/include -I/nix/store/9w2ars9rx8k0y48pq9fbmqxypmmfga3q-harfbuzz-10.1.0-dev/include/harfbuzz -g -O2 -Wall -fno-strict-aliasing -std=c9x -c pango.c  -fPIC -DPIC -o .libs/pango_la-pango.o
python2.7-pygtk> In file included from pango.override:27:
python2.7-pygtk> /nix/store/y2f8mjbk85by3lak018g8aq71g52q91k-python2.7-pygobject-2.28.7/include/pygtk-2.0/pygobject.h:153:40: warning: ‘GParameter’ is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
python2.7-pygtk>   153 |                                        GParameter  *params,
python2.7-pygtk>       |                                        ^~~~~~~~~~
python2.7-pygtk> In file included from /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0/gobject/gobject.h:28,
python2.7-pygtk>                  from /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0/gobject/gbinding.h:31,
python2.7-pygtk>                  from /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0/glib-object.h:24,
python2.7-pygtk>                  from /nix/store/y2f8mjbk85by3lak018g8aq71g52q91k-python2.7-pygobject-2.28.7/include/pygtk-2.0/pygobject.h:8:
python2.7-pygtk> /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0/gobject/gparam.h:278:8: note: declared here
python2.7-pygtk>   278 | struct _GParameter /* auxiliary structure for _setv() variants */
python2.7-pygtk>       |        ^~~~~~~~~~~
python2.7-pygtk> /nix/store/y2f8mjbk85by3lak018g8aq71g52q91k-python2.7-pygobject-2.28.7/include/pygtk-2.0/pygobject.h:187:40: warning: ‘GParameter’ is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
python2.7-pygtk>   187 |                                        GParameter *parameters);
python2.7-pygtk>       |                                        ^~~~~~~~~~
python2.7-pygtk> /nix/store/y8fxzs8srzd6d74a85zbpssjr8wkj9q4-glib-2.82.1-dev/include/glib-2.0/gobject/gparam.h:278:8: note: declared here
python2.7-pygtk>   278 | struct _GParameter /* auxiliary structure for _setv() variants */
python2.7-pygtk>       |        ^~~~~~~~~~~
python2.7-pygtk> pango.c: In function ‘_wrap_PangoFont__proxy_do_get_metrics’:
python2.7-pygtk> pango.c:3986:16: error: implicit declaration of function ‘pango_font_metrics_new’; did you mean ‘pango_font_metrics_ref’? [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
python2.7-pygtk>  3986 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk>       |                pango_font_metrics_ref
python2.7-pygtk> pango.c:3986:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  3986 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c:4000:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  4000 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c:4011:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  4011 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c:4021:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  4021 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c: In function ‘_wrap_pango_font_map_get_shape_engine_type’:
python2.7-pygtk> pango.c:4710:11: error: implicit declaration of function ‘pango_font_map_get_shape_engine_type’; did you mean ‘_wrap_pango_font_map_get_shape_engine_type’? [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaration8;;]
python2.7-pygtk>  4710 |     ret = pango_font_map_get_shape_engine_type(PANGO_FONT_MAP(self->obj));
python2.7-pygtk>       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk>       |           _wrap_pango_font_map_get_shape_engine_type
python2.7-pygtk> pango.c:4710:9: error: assignment to ‘const gchar *’ {aka ‘const char *’} from ‘int’ makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  4710 |     ret = pango_font_map_get_shape_engine_type(PANGO_FONT_MAP(self->obj));
python2.7-pygtk>       |         ^
python2.7-pygtk> pango.c: In function ‘_wrap_PangoFontset__proxy_do_get_metrics’:
python2.7-pygtk> pango.c:5382:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  5382 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c:5392:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  5392 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c:5402:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  5402 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~
python2.7-pygtk> pango.c:5411:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
python2.7-pygtk>  5411 |         return pango_font_metrics_new();
python2.7-pygtk>       |                ^~~~~~~~~~~~~~~~~~~~~~~~

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

... and adopt the package: add @bryango to maintainers.
@bryango
bryango requested a review from Aleksanaa December 25, 2024 11:54
@github-actions github-actions Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Dec 25, 2024
@pbsbot

pbsbot commented Feb 17, 2025

Copy link
Copy Markdown

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368107 --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' --package python2Packages.pygtk


x86_64-linux

✅ 2 packages built:
  • python2Packages.pygtk
  • python2Packages.pygtk.dev (python2Packages.pygtk.dev.dev)

@pbsds
pbsds merged commit 5af6359 into NixOS:master Feb 17, 2025
@bryango

bryango commented Feb 17, 2025

Copy link
Copy Markdown
Member Author

Nice! Thank you for picking this up!

@Sigmanificient Sigmanificient mentioned this pull request Mar 8, 2025
27 of 28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants