Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
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' ...
Summary: app-crypt/pinentry-0.7.4-r1: Doesn't compile with glib-2.16.1 -> gtksecentry....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Sven Wegener
URL: http://www.gossamer-threads.com/lists...
Whiteboard:
Keywords:
Depends on: 213383
Blocks: glib-2.16
  Show dependency tree
 
Reported: 2008-03-14 12:38 UTC by Alexander Skwar
Modified: 2008-03-23 13:13 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Skwar 2008-03-14 12:38:47 UTC
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.
Comment 1 Arun Raghavan (RETIRED) gentoo-dev 2008-03-15 12:34:38 UTC
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 ()
Comment 2 Alexander Skwar 2008-03-15 17:35:08 UTC
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
Comment 3 Alexander Skwar 2008-03-16 07:13:27 UTC
(In reply to comment #1)
> 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

I now compiled pinentry with qt3 and gtk flags enabled, and I can startup pinentry-gtk-2 or pinentry-qt just fine.

> (but I don't know if this is because of the patch). 

Well, either way, without the patch, pinentry doesn't even compile...
Comment 4 Mart Raudsepp gentoo-dev 2008-03-16 22:01:05 UTC
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?
Comment 5 Mart Raudsepp gentoo-dev 2008-03-16 22:01:21 UTC
Oh and relevant glib upstream change here:

http://svn.gnome.org/viewvc/glib/branches/glib-2-16/glib/gmem.h?r1=4563&r2=6413
Comment 6 Sven Wegener gentoo-dev 2008-03-23 13:13:10 UTC
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.