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 638050 - Doesn’t compile on Ubuntu natty
Doesn’t compile on Ubuntu natty
Status: RESOLVED FIXED
Product: gitg
Classification: Applications
Component: gitg
git master
Other Linux
: Normal normal
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-26 18:19 UTC by Anders Kaseorg
Modified: 2011-01-11 12:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Explicit linking in tools and tests (1.33 KB, patch)
2011-01-10 10:08 UTC, jessevdk@gmail.com
none Details | Review

Description Anders Kaseorg 2010-12-26 18:19:22 UTC
‘./autogen.sh && make’ results in

  CC     gitg.o
cc1: warnings being treated as errors
gitg.c: In function ‘main’:
gitg.c:261:2: error: implicit declaration of function ‘gtk_link_button_set_uri_hook’
gitg.c:261:28: error: assignment makes pointer from integer without a cast
make[2]: *** [gitg.o] Error 1

because autogen.sh runs configure with --enable-maintainer-mode which implies --enable-deprecations.

If I try ‘./configure --disable-deprecations && make’, I get this instead:

  CCLD   shell
/usr/bin/ld: shell.o: undefined reference to symbol 'g_file_get_path'
/usr/bin/ld: note: 'g_file_get_path' is defined in DSO /usr/lib64/libgio-2.0.so.0 so try adding it to the linker command line
/usr/lib64/libgio-2.0.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [shell] Error 1
Comment 1 Fabio Durán Verdugo 2010-12-27 02:09:03 UTC
I get the same error

  CC     gitg.o
gitg.c:41:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘original_link_button_hook’
cc1: warnings being treated as errors
gitg.c: In function ‘link_button_uri_hook’:
gitg.c:184:3: error: implicit declaration of function ‘original_link_button_hook’
gitg.c: In function ‘main’:
gitg.c:261:2: error: ‘original_link_button_hook’ undeclared (first use in this function)
gitg.c:261:2: note: each undeclared identifier is reported only once for each function it appears in
gitg.c:261:2: error: implicit declaration of function ‘gtk_link_button_set_uri_hook’
gitg.c:261:61: error: ‘GtkLinkButtonUriFunc’ undeclared (first use in this function)
gitg.c:261:82: error: expected ‘)’ before ‘link_button_uri_hook’
gitg.c: At top level:
gitg.c:172:1: error: ‘link_button_uri_hook’ defined but not used
make[2]: *** [gitg.o] Error 1
Comment 2 Ignacio Casal Quinteiro (nacho) 2010-12-29 16:38:00 UTC
Well the hooks were deprecated in gtk+ 2.24. But it should still build afaik.
Comment 3 Anders Kaseorg 2011-01-05 08:58:27 UTC
Should, perhaps.  But what we’re telling you is that it doesn’t.  :-)

Can you reread my original report?  There really are build problems on Ubuntu natty, both with --enable-deprecations and --disable-deprecations.
Comment 4 jessevdk@gmail.com 2011-01-10 10:07:50 UTC
Well, for sure there seem to be build problems, but I have no idea what can cause that. Also, 2.24 was never actually released (there is only 2.23 development version), so that's why the deprecations were never a problem.

The second issue (when compiling with deprecations disabled) is an issue caused by the new way of doing linking dependencies. Although I really think that this is more likely a libtool issue, it's probably easily solved by the attached patch. Please let me know if that fixes the problem.
Comment 5 jessevdk@gmail.com 2011-01-10 10:08:48 UTC
Created attachment 177919 [details] [review]
Explicit linking in tools and tests
Comment 6 jessevdk@gmail.com 2011-01-10 10:11:55 UTC
When I said 'I have no idea what can cause that', I didn't look into it yet, now that I have, I do know (to some extend) what caused it, or at least I think I do. I'll see how to fix the deprecations later.
Comment 7 Anders Kaseorg 2011-01-10 16:13:45 UTC
Yeah, the patch in comment 5 lets it build with --disable-deprecations, with several warnings:

gitg-commit.c: In function ‘refresh_changes’:
gitg-commit.c:712:13: warning: comparison between ‘GitgChangedFileStatus’ and ‘enum <anonymous>’
gitg.c: In function ‘main’:
gitg.c:259:2: warning: implicit declaration of function ‘gtk_link_button_set_uri_hook’
gitg.c:259:28: warning: assignment makes pointer from integer without a cast
gitg-commit-view.c: In function ‘get_info_at_pointer’:
gitg-commit-view.c:973:2: warning: implicit declaration of function ‘gdk_drawable_get_size’
gitg-window.c: In function ‘on_help_about’:
gitg-window.c:2258:2: warning: implicit declaration of function ‘gtk_about_dialog_set_url_hook’
gitg-window.c:2259:2: warning: implicit declaration of function ‘gtk_about_dialog_set_email_hook’

The first one is just a typo:
        if (changes == GITG_CHANGED_FILE_CHANGES_NONE &&
-           status == GITG_CHANGED_FILE_CHANGES_NONE)
+           status == GITG_CHANGED_FILE_STATUS_NONE)
Comment 8 Anders Kaseorg 2011-01-10 16:22:19 UTC
Er, never mind, those other warnings must have been from another build.  In another clean build with --disable-deprecations, I only get the enum warning.
Comment 9 jessevdk@gmail.com 2011-01-11 12:14:03 UTC
Thanks, I've pushed both. The deprecations I will probably see to later. I'm closing this bug and filed another one to track the deprecations problem for clearity (#639208).