Opened 12 years ago

Closed 12 years ago

#2998 closed Bug (fixed)

transmission-daemon fails to compile on mac & freebsd

Reported by: achromic Owned by: charles
Priority: Normal Milestone: 1.92
Component: Daemon Version: 1.91
Severity: Normal Keywords:
Cc: alex.parkhomenko@…

Description

I'm attempting to build transmission-daemon from subversion on a mac (10.6) and the build fails when building libevent. I have attached the relevant output of the build process.

Attachments (1)

err.log (1.8 KB) - added by achromic 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by achromic

comment:1 Changed 12 years ago by charles

It's hard to tell what's going on from this build log.

  1. I think the missing u_char is causing the error message about struct evbuffer's fields "buffer" and "off". If you add an "#include <sys/types.h>" to the top of transmission/third-party/libevent/event.h does that error go away?
  1. According to the Mac OS X Manual pages, strlcpy() is prototyped in string.h, and getpagesize() is prototyped in unistd.h, both of which are included by utils.c. So I don't know what's going on there... however since they're warnings instead of errors, we can (probably) safely ignore them.

comment:2 Changed 12 years ago by livings124

I have no problems compiling the daemon with Xcode. Have you tried that?

comment:3 Changed 12 years ago by alex.parkhomenko

  • Cc alex.parkhomenko@… added
  • Summary changed from transmission-daemon fails to compile on mac to transmission-daemon fails to compile on mac & freebsd

Same for FreeBSD 7.2-RELEASE-p6

Error in event.h declarations: .../third-party/libevent/event.h:727: error: expected specifier-qualifier-list before 'u_char'

But the actual code looks to be normal

724 /* These functions deal with buffering input and output */
725 
726 struct evbuffer {
727         u_char *buffer;
728         u_char *orig_buffer;
729 
730         size_t misalign;
731         size_t totallen;
732         size_t off;
733 
734         void (*cb)(struct evbuffer *, size_t, size_t, void *);
735         void *cbarg;
736 };

gcc-v: Using built-in specs. Target: i386-undermydesk-freebsd Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 4.2.1 20070719 [FreeBSD]

comment:4 follow-up: Changed 12 years ago by charles

I think the missing u_char is causing the error message about struct evbuffer's fields "buffer" and "off". If you add an "#include <sys/types.h>" to the top of transmission/third-party/libevent/event.h does that error go away?

comment:5 in reply to: ↑ 4 Changed 12 years ago by alex.parkhomenko

Replying to charles:

I think the missing u_char is causing the error message about struct evbuffer's fields "buffer" and "off". If you add an "#include <sys/types.h>" to the top of transmission/third-party/libevent/event.h does that error go away?

Nope. Already tried it. Doesn't work for me.

comment:6 Changed 12 years ago by alex.parkhomenko

Adding <sys/types.h> doesn't help but I've tried to explicitly declare u_char in the event.h and it helped:

 162 typedef unsigned char u_char;
 163 typedef unsigned short u_short;

Looks like something wrong with defines because types.h should be included there (line numbers for unmodified file):

 163 #ifdef _EVENT_HAVE_SYS_TYPES_H
 164 #include <sys/types.h>
 165 #endif

comment:7 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.92
  • Owner set to charles
  • Status changed from new to assigned

Fixed in r10305 thanks to help from brad0

comment:8 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.