@micwoj92 Ah, thank you, I understand. I will look into fixing that.
Search Criteria
Package Details: pygtk 2.24.0-13
Package Actions
Git Clone URL: | https://aur.archlinux.org/pygtk.git (read-only, click to copy) |
---|---|
Package Base: | pygtk |
Description: | Python bindings for the GTK widget set |
Upstream URL: | https://wiki.gnome.org/Projects/PyGTK |
Keywords: | GTK Python widget |
Licenses: | LGPL-2.1-or-later |
Submitter: | arojas |
Maintainer: | creyon |
Last Packager: | creyon |
Votes: | 76 |
Popularity: | 1.43 |
First Submitted: | 2020-03-29 19:09 (UTC) |
Last Updated: | 2024-05-19 22:59 (UTC) |
Dependencies (4)
- python2-cairoAUR
- python2-gobject2AUR
- libgladeAUR (optional)
- python2-numpyAUR (optional)
Required by (122)
- anamnesis
- audiotools (optional)
- audiotools-git (optional)
- batti
- bmpanel2 (optional)
- bsp
- bubbros (optional)
- casetta
- catfish-python2 (make)
- ceemedia
- claws-mail-gtk2-git (make)
- claws-mail-protectedheaders-git (make)
- comix
- comix (make)
- compiz-boxmenu
- configui-git
- coot
- coot-git
- covergloobus
- covergloobus-bzr
- Show 102 more...
Sources (4)
creyon commented on 2024-05-30 15:11 (UTC)
micwoj92 commented on 2024-05-28 18:47 (UTC)
This is because in order for the to become "optdepends" they need to be present at compile time.
If you compile pygtk, then install libglade and/or python2-numpy you will not get anything extra and will have to recompile pygtk. This is not how software is packaged for Arch Linux.
creyon commented on 2024-05-26 20:34 (UTC)
@patlefort I'm not sure I understand. The README on the PyGTK archive repo lists gtk2
, libglade
and numpy
as optional dependencies, and the package compiles without any of them installed.
gtk2
is indeed missing entirely, so I should at least add that to optdepends, but I'm wondering what you mean by "required at compile time". In what way are they required?
--- https://gitlab.gnome.org/Archive/pygtk/-/blob/master/README
Requirements
- C compiler (GCC, MSVC and mingw supported)
- Python 2.3.5 or higher
- PyGObject 2.21.3 or higher
- Pycairo 1.0.2 or higher
- Glib 2.8.0 or higher
- GTK+ 2.8.0 or higher (optional) or GTK+ 2.10.0 or higher for 2.10 API [...] GTK+ 2.22.0 or higher for 2.22 API GTK+ 2.24.0 or higher for 2.24 API
- libglade 2.5.0 or higher (optional)
- pycairo 1.0.2 or higher (optional)
- numpy (optional)
patlefort commented on 2024-05-25 20:11 (UTC)
Missing gtk2 in dependencies. Also both optdepends shouldn't be optional since they are required at compile time.
creyon commented on 2024-05-19 23:02 (UTC)
Okay, I applied -fpermissive
. I also fixed the license identifier to be SPDX-compliant (thank you @HurricanePootis again for the suggestion), and removed some (hopefully) unnecessary dependencies. I tried to build in a clean chroot, but I'm very tired and didn't want to wrangle python2 dependencies so I gave up. Let me know if you experience any issues.
creyon commented on 2024-05-19 18:34 (UTC)
Hi all. I will get around to resolving this issue soon.
It seems that GCC14 upgraded some warnings into errors, namely -Wint-conversion
and -Wimplicit-function-declaration
. https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors
The article above does indeed suggest to use -fpermissive
for old code, so that's what I'll do, rather than patching the source to fix the issue directly or using GCC13. Thank you @HurricanePootis for the suggestion.
HurricanePootis commented on 2024-05-17 14:37 (UTC)
Hello, I have fixed compilation of this package
diff --git a/PKGBUILD b/PKGBUILD
index 524015e..6c910ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -38,7 +38,7 @@ prepare() {
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- PYTHON=/usr/bin/python2 ./configure --prefix=/usr --build=unknown-unknown-linux --disable-docs
+ PYTHON=/usr/bin/python2 CFLAGS+=" -fpermissive" CXXFLAGS+=" -fpermissive" ./configure --prefix=/usr --build=unknown-unknown-linux --disable-docs
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
The flag -fpermissive
needs to be added to the cflags and cxxflags.
nolemretaw commented on 2024-05-17 13:46 (UTC)
Same issue, source code which pygtk is built from is probably outdated, and needs to be fixed.
Felixoid commented on 2024-05-15 20:10 (UTC)
I have the same issues building it with gcc14 =\
micwoj92 commented on 2024-05-13 20:32 (UTC)
Fails to build due to changes in gcc14:
pango.c: In function ‘_wrap_PangoFont__proxy_do_get_metrics’:
pango.c:3986:16: error: implicit declaration of function ‘pango_font_metrics_new’; did you mean ‘pango_font_metrics_ref’? [-Wimplicit-function-declaration]
3986 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~
| pango_font_metrics_ref
pango.c:3986:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
3986 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c:4000:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
4000 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c:4011:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
4011 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c:4021:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
4021 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c: In function ‘_wrap_pango_font_map_get_shape_engine_type’:
atk.override: In function ‘_wrap_atk_component_get_position’:
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’? [-Wimplicit-function-declaration]
4710 | ret = pango_font_map_get_shape_engine_type(PANGO_FONT_MAP(self->obj));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| _wrap_pango_font_map_get_shape_engine_type
atk.override:142:5: warning: ‘atk_component_get_position’ is deprecated: Use 'atk_component_get_extents' instead [-Wdeprecated-declarations]
142 | atk_component_get_position(ATK_COMPONENT(self->obj), &x, &y, coord_type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/atk-1.0/atk/atk.h:27:
/usr/include/atk-1.0/atk/atkcomponent.h:250:6: note: declared here
250 | void atk_component_get_position (AtkComponent *component,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
atk.override: In function ‘_wrap_atk_component_get_size’:
atk.override:152:5: warning: ‘atk_component_get_size’ is deprecated: Use 'atk_component_get_extents' instead [-Wdeprecated-declarations]
152 | atk_component_get_size(ATK_COMPONENT(self->obj), &width, &height);
| ^~~~~~~~~~~~~~~~~~~~~~
pango.c:4710:9: error: assignment to ‘const gchar *’ {aka ‘const char *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
4710 | ret = pango_font_map_get_shape_engine_type(PANGO_FONT_MAP(self->obj));
| ^
/usr/include/atk-1.0/atk/atkcomponent.h:255:6: note: declared here
255 | void atk_component_get_size (AtkComponent *component,
| ^~~~~~~~~~~~~~~~~~~~~~
atk.c: In function ‘_wrap_atk_component_remove_focus_handler’:
atk.c:5833:5: warning: ‘atk_component_remove_focus_handler’ is deprecated [-Wdeprecated-declarations]
5833 | atk_component_remove_focus_handler(ATK_COMPONENT(self->obj), handler_id);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/atk-1.0/atk/atkcomponent.h:265:6: note: declared here
265 | void atk_component_remove_focus_handler (AtkComponent *component,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pango.c: In function ‘_wrap_PangoFontset__proxy_do_get_metrics’:
pango.c:5382:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
5382 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c:5392:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
5392 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c:5402:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
5402 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
pango.c:5411:16: error: returning ‘int’ from a function with return type ‘PangoFontMetrics *’ {aka ‘struct _PangoFontMetrics *’} makes pointer from integer without a cast [-Wint-conversion]
5411 | return pango_font_metrics_new();
| ^~~~~~~~~~~~~~~~~~~~~~~~
Pinned Comments
ragouel commented on 2022-06-11 23:26 (UTC) (edited on 2022-06-12 19:54 (UTC) by ragouel)
From official GNOME docs:
"Attention: PyGTK 2.24 will be the last release in the PyGTK series and will support the full GTK-2-24 API. PyGTK should not be used for new projects and existing PyGTK applications are recommended to be ported to PyGObject. See here for more information."
https://wiki.gnome.org/Projects/PyGTK/WhatsNew224
Please stop asking me to update this package. I only "keep" it, so that it is not messed with by others, as some older applications still rely on it to function.
Thank you.