Bug 53100 - duplicate declaration of TpBaseConnection
Summary: duplicate declaration of TpBaseConnection
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL:
Whiteboard: review+
Keywords:
: 53367 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-03 17:47 UTC by Alvaro Soliverez
Modified: 2012-08-27 09:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Don't have a second copy of the TpBaseConnection typedef (1.33 KB, patch)
2012-08-06 08:20 UTC, Simon McVittie
Details | Splinter Review

Description Alvaro Soliverez 2012-08-03 17:47:15 UTC
Cross-platform environments don't admit redeclarations

In file included from /var/lib/buildbot/telepathy/yts-android-r11-amd64/build/telepathy-glib/telepathy-glib/base-channel.h:32,
                 from /var/lib/buildbot/telepathy/yts-android-r11-amd64/build/telepathy-android/jni/../../telepathy-glib/telepathy-glib/base-call-channel.h:29,
                 from /var/lib/buildbot/telepathy/yts-android-r11-amd64/build/telepathy-android/jni/../../telepathy-glib/telepathy-glib/base-call-channel.c:103:
/var/lib/buildbot/telepathy/yts-android-r11-amd64/build/telepathy-glib/telepathy-glib/base-connection.h: At top level:
/var/lib/buildbot/telepathy/yts-android-r11-amd64/build/telepathy-glib/telepathy-glib/base-connection.h:41: error: redefinition of typedef 'TpBaseConnection'
/var/lib/buildbot/telepathy/yts-android-r11-amd64/build/telepathy-glib/telepathy-glib/handle-repo.h:41: note: previous declaration of 'TpBaseConnection' was here
make: *** [obj/local/armeabi/objs-debug/telepathy-glib/base-call-channel.o] Error 1
program finished with exit code 2

See the full build log here:
http://buildbot.telepathy.im/builders/telepathy-android - r11/builds/282/steps/compile/logs/stdio
Comment 1 Simon McVittie 2012-08-06 08:19:51 UTC
(In reply to comment #0)
> error: redefinition of typedef 'TpBaseConnection'

I was sure we fixed this at least once already, but apparently not...

Unfortunately, recent "normal gcc" doesn't seem to have an option to even warn about this, so we're going to keep fixing it for a very long time.
Comment 2 Simon McVittie 2012-08-06 08:20:27 UTC
Created attachment 65151 [details] [review]
Don't have a second copy of the TpBaseConnection typedef

N1570 (C11 final draft) ยง6.7.3 says this usage is valid[1] so modern
gcc doesn't have an option to even warn about it, but this is a recent
change to the C standard, and older compilers like the one in the
Android NDK treat it as a fatal error.

[1] "a typedef name may be redefined to denote the same
type as it currently does, provided that type is not a variably
modified type"

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53100
Comment 3 Simon McVittie 2012-08-06 08:27:50 UTC
(In reply to comment #2)
> Don't have a second copy of the TpBaseConnection typedef

This is a regression somewhere in 0.19.x and does not affect telepathy-glib 0.18.

Alvaro: the Android buildbot might be better off building our stable branch 0.18.x (telepathy-glib-0.18 rather than master). I believe everything Ytstenut-related works with 0.18.x.
Comment 4 Jonny Lamb 2012-08-06 12:18:09 UTC
Comment on attachment 65151 [details] [review]
Don't have a second copy of the TpBaseConnection typedef

Review of attachment 65151 [details] [review]:
-----------------------------------------------------------------

Yes.
Comment 5 Simon McVittie 2012-08-12 17:05:49 UTC
*** Bug 53367 has been marked as a duplicate of this bug. ***
Comment 6 Simon McVittie 2012-08-27 09:46:32 UTC
Fixed in git for 0.19.7, thanks


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.