From owner-freebsd-current@FreeBSD.ORG Tue May 7 14:10:54 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BD5ABE1F for ; Tue, 7 May 2013 14:10:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 82F82A59 for ; Tue, 7 May 2013 14:10:54 +0000 (UTC) Received: from spaceball.andric.com (spaceball.andric.com [IPv6:2001:7b8:3a7:0:204:4bff:fe01:de8a]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 32A665C44; Tue, 7 May 2013 16:10:46 +0200 (CEST) Message-ID: <51890B61.60405@FreeBSD.org> Date: Tue, 07 May 2013 16:10:41 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Thunderbird/21.0 MIME-Version: 1.0 To: Sergey Kandaurov , "Michael W. Lucas" Subject: Re: problem building -current References: <20130507132122.GA83633@bewilderbeast.blackhelicopters.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 May 2013 14:10:54 -0000 On 2013-05-07 16:01, Sergey Kandaurov wrote: > On 7 May 2013 17:21, Michael W. Lucas wrote: ... >> c++ -O2 -pipe -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. -I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd10.0\" -DLLVM_HOSTTRIPLE=\"x86_64-unknown-freebsd10.0\" -DDEFAULT_SYSROOT=\"\" -I/usr/obj/usr/src/tmp/legacy/usr/include -fno-exceptions -fno-rtti -c /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Process.cpp -o Process.o >> In file included from /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Process.cpp:85: >> /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Unix/Process.inc: In member function 'virtual llvm::sys::TimeValue llvm::sys::self_process::get_user_time() const': >> /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Unix/Process.inc:75: error: 'CLOCK_PROCESS_CPUTIME_ID' was not declared in this scope >> *** [Process.o] Error code 1 > > You can try to install this change into your /usr/include/time.h and try again. > http://svnweb.freebsd.org/base?view=revision&revision=245428 > > --- head/include/time.h 2013/01/14 17:41:04 245427 > +++ head/include/time.h 2013/01/14 18:01:19 245428 > @@ -112,6 +112,7 @@ > #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ > #define CLOCK_SECOND 13 /* FreeBSD-specific. */ > #define CLOCK_THREAD_CPUTIME_ID 14 > +#define CLOCK_PROCESS_CPUTIME_ID 15 > #endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ > > #if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 Yes, this is an annoying problem. When the CLOCK_PROCESS_CPUTIME_ID support was originally added, it was only put in sys/time.h, not in time.h. So any application that includes the latter will not be able to use the define. There are multiple possibilities to solve this, but I'm thinking of putting a -DCLOCK_PROCESS_CPUTIME_ID=15 on the command line for older versions of -current... -Dimitry