From owner-freebsd-stable@FreeBSD.ORG Tue Mar 8 15:19:53 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62B501065670 for ; Tue, 8 Mar 2011 15:19:53 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 173138FC17 for ; Tue, 8 Mar 2011 15:19:52 +0000 (UTC) Received: by iwn33 with SMTP id 33so5772012iwn.13 for ; Tue, 08 Mar 2011 07:19:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:date:from:to:subject:in-reply-to :message-id:references:user-agent:x-openpgp-key-id :x-openpgp-key-fingerprint:mime-version:content-type; bh=3sk4oGxXF0MFgHC8YtXR3NRNS8BL18eQQV5o8jXyqqQ=; b=bVSxy89zC+GvULRBxvet9NvY20JyfmGT/P0q96HXR0VN/iFijKuIKBQQ6ieb12Qw0w 8GQ+KLC0G3uZp2iJi9xV8jKcavNMVu2fCYbDzsXGcQtOqTmBM9bg/XXmyyhLlia4jlbl ZGF5r7mneUl/jGdHuRTvqLfnSBd51Vz4Mnuwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=wPNwFpkojvboceNV9tcR8tMWr+qa+Vu7MGMANHUc7hlMsziN8EB/t3BK5ZWpZNKebC vYjFtKQitXF1iZwP2by26qmFL2qaw6T+cKf4Fy8vMIk7oTy4Z2RzyqkpNVDtMWlA3ChA y25Iv5HEh16bceAbKrSYLxXTqCn9+QtIWePuA= Received: by 10.42.151.195 with SMTP id f3mr6384383icw.472.1299597592495; Tue, 08 Mar 2011 07:19:52 -0800 (PST) Received: from disbatch.dataix.local (adsl-99-181-148-141.dsl.klmzmi.sbcglobal.net [99.181.148.141]) by mx.google.com with ESMTPS id wt14sm640575icb.16.2011.03.08.07.19.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 07:19:50 -0800 (PST) Sender: "J. Hellenthal" Date: Tue, 8 Mar 2011 10:19:30 -0500 From: "J. Hellenthal" To: FreeBSD Stable In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="80310268-209080405-1299597590=:40738" Subject: Re: sys/x86/isa/clock.c:189: undefined reference to `cyclic_clock_func' X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 15:19:53 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --80310268-209080405-1299597590=:40738 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 8 Mar 2011 04:18, jhell@ wrote: > On Tue, 8 Mar 2011 03:29, jhell@ wrote: >> >> Hello Stable@, >> >> Compiling a kernel on stable/8 with DTrace support is failing with the >> above >> subject line upon linking kernel.debug. >> >> The text leading up to this is: >> ... >> ctfconvert -L VERSION -g vers.o >> linking kernel.debug >> clock.o(.text+0x84c): In function `clkintr': >> /usr/src/sys/x86/isa/clock.c:189: undefined reference to >> `cyclic_clock_func' >> >> And upon inspection of clock.c: >> #ifdef KDTRACE_HOOKS >> #include >> #endif >> >> And in clkintr(): >> #ifdef KDTRACE_HOOKS >> /* >> * If the DTrace hooks are configured and a callback function >> * has been registered, then call it to process the high speed >> * timers. >> */ >> int cpu = PCPU_GET(cpuid); >> if (cyclic_clock_func[cpu] != NULL) >> (*cyclic_clock_func[cpu])(frame); >> #endif >> >> >> It seems for some odd reason that is being forgotten >> when >> it comes time for linking ? What is going on here ? >> >> Id like to just remove the ifdef's for KDTRACE_HOOKS just to get the build >> to >> finish but in the case that I want to build another kernel without dtrace I >> would have to add them back. Anyone have a better fitting solution to this >> ? >> >> Would it be just as good to re-ifdef this to ?WITH_CTF? instead. >> >> Anyway... this is latest code from stable/8 on i386. And yes options >> KDTRACE_HOOKS is in the kernel config. >> >> And the command that caused all this: >> ( make kernel WITH_CTF=1 ) >> > > In light of this I decided to just remove the effected section of clock.c > and move forward as this part of the kernel with DTrace is not what I am > looking into. > > Attached is a small patch that removes it in case someone else comes > across the same thing and needs a quick workaround. > To my best belief the cause is this i386 build is being done without "device apic" that includes I/O APIC (local_apic.c) which defines in a ifdef KDTRACE_HOOKS ( cyclic_clock_func_t cyclic_clock_func[MAXCPU]; ). Since the lack of I/O APIC being used, sys/x86/isa/clock.c needs its own definition of the same cyclic_clock_func, so I have added this in the same way that its implemented in local_apic.c to clock.c and the build succeeds and is usable. Would it be best to just move cyclic_clock_func definition to dtrace_bsd.h instead ? and remove the definition in local_apic.c ? Additional references: ( Thanks to rwatson@ ) http://fxr.watson.org/fxr/ident?v=FREEBSD8&i=cyclic_clock_func Attached is the patch that solved this here but its just adding another definition that could probably be avoided by adding it somewhere else. - -- Regards, J. Hellenthal (0x89D8547E) JJH48-ARIN -----BEGIN PGP SIGNATURE----- Comment: THIS SOFTWARE AND/OR CONTENTS IS PROVIDED BY THE AUTHOR ``AS IS'' AND Comment: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Comment: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR Comment: PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY Comment: DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL Comment: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS Comment: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) Comment: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, Comment: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING Comment: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE Comment: POSSIBILITY OF SUCH DAMAGE. iQEcBAEBAgAGBQJNdkkMAAoJEJBXh4mJ2FR+8j4H/3qcymOBXvbMj2fqILJA/2xx Xj+Og+INWT+3NAM95Ljeq375lLeV0h3FzXUKrHB+z/bQlY8NYdBdZHOtEUWl1ZvV 5W5RGAncSJq1cBU+EMOoGprvmwWaNIYIHJUUHSpSrJbhwdW53unP285ts4bqvk0I eirtOitgmaiyOzBpJAIfDBBWU7RgQWCc/IFsm6GAU90JmjATy65kEeBtba6fNVcV SlHqu5OmtuVN6eHEq/rf3Ai8jGktwvuS9Flgf4rM+u/tZTA1nC9cfo97Rbtek9TH lQ/yZe9U7Wz4OFSdidMoY1nJN3CYisp3Kq+gqabsd3XDkJQQiXcBIIh61hnnjog= =tC6l -----END PGP SIGNATURE----- --80310268-209080405-1299597590=:40738 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=cyclic_clock_func_t.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=cyclic_clock_func_t.patch Y2hhbmdlc2V0OiAgIDk1Mjo1ZWI3ZGU4ZGNkYzANCmJyYW5jaDogICAgICBE YXRhSVgNCnRhZzogICAgICAgICB0aXANCnVzZXI6ICAgICAgICBKLiBIZWxs ZW50aGFsIDxqaGVsbEBEYXRhSVgubmV0Pg0KZGF0ZTogICAgICAgIFR1ZSBN YXIgMDggMDg6MjA6MjggMjAxMSAtMDUwMA0Kc3VtbWFyeTogICAgIGN5Y2xp Y19jbG9ja19mdW5jX3QgY3ljbGljX2Nsb2NrX2Z1bmNbTUFYQ1BVXTsgZGVm aW5pdGlvbi4NCg0KZGlmZiAtciBlMWM4YTIwZWI0YjIgLXIgNWViN2RlOGRj ZGMwIHN5cy94ODYvaXNhL2Nsb2NrLmMNCi0tLSBhL3N5cy94ODYvaXNhL2Ns b2NrLmMJVHVlIE1hciAwOCAwODoxNjo1OSAyMDExIC0wNTAwDQorKysgYi9z eXMveDg2L2lzYS9jbG9jay5jCVR1ZSBNYXIgMDggMDg6MjA6MjggMjAxMSAt MDUwMA0KQEAgLTgyLDYgKzgyLDcgQEANCiANCiAjaWZkZWYgS0RUUkFDRV9I T09LUw0KICNpbmNsdWRlIDxzeXMvZHRyYWNlX2JzZC5oPg0KK2N5Y2xpY19j bG9ja19mdW5jX3QJY3ljbGljX2Nsb2NrX2Z1bmNbTUFYQ1BVXTsNCiAjZW5k aWYNCiANCiAjZGVmaW5lCVRJTUVSX0RJVih4KSAoKGk4MjU0X2ZyZXEgKyAo eCkgLyAyKSAvICh4KSkNCg0K --80310268-209080405-1299597590=:40738--