Hi,
I'm trying to build libtorrent/rtorrent using gcc 4.8. The reason I'm
using gcc 4.8 rather than the version in base is because there is
apparently a bug in gcc 4.2 - http://libtorrent.rakshasa.no/ticket/926
I installed gcc 4.8 based on these instructions
http://www.freebsd.org/doc/en/articles/custom-gcc/article.html,
replacing 44 for 48 where neccessary. While building I get the
errors below.
Have I missed something while installing gcc 4.8? Or does anyone have an ideas
about how to fix this?
Thanks
David
build.jail:/usr/ports/net-p2p/libtorrent make build
=== Building for libtorrent-0.13.2_1
make all-recursive
Making all in src
Making all in torrent
Making all in data
Making all in download
Making all in peer
Making all in utils
/bin/sh /usr/local/bin/libtool --tag=CXX--mode=compile g++48
-DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../.. -I../../.. -O2 -pipe
-fno-strict-aliasing -DNDEBUG -fvisibility=hidden -D_THREAD_SAFE -pthread
-I/usr/include -I/usr/local/include/sigc++-2.0
-I/usr/local/lib/sigc++-2.0/include -MT option_strings.lo -MD -MP -MF
.deps/option_strings.Tpo -c -o option_strings.lo option_strings.cc
libtool: compile: g++48 -DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../..
-I../../.. -O2 -pipe -fno-strict-aliasing -DNDEBUG -fvisibility=hidden
-D_THREAD_SAFE -pthread -I/usr/include -I/usr/local/include/sigc++-2.0
-I/usr/local/lib/sigc++-2.0/include -MT option_strings.lo -MD -MP -MF
.deps/option_strings.Tpo -c option_strings.cc -fPIC -DPIC -o
.libs/option_strings.o
In file included from ./../../torrent/connection_manager.h:45:0,
from option_strings.cc:43:
/usr/include/netinet/in_systm.h:49:9: error: 'u_int16_t' does not name a type
typedef u_int16_t n_short; /* short as received from the net */
^
/usr/include/netinet/in_systm.h:50:9: error: 'u_int32_t' does not name a type
typedef u_int32_t n_long; /* long as received from the net */
^
/usr/include/netinet/in_systm.h:52:9: error: 'u_int32_t' does not name a type
typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
^
In file included from ./../../torrent/connection_manager.h:46:0,
from option_strings.cc:43:
/usr/include/netinet/ip.h:51:2: error: 'u_int' does not name a type
u_int ip_hl:4, /* header length */
^
/usr/include/netinet/ip.h:58:2: error: 'u_char' does not name a type
u_char ip_tos; /* type of service */
^
/usr/include/netinet/ip.h:59:2: error: 'u_short' does not name a type
u_short ip_len; /* total length */
^
/usr/include/netinet/ip.h:60:2: error: 'u_short' does not name a type
u_short ip_id; /* identification */
^
/usr/include/netinet/ip.h:61:2: error: 'u_short' does not name a type
u_short ip_off; /* fragment offset field */
^
/usr/include/netinet/ip.h:66:2: error: 'u_char' does not name a type
u_char ip_ttl; /* time to live */
^
/usr/include/netinet/ip.h:67:2: error: 'u_char' does not name a type
u_char ip_p; /* protocol */
^
/usr/include/netinet/ip.h:68:2: error: 'u_short' does not name a type
u_short ip_sum; /* checksum */
^
/usr/include/netinet/ip.h:166:2: error: 'u_char' does not name a type
u_char ipt_code; /* IPOPT_TS */
^
/usr/include/netinet/ip.h:167:2: error: 'u_char' does not name a type
u_char ipt_len; /* size of structure (variable) */
^
/usr/include/netinet/ip.h:168:2: error: 'u_char' does not name a type
u_char ipt_ptr; /* index of current entry */
^
/usr/include/netinet/ip.h:170:2: error: 'u_int' does not name a type
u_int ipt_flg:4, /* flags, see below */
^
/usr/include/netinet/ip.h:217:2: error: 'u_char' does not name a type
u_char ippseudo_pad; /* pad, must be zero */
^
/usr/include/netinet/ip.h:218:2: error: 'u_char' does not name a type
u_char ippseudo_p; /* protocol */
^
/usr/include/netinet/ip.h:219:2: error: 'u_short' does not name a type
u_short ippseudo_len; /* protocol length */
^
*** Error code 1
Stop in
/.write/usr-local/build/usr/ports/net-p2p/libtorrent/work/libtorrent-0.13.2/src/torrent/utils.
*** Error code 1
Stop in
/.write/usr-local/build/usr/ports/net-p2p/libtorrent/work/libtorrent-0.13.2/src/torrent.
*** Error code 1
Stop in
/.write/usr-local/build/usr/ports/net-p2p/libtorrent/work/libtorrent-0.13.2/src.
*** Error code 1
Stop in
/.write/usr-local/build/usr/ports/net-p2p/libtorrent/work/libtorrent-0.13.2.
*** Error code 1
Stop in
/.write/usr-local/build/usr/ports/net-p2p/libtorrent/work/libtorrent-0.13.2.
*** Error code 1
Stop in /usr/ports/net-p2p/libtorrent.
*** Error code 1
Stop in /usr/ports/net-p2p/libtorrent.
build.jail:/usr/ports/net-p2p/libtorrent gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
build.jail:/usr/ports/net-p2p/libtorrent g++ -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix