Date: Tue, 19 Feb 2013 11:17:54 +0000 From: David Collins <davidcollins001@gmail.com> To: freebsd-questions@freebsd.org Subject: building libtorrent error: 'u_int16_t' does not name a type Message-ID: <51235f62.tSX2fGrd2jyaPQ8q%davidcollins001@gmail.com>
next in thread | raw e-mail | index | archive | help
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 gcc version 4.2.1 20070831 patched [FreeBSD] build.jail:/usr/ports/net-p2p/libtorrent> gcc48 -v Using built-in specs. COLLECT_GCC=gcc48 COLLECT_LTO_WRAPPER=/.write/usr-local/bin/../libexec/gcc48/gcc/i386-portbld-freebsd8.3/4.8.0/lto-wrapper Target: i386-portbld-freebsd8.3 Configured with: ./../gcc-4.8-20130113/configure --disable-nls --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-libiconv-prefix=/usr/local --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --disable-libgcj --enable-languages=c,c++,objc,fortran --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=i386-portbld-freebsd8.3 Thread model: posix gcc version 4.8.0 20130113 (experimental) (FreeBSD Ports Collection) build.jail:/usr/ports/net-p2p/libtorrent> g++48 -v Using built-in specs. COLLECT_GCC=g++48 COLLECT_LTO_WRAPPER=/.write/usr-local/bin/../libexec/gcc48/gcc/i386-portbld-freebsd8.3/4.8.0/lto-wrapper Target: i386-portbld-freebsd8.3 Configured with: ./../gcc-4.8-20130113/configure --disable-nls --libdir=/usr/local/lib/gcc48 --libexecdir=/usr/local/libexec/gcc48 --program-suffix=48 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc48/include/c++/ --with-ld=/usr/local/bin/ld --with-libiconv-prefix=/usr/local --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --disable-libgcj --enable-languages=c,c++,objc,fortran --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc48 --build=i386-portbld-freebsd8.3 Thread model: posix gcc version 4.8.0 20130113 (experimental) (FreeBSD Ports Collection) build.jail:/usr/ports/net-p2p/libtorrent> uname -a FreeBSD build.homeunix.com 8.3-STABLE FreeBSD 8.3-STABLE #14 r245848: Sun Feb 10 14:16:47 GMT 2013 root@viper.homeunix.com:/usr/obj/usr/src/sys/VIPER i386 build.jail:/usr/ports/net-p2p/libtorrent> cat /etc/make.conf PACKAGES=/usr/local/packages DISTDIR=/usr/local/packages/distfiles WRKDIRPREFIX=/usr/local/build #BATCH=yes # linux base OVERRIDE_LINUX_BASE_PORT=f10 OVERRIDE_LINUX_NONBASE_PORTS=f10 MAKE_JOBS_NUMBER=4 # added by use.perl 2012-10-08 20:21:44 PERL_VERSION=5.14.2 .if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc48) CC=gcc48 CXX=g++48 CPP=cpp48 .endif build.jail:/usr/ports/net-p2p/libtorrent> cat /etc/src.conf build.jail:/usr/ports/net-p2p/libtorrent>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51235f62.tSX2fGrd2jyaPQ8q%davidcollins001>