From owner-freebsd-questions@FreeBSD.ORG Tue Feb 19 11:18:07 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8B6C3F7F for ; Tue, 19 Feb 2013 11:18:07 +0000 (UTC) (envelope-from davidcollins001@gmail.com) Received: from mail-we0-x229.google.com (we-in-x0229.1e100.net [IPv6:2a00:1450:400c:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id 267096A8 for ; Tue, 19 Feb 2013 11:18:06 +0000 (UTC) Received: by mail-we0-f169.google.com with SMTP id t11so5627272wey.14 for ; Tue, 19 Feb 2013 03:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:reply-to:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=4xBHPNqWavCpvvk4hJS4meCC9UEqemzYawbndP6f468=; b=iTO769q5f69RbKyuRLpbt86ZL9gv9fdPNVB+sufbyGoMx+SfRFz3372amqncWSSSdd i8MdcauzrkFxJ+78Mz1TuSigbkfV5OX8du6jIOAZtIe68nmjebT9YLVC7kqQ8DvAauLd P/RhQrooeCZlayr7SUS3gEqlUmDdOb5sSwub+ocV1xi1EXdkDF2D0LE3ypt5g/yx2h2E aRVqu6QSElYmcxMxIEVg0FhD3v4beaqm6EcUTsaOU17YfZrNKbS1BRZ1UuLT+9zQEdA+ URxA0wCs7EdtE5BPcPWnndSzqnE8wjy8tVLNhyHhQtCZXpTsyWEzoT0mNxR7S2W5qvHx eh9w== X-Received: by 10.180.89.101 with SMTP id bn5mr26201228wib.14.1361272677290; Tue, 19 Feb 2013 03:17:57 -0800 (PST) Received: from viper.homeunix.com (188-222-164-87.zone13.bethere.co.uk. [188.222.164.87]) by mx.google.com with ESMTPS id fg6sm27102658wib.10.2013.02.19.03.17.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 19 Feb 2013 03:17:56 -0800 (PST) Date: Tue, 19 Feb 2013 11:17:54 +0000 From: David Collins To: freebsd-questions@freebsd.org Subject: building libtorrent error: 'u_int16_t' does not name a type Message-ID: <51235f62.tSX2fGrd2jyaPQ8q%davidcollins001@gmail.com> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: davidcollins001@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 11:18:07 -0000 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>