Bug 180797 - failed to build kdesupport ("errno" in formal parameter lists). svn revision: 911333)
Summary: failed to build kdesupport ("errno" in formal parameter lists). svn revision:...
Status: RESOLVED INTENTIONAL
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-15 11:30 UTC by Yevgeniy
Modified: 2012-07-06 12:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yevgeniy 2009-01-15 11:30:44 UTC
Version:            (using Devel)
Compiler:          GNU gcc (GCC) 4.3.2 
OS:                Solaris
Installed from:    Compiled sources

Compilation of kdesupport failed with errors:

/home/unix/build/telepathy-qt/src/Client/__/__/include/QtTelepathy/Client/moc_channel_type_streamed_media.cxx:92: error: invalid conversion from 'unsigned int' to 'uint* (*)()'
/home/unix/build/telepathy-qt/src/Client/__/__/include/QtTelepathy/Client/moc_channel_type_streamed_media.cxx:92: error:   initializing argument 2 of 'void OrgFreedesktopTelepathyChannelTy
peStreamedMediaInterface::StreamError(uint, uint* (*)(), const QString&)'
/home/unix/build/telepathy-qt/src/Client/__/__/include/QtTelepathy/Client/moc_channel_type_streamed_media.cxx:124: error: prototype for 'void OrgFreedesktopTelepathyChannelTypeStreamedMedi
aInterface::StreamError(uint, uint, const QString&)' does not match any in class 'OrgFreedesktopTelepathyChannelTypeStreamedMediaInterface'
/home/unix/build/telepathy-qt/src/Client/__/__/include/QtTelepathy/Client/../../../../../../../../../kdesupport/telepathy-qt/include/QtTelepathy/Client/channel_type_streamed_media.h:74: error: candidate is: void OrgFreedesktopTelepathyChannelTypeStreamedMediaInterface::StreamError(uint, uint* (*)(), const QString&)

and

/home/unix/build/telepathy-qt/src/Client/__/__/include/QtTelepathy/Client/moc_media_stream_handler.cxx:132: error: invalid conversion from 'unsigned int' to 'uint* (*)()'
/home/unix/build/telepathy-qt/src/Client/__/__/include/QtTelepathy/Client/moc_media_stream_handler.cxx:132: error:   initializing argument 1 of 'QDBusReply<void> OrgFreedesktopTelepathyMed
iaStreamHandlerInterface::Error(uint* (*)(), const QString&)'


I think these errors because of using word "errno" as name of a formal parameter in the following functions:

1)
File: telepathy-qt/include/QtTelepathy/Core/channel_type_streamed_media_adaptor.h
void StreamError(uint stream_id, uint errno, const QString &message)

2)
File: telepathy-qt/include/QtTelepathy/Client/channel_type_streamed_media.h
 void StreamError(uint stream_id, uint errno, const QString &message);

3)
File: telepathy-qt/include/QtTelepathy/Core/media_stream_handler_adaptor.h
void Error(uint errno, const QString &message);

4)
File: telepathy-qt/include/QtTelepathy/Client/media_stream_handler.h
inline QDBusReply<void> Error(uint errno, const QString &message)

In my case I've got round this problem by adding
#undef errno
in the mentioned files just after last directive #include

But I think it is better to avoid using the word "errno"

OS: SunOS 5.11 snv_104 i86pc i386 i86pc Solaris
compiler: GNU gcc 4.3.2
preprocessor: cpp (GCC) 4.3.2
linker: GNU ld (GNU Binutils) 2.18
Comment 1 George Goldberg 2009-01-16 11:25:08 UTC
Just to clarify, errno is #defined by something when you're compiling telepathy-qt?

I'll take a look at this as soon as I have time, but it is autogenerated code, and I have no idea how the generation process works, so it might not be straight forward for me to fix (I'll try and prod the authors of the autogeneration scripts too).
Comment 2 Yevgeniy 2009-01-16 13:00:48 UTC
>..., errno is #defined by something when you're compiling telepathy-qt?

On my Solaris box there are lines
extern int *___errno();
#define errno (*(___errno()))
in the file /usr/include/errno.h (this file is from SUNWhea package)

I can not find any "#include <errno.h> in the directory telepathy-qt and it's subdirs. But there is such line in the others directories of kdesupport (qca, automoc and others)

Just for information - if this is an autogenerated code,
maybe it is generated from
telepathy-qt/xml/Channel_Type_Streamed_Media.xml
and
telepathy-qt/spec/Channel_Type_Streamed_Media.xml
In these files there are lines:
      <arg name="errno" type="u">
        <tp:docstring>
          A stream error number, one of the values of MediaStreamError
        </tp:docstring>
      </arg>

and

    <signal name="StreamError">
      <arg name="stream_id" type="u"/>
      <arg name="errno" type="u"/>
      <arg name="message" type="s"/>
    </signal>
Comment 3 George Goldberg 2009-01-16 17:27:27 UTC
OK, this is difficult then, because I think it will require changing the parameter name upstream in the telepathy specification. I'll talk to those guys about it and see how to proceed.

thanks for the bug report :)
Comment 4 George Goldberg 2009-01-16 17:36:26 UTC
In fact, this has already been corrected upstream in the telepathy spec.

However, since the telepathy-qt bindings are currently deprecated and will be very soon replaced by the new telepathyQt4 library, and since I'm not planning to update telepathy-qt bindings any further, then I don't think I should fix this bug in svn (it would be BIC also I think).

So, although I'm closing as WONTFIX, this issue will be gone when the port of Decibel to the new telepathyQt4 library is complete. I hope you will understand why I am taking this approach.