Opened 11 years ago
Closed 11 years ago
#4919 closed Bug (fixed)
libutp no longer compiles on macs
Reported by: | shellbound | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Transmission | Version: | 2.52+ |
Severity: | Normal | Keywords: | |
Cc: |
Description
changeset:13317 causes compilation to fail on mac:
Making all in miniupnp Detected OS [Darwin] version [11.3.0] setting OS_STRING macro value to Darwin/11.3.0 in miniupnpcstrings.h. CC minisoap.o CC miniwget.o miniwget.c: In function ‘getHTTPResponse’: miniwget.c:189: warning: comparison between signed and unsigned miniwget.c:226: warning: signed and unsigned type in conditional expression miniwget.c: At top level: miniwget.c:289: warning: unused parameter ‘url’ AR libminiupnp.a Making all in libutp CXX utp.o CXX utp_utils.o In file included from utp.cpp:78: utp_config.h:8:2: warning: #warning implement this in libtransmission AR libutp.a Making all in libtransmission CC makemeta.o CC peer-io.o CC net.o In file included from ../third-party/libutp/utp.h:4, from tr-utp.h:32, from net.c:46: ../third-party/libutp/utypes.h:39: error: two or more data types in declaration specifiers ../third-party/libutp/utypes.h:39: warning: useless type name in empty declaration In file included from ../third-party/libutp/utp.h:4, from tr-utp.h:32, from peer-io.c:29: ../third-party/libutp/utypes.h:39: error: two or more data types in declaration specifiers ../third-party/libutp/utypes.h:39: warning: useless type name in empty declaration make[1]: *** [net.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [peer-io.o] Error 1 make: *** [all-recursive] Error 1
Change History (5)
comment:1 Changed 11 years ago by livings124
- Version changed from 2.51 to 2.52+
comment:2 Changed 11 years ago by livings124
comment:3 Changed 11 years ago by shellbound
export LIBEVENT_CFLAGS="-I/opt/local/include -L/opt/local/lib" export LIBEVENT_LIBS="-levent" ./autogen.sh --enable-cli --enable-daemon --without-gtk --disable-mac make -j 3 -s
comment:4 Changed 11 years ago by x190
Possible conflict between utypes.h and sys/types.h?
utypes.h:
#ifndef __cplusplus typedef uint8 bool; #endif
sys/types.h:
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) /* Major, minor numbers, dev_t's. */ #if defined(__cplusplus) /* * These lowercase macros tend to match member functions in some C++ code, * so for C++, we must use inline functions instead. */ static inline __int32_t major(__uint32_t _x) { return (__int32_t)(((__uint32_t)_x >> 24) & 0xff); }
Just askin'. :-)
See also:http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-p2p/transmission-cli/files/patch-third-party_libutp_utp.cpp?rev=1.1 (<limits.h> /* UINT_MAX */)
I suppose you could comment out sys/types.h in utp.h and try to build?
Alternate possible fix:
Had to add:
#if !defined(__cplusplus) #ifdef HAVE_STDBOOL_H #include <stdbool.h> #elif !defined(__bool_true_false_are_defined) #define bool uint8_t #define true 1 #define false 0 #endif #endif
to utp.h to make it compile
Bruno
Note: This was used prior to the current utypes.h update.
comment:5 Changed 11 years ago by jordan
- Milestone None Set deleted
- Resolution set to fixed
- Status changed from new to closed
shellbound, I think this is fixed now in r13329... at least, it fixes the build both for me an for our hudson bot. :)
Please reopen this ticket if needed.
I'm able to compile this on Xcode on Mac. How are you compiling this?