Modify

#1170 new defect

error: variable has incomplete type 'const struct oauth_service'

Reported by: Ryan Schmidt <bitlbee@…> Owned by:
Priority: normal Milestone:
Component: BitlBee Version: 3.2.2
Keywords: Cc:
IRC client+version: Client-independent Operating System: MacOS
OS version/distro: 10.9.4

Description

Hello, I'm a developer with the MacPorts project, discovering that bitlbee 3.2.2 does not build for me:

make[2]: Entering directory `/opt/local/var/macports/build/_Users_rschmidt_macports_dports_irc_bitlbee/bitlbee/work/bitlbee-3.2.2/protocols/twitter'
* Compiling twitter.c
twitter.c:124:35: error: variable has incomplete type 'const struct oauth_service'
static const struct oauth_service twitter_oauth = {
                                  ^
twitter.c:124:21: note: forward declaration of 'struct oauth_service'
static const struct oauth_service twitter_oauth = {
                    ^
twitter.c:132:35: error: variable has incomplete type 'const struct oauth_service'
static const struct oauth_service identica_oauth = {
                                  ^
twitter.c:124:21: note: forward declaration of 'struct oauth_service'
static const struct oauth_service twitter_oauth = {
                    ^
twitter.c:166:19: warning: implicit declaration of function 'oauth_request_token' is invalid in C99 [-Wimplicit-function-declaration]
        td->oauth_info = oauth_request_token(get_oauth_service(ic), twitter_oauth_callback, ic);
                         ^
twitter.c:166:17: warning: incompatible integer to pointer conversion assigning to 'struct oauth_info *' from 'int' [-Wint-conversion]
        td->oauth_info = oauth_request_token(get_oauth_service(ic), twitter_oauth_callback, ic);
                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and so forth. I'll attach the full log.

The compiler being used is the one Apple provides with their Xcode development environment:

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

Attachments (2)

main.log (66.3 KB) - added by Ryan Schmidt <bitlbee@…> at 2014-07-22T04:24:52Z.
Makefile.settings (1.7 KB) - added by Ryan Schmidt <bitlbee@…> at 2014-07-23T12:22:06Z.

Download all attachments as: .zip

Change History (5)

Changed at 2014-07-22T04:24:52Z by Ryan Schmidt <bitlbee@…>

Attachment: main.log added

comment:1 Changed at 2014-07-23T12:03:04Z by dx

Weird, it's like oauth.h is missing, only that file. I tried compiling with clang 3.4.2 on linux, it works fine.

Post contents of Makefile.settings?

comment:2 Changed at 2014-07-23T12:21:45Z by Ryan Schmidt <bitlbee@…>

Aha! Thanks for the hint. I had a different file /opt/local/include/oauth.h (from liboauth 1.0.1) that was interfering. Temporarily deactivating liboath allowed bitlbee to build.

Changed at 2014-07-23T12:22:06Z by Ryan Schmidt <bitlbee@…>

Attachment: Makefile.settings added

comment:3 Changed at 2014-07-23T12:25:19Z by dx

Oh, well, that answers it. We really should unfuck the way we include headers. I saw in your portfile that there's a conflict with libproxy too.

Modify Ticket

Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.