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 386508 - gnome-keyring-scan.c generated by gtk-doc seems wrong
gnome-keyring-scan.c generated by gtk-doc seems wrong
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
git master
Other All
: Normal major
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-12-16 14:26 UTC by Marc-Andre Lureau
Modified: 2007-03-13 21:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Remove gnome-keyring.h from gtkdoc-scan because the get_type function is not GObject type (346 bytes, patch)
2007-01-07 17:20 UTC, Marc-Andre Lureau
needs-work Details | Review

Description Marc-Andre Lureau 2006-12-16 14:26:05 UTC
Please describe the problem:
While compiling with --enable-gtk-doc (#376895 applied), I got a strange segv crash related to gnome_keyring_item_info_get_type incorrect call.

Steps to reproduce:
1. configure --enable-gtk-doc
2. make reference
 2a. gnome-keyring-scan is run and crash


Actual results:
gnome-keyring-scan.c:gnome_keyring_item_info_get_type(void) does not fit with  gnome-keyring.c:gnome_keyring_item_info_get_type (GnomeKeyringItemInfo *item_info)

Expected results:
obvious

Does this happen every time?
yes

Other information:
GnomeKeyringInfoItem does not seem to follow strict gobject conventions...further investigation needed.
Comment 1 Marc-Andre Lureau 2007-01-07 17:01:35 UTC
(gdb) r
Starting program: /home/beta/svn/gnome2/gnome-keyring/reference/.libs/gnome-keyring-scan 
[Thread debugging using libthread_db enabled]
[New Thread -1210893664 (LWP 21005)]

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 21005)

  • #0 gnome_keyring_item_info_get_type
    at gnome-keyring.c line 2284
  • #1 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #2 _start

Comment 2 Marc-Andre Lureau 2007-01-07 17:20:56 UTC
Created attachment 79650 [details] [review]
Remove gnome-keyring.h from gtkdoc-scan because the get_type function is not GObject type
Comment 3 Wouter Bolsterlee (uws) 2007-01-25 11:31:36 UTC
I'm seeing something similar. Increasing severity because it breaks Gnome builds.


make[2]: Entering directory `/opt/gnome-2-18/src/gnome-keyring/reference'
gtk-doc: Scanning header files
cd . && \
          gtkdoc-scan --module=gnome-keyring --source-dir=.. --ignore-headers="aes_be.h aes.h aes_le.h beecrypt_compat.h config.h gnome-keyring-daemon.h gnome-keyring-private.h gnome-keyring-proto.h md5.h mkdtemp.h sha256.h "  
if grep -l '^..*$' ./gnome-keyring.types > /dev/null 2>&1 ; then \
            CC="/bin/sh ../libtool --mode=compile gcc -I.. -I.. -I/opt/gnome-2-18/include/glib-2.0 -I/opt/gnome-2-18/lib/glib-2.0/include     -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes    -Wnested-externs -Wpointer-arith        -Wcast-align -Wsign-compare     -Werror     -g -O2 -Wno-strict-aliasing -Wno-sign-compare" LD="/bin/sh ../libtool --mode=link gcc  -Wall     -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes        -Wnested-externs -Wpointer-arith        -Wcast-align -Wsign-compare     -Werror         -g -O2 -Wno-strict-aliasing -Wno-sign-compare " CFLAGS="" LDFLAGS="../libgnome-keyring.la -L/opt/gnome-2-18/lib -lgobject-2.0 -lglib-2.0   " gtkdoc-scangobj --type-init-func="g_type_init()" --module=gnome-keyring --output-dir=. ; \
        else \
            cd . ; \
            for i in gnome-keyring.args gnome-keyring.hierarchy gnome-keyring.interfaces gnome-keyring.prerequisites gnome-keyring.signals ; do \
               test -f $i || touch $i ; \
            done \
        fi
gtk-doc: Compiling scanner
 gcc -I.. -I.. -I/opt/gnome-2-18/include/glib-2.0 -I/opt/gnome-2-18/lib/glib-2.0/include -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Werror -g -O2 -Wno-strict-aliasing -Wno-sign-compare -c gnome-keyring-scan.c  -fPIC -DPIC -o .libs/gnome-keyring-scan.o
gtk-doc: Linking scanner
gcc -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Werror -g -O2 -Wno-strict-aliasing -Wno-sign-compare -o .libs/gnome-keyring-scan .libs/gnome-keyring-scan.o  ../.libs/libgnome-keyring.so -L/opt/gnome-2-18/lib /opt/gnome-2-18/lib/libgobject-2.0.so /opt/gnome-2-18/lib/libglib-2.0.so -Wl,--rpath -Wl,/opt/gnome-2-18/lib
creating gnome-keyring-scan
gtk-doc: Running scanner gnome-keyring-scan
Scan failed: 
make[2]: *** [scan-build.stamp] Error 255
make[2]: Leaving directory `/opt/gnome-2-18/src/gnome-keyring/reference'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/gnome-2-18/src/gnome-keyring'
make: *** [all] Error 2
Comment 4 Mariano Suárez-Alvarez 2007-01-25 22:59:56 UTC
Since renaming the function is not an option, gtkdoc-scan should get a way to ignore a _get_type function name. 

The patch above removes gnome-keyring.h from the scan, but that is where most of the useful stuff is in the docs!
Comment 5 Marc-Andre Lureau 2007-01-26 07:30:40 UTC
At this point, I see only these solutions then:

- gtkdoc-scan should support ignore function by name (ignore = gnome_keyring_info_get_type) - let see what I can do.

- move the _get_type function declaration to its own header (included by gnome-keyring.h)
Comment 6 Damon Chaplin 2007-02-14 17:15:00 UTC
You just need to create an empty gnome-keyring.types file and add that to svn.

That works for me.

Damon (gtk-doc maintainer)
Comment 7 Damon Chaplin 2007-02-16 15:45:44 UTC
I've added special code to gtk-doc to ignore gnome_keyring_info_get_type so
this should be fixed now.

(In future gtk-doc will only create the .types file on the very first run, so
this shouldn't be as much of a problem - you just delete it once if you need to.)
Comment 8 Mariano Suárez-Alvarez 2007-02-16 15:53:02 UTC
Wow that's a dirty hack ;-)
Comment 9 Richard Hughes 2007-03-13 20:06:23 UTC
This bug also affects HAL with libhal_psi_get_type.
Comment 10 Mariano Suárez-Alvarez 2007-03-13 20:12:01 UTC
Damon, could we, instead of hardcoding the g-k function, add a command line to gtkdoc-scan to add names to be ignored?
Comment 11 Damon Chaplin 2007-03-13 21:50:01 UTC
HAL shouldn't have a problem with the latest gtk-doc.
Since it already has a hal-sections.txt file gtk-doc shouldn't generate the .types file. (I don't think HAL is using the --rebuild-types option)

Though I wouldn't mind a command-line option as well.