Bug 213382 - app-crypt/pinentry-0.7.4-r1: Doesn't compile with glib-2.16.1 -> gtksecentry.c:274: error: conflicting types for 'g_malloc' ...
|
Bug#:
213382
|
Product: Gentoo Linux
|
Version: 2007.0
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: swegener@gentoo.org
|
Reported By: askwar@digitalprojects.com
|
|
Component: Applications
|
|
|
URL:
http://www.gossamer-threads.com/lists/gnupg/devel/42856?page=last
|
|
Summary: app-crypt/pinentry-0.7.4-r1: Doesn't compile with glib-2.16.1 -> gtksecentry.c:274: error: conflicting types for 'g_malloc' ...
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2008-03-14 12:38 0000
|
Trying to compile pinentry fails:
In file included from /usr/include/gtk-2.0/gtk/gtkactiongroup.h:34,
from /usr/include/gtk-2.0/gtk/gtk.h:38,
from gtksecentry.c:40:
/usr/include/gtk-2.0/gtk/gtkitemfactory.h:50: warning: function declaration
isn't a prototype
gtksecentry.c:274: error: conflicting types for 'g_malloc'
/usr/include/glib-2.0/glib/gmem.h:47: error: previous declaration of 'g_malloc'
was here
gtksecentry.c:292: error: conflicting types for 'g_malloc0'
/usr/include/glib-2.0/glib/gmem.h:48: error: previous declaration of
'g_malloc0' was here
gtksecentry.c:312: error: conflicting types for 'g_realloc'
/usr/include/glib-2.0/glib/gmem.h:50: error: previous declaration of
'g_realloc' was here
make[2]: *** [gtksecentry.o] Error 1
make[2]: Leaving directory
`/var/tmp/portage/app-crypt/pinentry-0.7.4-r1/work/pinentry-0.7.4/gtk+-2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/app-crypt/pinentry-0.7.4-r1/work/pinentry-0.7.4'
make: *** [all] Error 2
*
* ERROR: app-crypt/pinentry-0.7.4-r1 failed.
I'm using dev-libs/glib-2.16.1.
I found a post on the gnupg devel list which has a commited patch attached.
I tried the patch from
http://www.gossamer-threads.com/lists/engine?do=post_attachment;postatt_id=2874;list=gnupg
(with both pinentry-0.7.3 and 0.7.4-r1) and I'm seeing a segfault before it
even starts up (but I don't know if this is because of the patch). The stack
trace looks like:
#0 0x0805929f in secmem_realloc ()
#1 0xb78f4678 in g_realloc () from /usr/lib/libglib-2.0.so.0
#2 0xb78f9b88 in g_option_group_add_entries () from /usr/lib/libglib-2.0.so.0
#3 0xb7b0a9fc in gdk_add_option_entries_libgtk_only ()
from /usr/lib/libgdk-x11-2.0.so.0
#4 0xb7cbf6ab in gtk_get_option_group () from /usr/lib/libgtk-x11-2.0.so.0
#5 0xb7cbf762 in gtk_parse_args () from /usr/lib/libgtk-x11-2.0.so.0
#6 0xb7cbf804 in gtk_init_check () from /usr/lib/libgtk-x11-2.0.so.0
#7 0xb7cbf844 in gtk_init () from /usr/lib/libgtk-x11-2.0.so.0
#8 0x0804e800 in main ()
#9 0xb77463ec in __libc_start_main () from /lib/libc.so.6
#10 0x0804d461 in _start ()
Using pinentry 0.7.5 (cf. bug #213383):
test9 pinentry # pinentry-curses
OK Your orders please
Didn't try anything else. I've only got the curses interface installed.
test9 pinentry # emerge -vpt pinentry
These are the packages that would be merged, in reverse order:
Calculating dependencies... done!
[ebuild R ] app-crypt/pinentry-0.7.5 USE="-caps -gtk ncurses -qt3" 0 kB
[1]
Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage
The failing pinentry seems to redefine g_malloc and co, but upstream changes
its argument from gulong to gsize, which seems to then be in conflict. Why was
it redefining those functions in the first place?
I have commited a workaround for this. The patches from the mailing-list cause
more breakage than they help to solve the problem in the short-term.