From owner-freebsd-toolchain@freebsd.org Mon Oct 17 21:11:48 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15718C15DE5 for ; Mon, 17 Oct 2016 21:11:48 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C42D1918 for ; Mon, 17 Oct 2016 21:11:47 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x231.google.com with SMTP id z190so259114662qkc.2 for ; Mon, 17 Oct 2016 14:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=DfUv/Sq7E+qkgnqcOnDEzVYMkgksEjclrxSCCfI+pqc=; b=ckLZb01mUes2lPj2sZ6yoUwj3ObdlCCmO33zKlbft1aV6fdqHvjpuU4xLUZm13Kp4p NsIHSXuR8jlkHNjB9w0lE8xzvuWvjD+u/+gY91QQdEJCyZQJn/ZcgH9fJHprRiaZI/oZ iGA09kUFbPAo3+yt28O6WBqpWANP55anVvEF064rnwgm+sfx3FRAeYHhIPMuPMHiDezx 22CY66Em6rUVKq3mqAWhudLz7RzBclCzf6i+llTQ9tOa5G0pAC7TI2AFOeqJRnFCElTa rFYYGfWbj/kaAm1kZwR0iPUzkZAk9eTOKXGhNxIvx1qxB3zzeckq8/qGYDBxrOWenR9S vViA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=DfUv/Sq7E+qkgnqcOnDEzVYMkgksEjclrxSCCfI+pqc=; b=PMrWMHp4uB/QgzKHI3rmmQiadx29HO5R66zokkxMb0p8OwGD96nYZDzW+ykCVExxoK WJzs6moUPmlwNcywzDgOd4/24CsbKo0ii9AJF7ySth4Nc+G+Lq79EthppDjqdXs/cDpO wchpmUypnHyMzxZA4xYIxI1jcOq8LEjz2uTB5ifymBN4NkcqOXOvo6L+OENKOCWIPSub WXG+0lGV600l9K1Q/UYTS5ZkZzcrlRWAnlxXelHzjuEPUTcyP07Udt7ztH5LIHhjNqv8 VAAlqkD9xcEnjs2lj6D7waMfG8HRcI5+DLoU5N4TjIOnZTqrD1wQUklZ2WgQ6FLoP8cU aCqA== X-Gm-Message-State: AA6/9RlywU6/iiHdngFBNcdcHHeA6T7CW4SzMmuZ6+XoGiTABLGohyrKO5dwyfkOmGPVJHcgKLVuskdncQUa2h/t7/PyaIYP8Q32FeA8w6S/9DeeGJfhp5HRIxK7g3pURxz79/Hh1KFHiurC0HaLr3yk8rhmPEBm/uMzzzY4gkD+l4/+r1WtQr6SO3ph3gB1aOFdxxrzWbo= X-Received: by 10.55.169.65 with SMTP id s62mr30481611qke.105.1476738706667; Mon, 17 Oct 2016 14:11:46 -0700 (PDT) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id v5sm16079711qtc.24.2016.10.17.14.11.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Oct 2016 14:11:45 -0700 (PDT) Date: Mon, 17 Oct 2016 17:11:43 -0400 From: Shawn Webb To: freebsd-toolchain@freebsd.org Subject: RPI3 - clang 3.9.0 issues Message-ID: <20161017211143.GA20952@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 21:11:48 -0000 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey All, I'm submitting this report to this list as directed by Ed Maste. The Raspberry Pi 3 is an ARMv8 SoC dev board. Within the last week, FreeBSD added basic initial support for it. We don't currently have a linker in HEAD for the arm64/aarch64 platform. The projects/clang390-import branch contains lld, though, which supports arm64/aarch64. Over the past few days, I've been working on testing clang 3.9.0 and lld on the RPI3. I've jotted down a few issues in FreeBSD's wiki: https://wiki.freebsd.org/arm64/rpi3 Mainly: low-level code like bootloaders (boot1.efi and loader.efi) do NOT work with projects/clang390-import. When I use boot1.efi and loader.efi compiled with HEAD (clang 3.8), they work. When the kernel is compiled with clang 3.9.0, it seems to freeze after being loaded by the clang 3.8 boot1.efi/loader.efi. I'm unsure if it's actually frozen or if simply nothing is being outputted to the console. Either way, I don't see console messages and the RPI3 _appears_ frozen. I'm tracking down a potential issue with jemalloc compiled with clang 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD in addition to HardenedBSD. Most of my testing has been done with HardenedBSD to-date. If I find more issues or find the causes of the ones I've already documented, I'll be sure to not only update the wiki, but update this email thread as well. If there's anything anyone would like me to try, please let me know. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBT6NAAoJEGqEZY9SRW7uuQwP/RWfUbyLzyI1Dvxdh1kfNMXU wNTt25jBA0FEnlkgDYjXSIiJpccj2F532bqVxaiIpQpnq2PnL0g5lVa+SuAzxX6B ODpe94hyVAvR/sDxNHKofULIdH8vvUaUphTKirAQcS6KSogUN374dzVd/T4drf/o II8Vbakr4w83P7b18UYPlnLac2WTXS6qJElYbHd7tX2RFMHXWIfrnKVZIkHxI/3s 3Afj+yUKtuV/JjdAmwZSBuHbLFzOl+xu+udigVV83qweo2g10gZ7ygTs9lFhQMSK K+z5gansnUpFjZ/DkvKVXypp1B1Ty+w9Lm1XGfYZJEvf5DcoNXTT1nlcEbayBuYA ALyM3A9GE2A/2ilqy58+55hS5eGxC2ulnoSgRbPzmNMVNBE/S4BYd7kUKl3QkzFT XQjcKDxGJLOXgYNgKUK4llNg/XntP2Fmh68b+XtRL7Y/kFapL3qqp3tHlnRPWxSb kkAPnZEk6ol27k5HM35e6TtvGBnCoo+SsEqfSa53oeJbjvN7+PuMfufhr++qHzSx ThKIZ33qsSJkk3lTEC28JROwDDOX14codkWmHdBUVcpShUBPvutZABCe1W8b8vGe 66DoglD3WN76TA3GWZhS/oGiYStoplDYIzDlT/r2dcVdX4U4GT/WkhC7FvMOvdwb x/tqUpSYxVgdzG+O6tvR =bsJ7 -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK-- From owner-freebsd-toolchain@freebsd.org Mon Oct 17 21:19:04 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62B79C15E64 for ; Mon, 17 Oct 2016 21:19:04 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20020A85 for ; Mon, 17 Oct 2016 21:19:04 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x233.google.com with SMTP id q192so202512945iod.0 for ; Mon, 17 Oct 2016 14:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=f20JczM6D+Y4lkv69kMUjGNi9CcW8jvkgXMMdqz59z8=; b=IgniCRdTjyfiE/jg7ietdOErAVkXgvqHHlO6reC4pnO8yZKFIil5j3Ty4L6mgiwqg4 8XsFpr+RlnXiiuIMMIdZIXLXadDyBB9x+e/rYFDwuzPalAdB0d8rykOOX/MV5CxbiDDR 6KB3LeYR05BCAn/Wdsvf5+n4ysiy4E6HIQEmgxq23MpCJNgZjfDahr8/GTFcRdE4x7n6 VCKjoqB65pBN5+4fU8C3Ajlth9mDMLxZdfu84oqSKU69ju7Z3DgidB8gy7vY7v87XKNe CjUaJwsT+MiGgeCHqUTGAJh8fwHnQlMLu61vbvZNi+/qRxVuVMSuRJfPBcwXqk/ybuM+ +w0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=f20JczM6D+Y4lkv69kMUjGNi9CcW8jvkgXMMdqz59z8=; b=Ghbax0s6BQfdEDLM4zdql3Uaypq4oEPaodDGjgdIiVft8mkzauAkjBCxWgA5Xrtn8p gBJrYaHnTS5dRIU9/e3bsGAbmkPCWKuj/uxRex6L2rk2lzD4C0EYkq3AtG39WKlrccxr tP29GGI52CP0WrsphlDQrIYiN9Ud4euBO0jgDeZnQXJ+t0jCuh1Kk9Stu/skoWXdH3/J Q8gJHErhMYriG00mu09Slf5bLZx809qqV6qW+A3/Omf/ER38xebCWCyyqQBolBhrQaB6 JyGoXp9OesEccd1vLUMB3UV6V8W1xTPL71UycoIR3RUKUAIIvfTegAkjAVs9ezfbW7Y4 bA9A== X-Gm-Message-State: AA6/9Rmo4lCw7REH0mYJN3FW3I1G2SOEGmzFouu+4KJoGcvcyasmW31aCdLJPToTUuNZQSV/HOLUlST8RdPVGg== X-Received: by 10.107.179.70 with SMTP id c67mr24200183iof.169.1476739143496; Mon, 17 Oct 2016 14:19:03 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.180.211 with HTTP; Mon, 17 Oct 2016 14:18:42 -0700 (PDT) In-Reply-To: <20161017211143.GA20952@mutt-hardenedbsd> References: <20161017211143.GA20952@mutt-hardenedbsd> From: Ed Maste Date: Mon, 17 Oct 2016 17:18:42 -0400 X-Google-Sender-Auth: 83LnhgWppbWt27pFQCKcQBd5LNU Message-ID: Subject: Re: RPI3 - clang 3.9.0 issues To: Shawn Webb Cc: "freebsd-toolchain@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 21:19:04 -0000 On 17 October 2016 at 17:11, Shawn Webb wrote: > > When the kernel is compiled with clang 3.9.0, it seems to freeze after > being loaded by the clang 3.8 boot1.efi/loader.efi. I'm unsure if it's > actually frozen or if simply nothing is being outputted to the console. > Either way, I don't see console messages and the RPI3 _appears_ frozen. This will probably be a bit tricky to track down. Have you tried booting a Clang 3.8-compiled kernel with a Clang 3.9 boot1.efi and loader.efi? Do you get any kernel output, or nothing after the last lines of loader output? From owner-freebsd-toolchain@freebsd.org Mon Oct 17 21:25:29 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18174C161C6 for ; Mon, 17 Oct 2016 21:25:29 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7A97EB5 for ; Mon, 17 Oct 2016 21:25:28 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x235.google.com with SMTP id s49so135132621qta.0 for ; Mon, 17 Oct 2016 14:25:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p9HEyMCWTLyP696iBk/Goc51s1HySmnbhsKqK8jow5U=; b=U4+n9uH28SgQ0W67gQOSYLy+y7/0kdYfZgyxM8qVzXCTwLrGUe9mqNpVgSz+WuIQFg 3PZxgWG762QisrTf3FNNxemVzlwBu9ocDRViF36M1LMS0kG6w058R3wGEcL0r/VZ2QHS DnUTjMyf0PbC46g1p436OVwe6KN6BqL6HIHAVk4CYVzYiFKormYtQYfr2nfoTtp2vGY8 o4ABlTPuvzP5fD+4ztMtWAoIfXAj+DgthLEI8DqjamOkAxv3OFqsvt6Dg8qT1F9A4d0v /VXqXyUJ4+JFUIIQoURCJ5vp8Fp7pV3/grUTqngGunt8p2J6se9J6RWKDMK0dd53NscT clJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p9HEyMCWTLyP696iBk/Goc51s1HySmnbhsKqK8jow5U=; b=XaUcZZFwZPXDMrEKlSGd1Iq50lkelEFLlzguP2I9u4tu+5tkTnBHkljljGXDJvoxRo NSxZzwH7oCyzY8OA7mj/Cw4YkmPij/Ass24TrL/VMV4YVDGgbCPtiAQuO2wql5A/Ht/5 d+/reNOnTgJ1ITh1k8Hp6lQmejLeNMX6cUvY6nSZvGepalhPoiSmDF0gpQl8i2Yy0GAE rKIjEaq0vD0y49l/V6Zd9TzUhR8xWSN2W166HAnACsh+VcE+GfnRPNk4405Zi4bOc38h soISC2Ui8reJqGji9otE9yo0Wo6L86cSXkVcLsMDz03N5z7PYIBdXIFnAUTxrMzaUzrw aH1A== X-Gm-Message-State: AA6/9RlKFG/D1HwfVxBV7UVhjLPsF1Q5SbpsmtXzbPG6oP7x6fcjxDrqpq6unr8A/dWUBqZj X-Received: by 10.200.43.233 with SMTP id n38mr24388204qtn.139.1476739527924; Mon, 17 Oct 2016 14:25:27 -0700 (PDT) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id q62sm16159505qkb.4.2016.10.17.14.25.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Oct 2016 14:25:26 -0700 (PDT) Date: Mon, 17 Oct 2016 17:25:25 -0400 From: Shawn Webb To: Ed Maste Cc: "freebsd-toolchain@freebsd.org" Subject: Re: RPI3 - clang 3.9.0 issues Message-ID: <20161017212525.GB20952@mutt-hardenedbsd> References: <20161017211143.GA20952@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="O5XBE6gyVG5Rl6Rj" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 21:25:29 -0000 --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 17, 2016 at 05:18:42PM -0400, Ed Maste wrote: > On 17 October 2016 at 17:11, Shawn Webb wrot= e: > > > > When the kernel is compiled with clang 3.9.0, it seems to freeze after > > being loaded by the clang 3.8 boot1.efi/loader.efi. I'm unsure if it's > > actually frozen or if simply nothing is being outputted to the console. > > Either way, I don't see console messages and the RPI3 _appears_ frozen. >=20 > This will probably be a bit tricky to track down. Have you tried > booting a Clang 3.8-compiled kernel with a Clang 3.9 boot1.efi and > loader.efi? Do you get any kernel output, or nothing after the last > lines of loader output? I haven't. clang 3.9 boot1.efi won't run in the slightest. It crashes prior to me being able to even use printf. I could try a 3.9 loader.efi with some extra printf debugging, though. A clang 3.8 kernel works perfectly when matched with a clang 3.8 boot1.efi and loader.efi. The clang 3.9 kernel doesn't output a single thing. I could probably try some printf based debugging early in the process. But it's clear that loader.efi loads the kernel and tries to execute it. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --O5XBE6gyVG5Rl6Rj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBUHCAAoJEGqEZY9SRW7uWXUP/3E7aNo4UVp0FMe4py1gG7D/ fNU5jK4Q/22E4oJg47v70WyAdFdfpFxjrqre45ntwEtBoXxIR0eNhzZpKQIWOGf7 gM3n/WU+8doCmNQ6V/HL5IAxoBnxPtb8cBjIcp4qDlPH0FHtfpx2xcndhC1n3JIw 1kJywinIDGtnT1PptylyaWaRs/oi6OtS7TpZTJ4OJ3CKtM6ZcY8k/cTKMd9rqhpF Zyyf7mPbpZaWz/9P8box4yR5399mGYbNoxPzdICTZQm6u0sWNeV9ZXTAK6p1jUVz uOnRujNVxAHW7xZhvrXYhTbt+GXOULTMiraapY7Jmw47uQgDpjUZeBQNLzhb2PCA 6+kwcOkEq66HYl4vQo1MznKliJ34ZZMWM5GSOdmHLc7XKbEF5/C23IpV3lEhFfAQ 37/depuv7brniJVonopyRmKvn41Q2idUerI6CYouktf+/XAg+6uKnrrVv/+feAx5 WWH8c3HZ1qhtT6HO375G5c5goBsUiDZNJSZBZg9jIz8HHG9kcF5RpHu85Zmb8EeW bK1pSmnoM4SUZdUI320zFViY1XGz3JNC/FW+ZZrOnsIN3XxwRGAmzE7u4kdQO2tt n7ti4Y5Xv/5knIUNGeWfD7GOgVoglDiM0jk+Ky23LFDTmesc/tPbHCk8x4sjMyew gDlcXFX8CnFNpTpFDrbt =CokU -----END PGP SIGNATURE----- --O5XBE6gyVG5Rl6Rj-- From owner-freebsd-toolchain@freebsd.org Mon Oct 17 21:31:30 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E73FC162E7 for ; Mon, 17 Oct 2016 21:31:30 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-39.reflexion.net [208.70.210.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 545DA79 for ; Mon, 17 Oct 2016 21:31:29 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 16254 invoked from network); 17 Oct 2016 21:24:40 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 17 Oct 2016 21:24:40 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.10.0) with SMTP; Mon, 17 Oct 2016 17:24:47 -0400 (EDT) Received: (qmail 629 invoked from network); 17 Oct 2016 21:24:47 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 17 Oct 2016 21:24:47 -0000 Received: from [192.168.1.107] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 3EEBAEC8B1B; Mon, 17 Oct 2016 14:24:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: RPI3 - clang 3.9.0 issues From: Mark Millard In-Reply-To: <20161017211143.GA20952@mutt-hardenedbsd> Date: Mon, 17 Oct 2016 14:24:41 -0700 Cc: freebsd-toolchain@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20161017211143.GA20952@mutt-hardenedbsd> To: Shawn Webb X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 21:31:30 -0000 [A quick top post about synchronous aborts for aarch64.] = http://infocenter.arm.com/help/index.jsp?topic=3D/com.arm.doc.den0024a/ch1= 0s02s01.html says: > Synchronous exceptions can occur for a number of possible reasons: >=20 > =E2=80=A2 Aborts from the MMU. For example, permission failures = or memory areas marked as Access flag fault.=20 > =E2=80=A2 SP and PC alignment checking. > =E2=80=A2 Unallocated instructions.=20 > =E2=80=A2 Service Calls (SVCs, SMCs and HVCs). >=20 > Such exceptions may be part of the normal operation of the OS. For = example, in Linux, when a task wishes to request allocation of a new = memory page, this is handled through the MMU abort mechanism. >=20 > In the ARMv7-A architecture, the prefetch abort, Data Abort and undef = exceptions are separate items. In AArch64, all of these events generate = a Synchronous abort. The exception handler may then read the syndrome = and FAR registers to obtain the necessary information to distinguish = between them (described in more detail later.) =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Oct-17, at 2:11 PM, Shawn Webb = wrote: Hey All, I'm submitting this report to this list as directed by Ed Maste. The Raspberry Pi 3 is an ARMv8 SoC dev board. Within the last week, FreeBSD added basic initial support for it. We don't currently have a linker in HEAD for the arm64/aarch64 platform. The projects/clang390-import branch contains lld, though, which supports arm64/aarch64. Over the past few days, I've been working on testing clang 3.9.0 and lld on the RPI3. I've jotted down a few issues in FreeBSD's wiki: https://wiki.freebsd.org/arm64/rpi3 Mainly: low-level code like bootloaders (boot1.efi and loader.efi) do NOT work with projects/clang390-import. When I use boot1.efi and loader.efi compiled with HEAD (clang 3.8), they work. When the kernel is compiled with clang 3.9.0, it seems to freeze after being loaded by the clang 3.8 boot1.efi/loader.efi. I'm unsure if it's actually frozen or if simply nothing is being outputted to the console. Either way, I don't see console messages and the RPI3 _appears_ frozen. I'm tracking down a potential issue with jemalloc compiled with clang 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD in addition to HardenedBSD. Most of my testing has been done with HardenedBSD to-date. If I find more issues or find the causes of the ones I've already documented, I'll be sure to not only update the wiki, but update this email thread as well. If there's anything anyone would like me to try, please let me know. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE From owner-freebsd-toolchain@freebsd.org Tue Oct 18 01:40:57 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8CDCC15192 for ; Tue, 18 Oct 2016 01:40:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF5A129 for ; Tue, 18 Oct 2016 01:40:57 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x22c.google.com with SMTP id q7so140916688qtq.1 for ; Mon, 17 Oct 2016 18:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sfApMuyk5xj2JScGhSwMtwmaSBNjChZa9eXhwKduQ3I=; b=Yy95W/aUqudmx/YrnBfxZG7hvFxl91J6GstoMYdpoUyf7d2QYGx7hQiSGrtYzfaeK5 bk9KZdmXGwrNYC6s6RzSoXKHx2Ftqo8cI7/DcdoF2rlawQTLK2k/TPY2cvzLzAgGZfMD QhCdan+PBC1I9FNiyQkfzcyUslQdiujamSl4f1ws1cy2WySr4bOje1fsA90gF3h5c7qu oQ6GkpHVf+QyyYk9zJyVVuEwS/erpqFQgc5zNU21XfbaNAkw8RkEPLuljSKeocgygI/X 1cC9TSaS9BBpYWAKg30VkJg/24na0/hJQQAOMEn+xNnCF3oikuYbvnoTjnxc8qGgWqdm jqbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sfApMuyk5xj2JScGhSwMtwmaSBNjChZa9eXhwKduQ3I=; b=BUjM6LCA/rBQLS2O0D0858mJjPAy2eCWNCrzXvPBRZRvDddXhneKBjYBbs9hxO7UJm 1sRRpXNe9xmEf9iWyUP2qxrPu9YgQ8UMlt6/eGLdtzDhF+S7TfEjVamC3waAp5p7eB5j gKvFJGtg14CMDWmWwQ7wJ+UuNdgJXqgRiltCDSLbqfdUDhfH13rsv8OmgBUPgXBPmpKD jcjm8MjXIn0lZdZ64inS4VgGJrHLLHYlTYJidX5CyhZT9h0TwBRZX7NlTjoE1XdPjdHy pONKF25G7vdmxzNYHrjjnA8hF+HA5sn2PmhKrshoK6ibg5YgoZ3YZ1ys/GZeExItjGtZ Lkwg== X-Gm-Message-State: AA6/9RmfF0EFlejgOWuxmgWkdOHfVcWXHnR2OnTcXW1Z4kuvbCDWsrTLKvEIbwfeHRGF4XcabiYv/IoQMJFgesyd4qEBpSCTPPJRuf22uVwkeDEAwAxcy2eURx9Nm9Hh7Y4Ou1tJJtnUtW4mVgC/+sNj91t1Z1zqwqOKgBv+i0XCfSkWSSdvXJ9UEohb6OntlMOtZBL1fJE= X-Received: by 10.200.56.151 with SMTP id f23mr389332qtc.2.1476754856275; Mon, 17 Oct 2016 18:40:56 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-218-231.bltmmd.fios.verizon.net. [100.16.218.231]) by smtp.gmail.com with ESMTPSA id u44sm16669022qtu.5.2016.10.17.18.40.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Oct 2016 18:40:54 -0700 (PDT) Date: Mon, 17 Oct 2016 21:40:53 -0400 From: Shawn Webb To: freebsd-toolchain@freebsd.org Subject: Re: RPI3 - clang 3.9.0 issues Message-ID: <20161018014053.GA793@mutt-hardenedbsd> References: <20161017211143.GA20952@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <20161017211143.GA20952@mutt-hardenedbsd> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 01:40:57 -0000 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 17, 2016 at 05:11:43PM -0400, Shawn Webb wrote: > > I'm tracking down a potential issue with jemalloc compiled with clang > 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD in > addition to HardenedBSD. Most of my testing has been done with > HardenedBSD to-date. The jemalloc issue exists with vanilla FreeBSD with clang 3.9.0 + lld: =3D=3D=3D> Registering installation for pkg-1.9.1 : /scratch/arm64/fbsd-clang390/lib/libc/../../contrib/jemalloc/in= clude/jemalloc/internal/tcache.h:346: Failed assertion: "binind < nhbins" With pkg failing to install, it seems building ports/packages directly on the rpi3 won't be viable until this bug is fixed. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBX2iAAoJEGqEZY9SRW7uVygP/2iJ2zGIQatAXYmqzWInO6sD EwVa6diaTs8M7S0CMwy6Wvze80qxHqJ3Le8QaQcU1gbJzpmCYDnamDSZs80Jo/BI qivaVtwCdw367ZDaSOZ38v2f+20DzdXxNjJNO9mMadFgaeGHDfVTTnDEuxRGt1BK Fz+kc6RqcTBWylxJYBGxB8pozTfgaJqug3okxeEt6maglxbLgsnKNO+8Ow0EzjRs ChqsQg4Tm722rc24cxqxB8u39OovSufQo3mFn7oKdxjp/PLxGyRBrCOTdT7UTX/R hStqWMKxzuv+pQkrPDUbLZF+YoY7+j9nbFYVgLtj4DGcT8trKPtO4l0MkdCm6OlN Mi3dBo1qblBGdHXFN36ZeaFFZbCHgsGFpUR4UAHzMSAa+qvU5l34pklVgiOeV4Wf UBZLJLt4I9sD8U9vz55Dzau2vvGSGT4SACuCKyIra7CRFUbeHq1bQpLyF+oEz8TJ Htwmt6jCrDkRd+Bud5EVdUA0A9G4lFtq91gNgC1hz36sfXte3f4kd2W9KVE7o/Jj UleTazV6qsH8sDHDdfC9VXG56JggzziTlxDft9cUoA81glJRjfhQaaFSpNIrus+T pcFWI5jg/GO+jY0nir6Q2SloEOS8JBW9n8Rut65t89fdWWDDnpjQTMYOD2GBTi4n SDT9jGMQWRW0+5W/oAvG =EDCJ -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT-- From owner-freebsd-toolchain@freebsd.org Tue Oct 18 19:27:48 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3326DC17598 for ; Tue, 18 Oct 2016 19:27:48 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED459C8E for ; Tue, 18 Oct 2016 19:27:47 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk0-x232.google.com with SMTP id o68so4972228qkf.3 for ; Tue, 18 Oct 2016 12:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2x52Y4mIqNE9JzLXrSm5b5SP/XSTaKB1nVVr4NZIo3U=; b=CAhXpH0uecsaMEbNeqVomR7Lp7v21iI5dBwJBrMnHZ9iEQJIsCilc/0jIP3a50wUdr FjRT021vXx/T106P85266wNlVKhz8ZDQbEGsE8gS7n0rWA3SD32ExfiblW/5AZaiGZ/P 51y+euzrSLf6BZ2bo4U/aughPv39iNfvBzRp7u/Qfnh95n6iGVwpCckjA9lz8Ljjc2b1 JgyYvd3MEWHrS2u9J2fAw1z6s866EafTjoeW/5AC8iPmUYVbLGVvajQocnuy8OJj3ub1 KIvJQ9EqkVALyTJPioH7jKYOmAr2IW/S7pJ5Zo9FDaGgy9we5dji9NN6l7zuFSnc5I5r Fpnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2x52Y4mIqNE9JzLXrSm5b5SP/XSTaKB1nVVr4NZIo3U=; b=dOgDnv9NwcPm9+ujZdwbInurn3OjlDXtD472HYCC3f2ckCOXZXxNDU/AiTULinRK8x +i+REslhe33V343eSi++OtMRPkYDFOhsuVhAbwUzvVIiX6fPUuAzivDtHe+JATU9Nz+U eQXA/Ah321Cko91bAYPH9aiWWhz4K1y9NmfLHd5+O5s+ULXC1vKxnGchoJgH+1541a2U 09L3vrrkpvmimHZuz+9XGbIMEckNUwahk1//PMjWXV+ewxBPcKoY0Ub/1Bn4uhebvn6q ENA7bvYh312ydr6sBFF3NAyK1D3GCt8etkJ7xIp3QWI+hFvyIQFlOhRAU54DK5QWFNy5 czsQ== X-Gm-Message-State: AA6/9RkCNEcatZWzFKxkpyFepBGhxkNVb1kcO/m7dZ3aMWE9mY7y7uSYYGTiav7NMFwGs5o5oXrlIpUVYUU0aTSum0pQ8Pzug8v9vS2GqvXQJm1IZpB1RCU6yC4kNetZLCR8Nsrv63wZkzrhONJQYH4lIdX6Z3BCvzsnyXO5RnBPoO1NcaaqlHWQXCrKYiDxSEGwdvO1YV0= X-Received: by 10.55.60.12 with SMTP id j12mr2591226qka.80.1476818866748; Tue, 18 Oct 2016 12:27:46 -0700 (PDT) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id d69sm18781979qke.45.2016.10.18.12.27.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2016 12:27:45 -0700 (PDT) Date: Tue, 18 Oct 2016 15:27:43 -0400 From: Shawn Webb To: freebsd-toolchain@freebsd.org Subject: Re: RPI3 - clang 3.9.0 issues Message-ID: <20161018192743.GA22296@mutt-hardenedbsd> References: <20161017211143.GA20952@mutt-hardenedbsd> <20161018014053.GA793@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <20161018014053.GA793@mutt-hardenedbsd> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 19:27:48 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 17, 2016 at 09:40:53PM -0400, Shawn Webb wrote: > On Mon, Oct 17, 2016 at 05:11:43PM -0400, Shawn Webb wrote: > > > > I'm tracking down a potential issue with jemalloc compiled with clang > > 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD in > > addition to HardenedBSD. Most of my testing has been done with > > HardenedBSD to-date. >=20 > The jemalloc issue exists with vanilla FreeBSD with clang 3.9.0 + lld: >=20 > =3D=3D=3D> Registering installation for pkg-1.9.1 > : /scratch/arm64/fbsd-clang390/lib/libc/../../contrib/jemalloc/= include/jemalloc/internal/tcache.h:346: Failed assertion: "binind < nhbins" >=20 > With pkg failing to install, it seems building ports/packages directly > on the rpi3 won't be viable until this bug is fixed. I was able to work around this issue by disabling tcache via malloc.conf: ln -s 'tcache:false' /etc/malloc.conf pkg would install, but /usr/local/sbin/pkg was mislinked: http://ix.io/1xlt So as a workaround to that, I just mv'd /usr/local/sbin/pkg to /usr/local/sbin/pkg.bak and replaced it with a symlink to /usr/local/sbin/pkg-static. I've now successfully compiled and installed a few ports. I've also updated the wiki to document the two workarounds described above. https://wiki.freebsd.org/arm64/rpi3 Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBnetAAoJEGqEZY9SRW7uugsP/2UNimILB7cXE9A7DICvvIdA bQyJMLX+1aYV95vmdOMC1oJjikcwLMIBIh95FQt4tln/AaR7W4h1jJRon8FchE1n qV/go8ZIvep7MG3l0tNeT6oia+dS2+jDz+slqA+WboV09bGWDQClrLdGLA7xsmUt vzUTFYpxzOLJ2ld+at4O4YQmJRy8xGK2xOdVtMbACjlDzDflwIkmm1EOdSbxwxgu NeZJfDhp4ACT4OgbI/JeGk4xJFrusSGMBYpJBdFJ42Bkh5J0K+lHUbIcjVOMmJT4 DFfE84WrULsTg2lVRG9extnOIdJFpAksUus909q+u6PvjWfiyNEiGffzgwjpRPmF YPftueVwqpWjhK+Zp7XEJ5CIezA1HHlpXHllJsI1083Ho7tqkZhLIZiikEzBNOmk FsIYDeBQHyMQOFy2sLR1/Rco9fYiVfANIa/89Cb7ktc2tlJKbMpco2emsjEysE2b +KwHvVIm7W0PbvDk9sIz6BInMh6+rK7szTWKe8RJXV0oxQaw4Wk6+XmAZXarAO3c hdUKXbZNOOtp180UK5ikefjWiWLlhZMUbsfsgYpEqVSAmZq6zt6O+pr6lm14FRUl goccF1fqqWXkvkbMbjGhXYVajoVihKE4daj+UR+mZEc8uIoYDhkQ2mEWu3Lzh22T GigIo4mqwsueCSJrF/ah =F5IY -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62-- From owner-freebsd-toolchain@freebsd.org Tue Oct 18 19:34:59 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74165C17713 for ; Tue, 18 Oct 2016 19:34:59 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0250AF45 for ; Tue, 18 Oct 2016 19:34:59 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x229.google.com with SMTP id m5so2582579qtb.3 for ; Tue, 18 Oct 2016 12:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=o+vBNw9CpCdbyW3RfSCztQKiLty7i9uYFdMWfEHPm7A=; b=GGIrQ83NKsvoa+8f71ooVeJcaqtqC+ZM7hZ07fY0lOzrU5ek8HuKCUUgwySVZSekEK 77ArYPf/BQ0PoV7s4Z3jC9xiZwrQ8b+vDr8hSf0UkyDan+IoYpH4LXauXH5MXpRelrmr 6PKRlaznoUvJzvGMYWggmCtzVg1BKmnTEDKqW5dq08CzjtgxhAoGGuXawrlRhAliLZYj b8+yZxhIrU859aVqXsrQNadayFu02eLPTNTPmTBX4Qhvsmzd/uYTSg/LA/uApsFw/M2J KYZ4xOs8lJ7/3iHRk/8+bJ8MF+YFfmtrV/LkBfYjmaaccvOx+5eNWlXQDfE4Ua9dai/d rNjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=o+vBNw9CpCdbyW3RfSCztQKiLty7i9uYFdMWfEHPm7A=; b=ma8SEqRbtNP0W3LCdIso1x0bGE/Yt/EOV9MBJQXOeLZGp3mWaEd3atw+aI9DdFEZST HVp1nINBR4YIhYANn3lRafvht7+t4jsnVVEL1HANMkAqENicEP5knGztJkftHVlFMkCZ u5bt9WcggKi+YT7k+Igp6lOHbh2rWJ9nW2pFjdYMmJKvoWOkG82SOaardWgrOn/HER9B zRoRKQSSn6ir/ZX6IxnaFF32hzYI4Ua3al3zAoSfheg+aMDmBKnNNKNZrYY9ke+RkCPU XPYdnbCvO1AD2AFr4Q6pQyAijY4feEP1W1nNztNXOX9VvhIfBvPY2VCcwLXlilQv92GY Bd/A== X-Gm-Message-State: AA6/9Rkj/aupLOmed7lqVpZf5JJieS8PZwgDo2eVt0K1O4Pl7ODWIkJomdCS0ExaMp1xjoAOgeO2mBPF+xeRAUNrR817iKAiKUGnpGY2h1h3yeVFZBSr/wtEDAGfMJqtIQbhGRAkKvrOKFXcBumes+NfwBQeJdwQi1gddp/AiM76V6FMNTq3bVVhjV0C5fAx9o5L6cWEdLw= X-Received: by 10.200.35.33 with SMTP id a30mr2378655qta.25.1476819297836; Tue, 18 Oct 2016 12:34:57 -0700 (PDT) Received: from mutt-hardenedbsd ([63.88.83.66]) by smtp.gmail.com with ESMTPSA id f16sm7761423qta.9.2016.10.18.12.34.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Oct 2016 12:34:56 -0700 (PDT) Date: Tue, 18 Oct 2016 15:34:54 -0400 From: Shawn Webb To: freebsd-toolchain@freebsd.org Subject: Re: RPI3 - clang 3.9.0 issues Message-ID: <20161018193454.GB22296@mutt-hardenedbsd> References: <20161017211143.GA20952@mutt-hardenedbsd> <20161018014053.GA793@mutt-hardenedbsd> <20161018192743.GA22296@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu" Content-Disposition: inline In-Reply-To: <20161018192743.GA22296@mutt-hardenedbsd> X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2016 19:34:59 -0000 --TRYliJ5NKNqkz5bu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 18, 2016 at 03:27:43PM -0400, Shawn Webb wrote: > On Mon, Oct 17, 2016 at 09:40:53PM -0400, Shawn Webb wrote: > > On Mon, Oct 17, 2016 at 05:11:43PM -0400, Shawn Webb wrote: > > > > > > I'm tracking down a potential issue with jemalloc compiled with clang > > > 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD = in > > > addition to HardenedBSD. Most of my testing has been done with > > > HardenedBSD to-date. > >=20 > > The jemalloc issue exists with vanilla FreeBSD with clang 3.9.0 + lld: > >=20 > > =3D=3D=3D> Registering installation for pkg-1.9.1 > > : /scratch/arm64/fbsd-clang390/lib/libc/../../contrib/jemallo= c/include/jemalloc/internal/tcache.h:346: Failed assertion: "binind < nhbin= s" > >=20 > > With pkg failing to install, it seems building ports/packages directly > > on the rpi3 won't be viable until this bug is fixed. >=20 > I was able to work around this issue by disabling tcache via > malloc.conf: >=20 > ln -s 'tcache:false' /etc/malloc.conf >=20 > pkg would install, but /usr/local/sbin/pkg was mislinked: > http://ix.io/1xlt It seems this type of mislinking happens with more than just pkg: (pkgconf-1.0.1) /usr/ports/devel/pkgconf/work/stage//usr/local/bin/pkgconf = - required shared library ./.libs/libpkgconf.so not found So I wonder if it's happening with all dynamically-linked executables in the ports tree. --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --TRYliJ5NKNqkz5bu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYBnldAAoJEGqEZY9SRW7uscQQAJgjbVOsLrrFkKYJsnlGEqHp MVXzvAdjxUWCXplcCe90GC9A0jQR2Vzv6l30tL2WZ3MLNCn1SRC41Kayc4Y5BuRx DjUZ8oo+HlW7m9eazS2/GXb0Rq/fax4nxGChcrIt/jly1mQISBzx1ysdSxy2Foko rLayVXu7OBJVyfmuvvB+HK4LlbTyAi7i4VORJIp/QpFcYcYjWjXgD0q5XVou/zFX Ou2tKcLFptMwgtB+ZX6BtBcKJbD++zHHVw2ALtZR3WQdVcSN5bzutWw0jq23LFNO +530l7MiJmPDXusROhhP9/jaTzMs31TfVL3Y1gHay9EykJxfOnALNVLZF1QIS3At 92Kr404IR4zGmY9063XFjSNnl9PGKw4JdGvcxNcSzZE8NG7e9dKTMKQyp9/lhXzX U+9GeKEWW1HBw4mdt6b1mzHXyxZAdnV88D5DHdGwgbN7qjT32YM4nQgalysgzVc/ WEdTwVDq67jzZOdBGY+lCABL32fXoRHJe484Ks0VtUmvTgjZS8/AX8CQ5FA+BAVl JozKaWl9jgNOZH15tF28SOnGKQpVQ3G8pdaH9ZY93tWCAaYZ9waFpWyWMc22cxkc D91CpELN0yhAg0I03llUcUTlfI03P43zEsio5xIiU8ZLXlzSexyg9Amdo4n0ytwO 9Bsn7OZnYfkWI0Yn1vs9 =TQiQ -----END PGP SIGNATURE----- --TRYliJ5NKNqkz5bu-- From owner-freebsd-toolchain@freebsd.org Fri Oct 21 13:09:55 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F04CC1B086 for ; Fri, 21 Oct 2016 13:09:55 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B344C61; Fri, 21 Oct 2016 13:09:55 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id DC0392B066; Fri, 21 Oct 2016 15:09:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id djxIqck8AW2i; Fri, 21 Oct 2016 15:09:51 +0200 (CEST) Received: from [192.168.10.67] (opteron [192.168.10.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 1577C2B065; Fri, 21 Oct 2016 15:09:51 +0200 (CEST) To: Dimitry Andric , FreeBSD Toolchain From: Willem Jan Withagen Subject: Seeking help with some Clang trouble, compiling ceph Message-ID: Date: Fri, 21 Oct 2016 15:09:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2016 13:09:55 -0000 Hi, All this Ceph stuff finally used to compile under FreeBSD. And all testss completed correctly. But somewhere in the Ceph-tree there was a lot of template and trait code added/replaced. Problem is that this compiles under GCC, but Clang throws an error. It looks like it cannot select types of automagic conversion. But this template/trait stuff is too much for me to wrap my head around. I'm reading up a lot, but that does not yet get me anywhere. So I was wondering if anybody with more C++ knowledge would like to assist and give some clues as to how to fix this. The error report is at: http://cephdev.digiware.nl:8180/jenkins/job/ceph-freebsd/39/consoleFull And the ceph code can be found at: https://github.com/ceph/ceph --WjW From owner-freebsd-toolchain@freebsd.org Fri Oct 21 15:07:33 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76BE5C1AB44 for ; Fri, 21 Oct 2016 15:07:33 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40CD47B9; Fri, 21 Oct 2016 15:07:33 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 00CF12B5BB; Fri, 21 Oct 2016 17:07:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7drRb6wGCc8V; Fri, 21 Oct 2016 17:07:28 +0200 (CEST) Received: from [192.168.101.51] (vpn.ecoracks.nl [176.74.240.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 3E3752B5BA; Fri, 21 Oct 2016 17:07:28 +0200 (CEST) Subject: Re: Seeking help with some Clang trouble, compiling ceph To: Dimitry Andric , FreeBSD Toolchain References: From: Willem Jan Withagen Message-ID: <7b6713f1-5671-bdc2-9cb5-97171146bc59@digiware.nl> Date: Fri, 21 Oct 2016 17:07:28 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2016 15:07:33 -0000 On 21-10-2016 15:09, Willem Jan Withagen wrote: > Hi, > > All this Ceph stuff finally used to compile under FreeBSD. > And all testss completed correctly. > > But somewhere in the Ceph-tree there was a lot of template and trait > code added/replaced. > Problem is that this compiles under GCC, but Clang throws an error. It > looks like it cannot select types of automagic conversion. > > But this template/trait stuff is too much for me to wrap my head around. > I'm reading up a lot, but that does not yet get me anywhere. > > So I was wondering if anybody with more C++ knowledge would like to > assist and give some clues as to how to fix this. > > The error report is at: > > http://cephdev.digiware.nl:8180/jenkins/job/ceph-freebsd/39/consoleFull > > And the ceph code can be found at: > https://github.com/ceph/ceph Oke, the preson responsable for the change helped to figure it out, and it looks like the following diff helps diff --git a/src/include/denc.h b/src/include/denc.h index 59f7686..caa095b 100644 --- a/src/include/denc.h +++ b/src/include/denc.h @@ -722,7 +722,7 @@ struct denc_traits< template struct denc_traits< std::vector, - typename std::enable_if::supported>::type> { + typename std::enable_if::supported != 0>::type> { typedef denc_traits traits; enum { supported = true }; @@ -831,7 +831,7 @@ struct denc_traits< template struct denc_traits< std::set, - typename std::enable_if::supported>::type> { + typename std::enable_if::supported != 0>::type> { typedef denc_traits traits; enum { supported = true }; And the conclusion is that std::enable_if<> does not always like it when the value is 'int'. the definition of supported is: struct denc_traits { enum { supported = 0 }; enum { featured = false }; enum { bounded = false }; }; and values can range 0..2. So is this a GCC liberalization, or is Clang here to picky? Thanx, --WjW From owner-freebsd-toolchain@freebsd.org Fri Oct 21 15:21:44 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C43FC1B272 for ; Fri, 21 Oct 2016 15:21:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF3DF16CF for ; Fri, 21 Oct 2016 15:21:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::d1be:e456:ed14:df1a] (unknown [IPv6:2001:7b8:3a7:0:d1be:e456:ed14:df1a]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id F132E123F5; Fri, 21 Oct 2016 17:21:40 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_58368D26-2D91-48DC-ABA8-AF07576FA4E4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Seeking help with some Clang trouble, compiling ceph From: Dimitry Andric In-Reply-To: <7b6713f1-5671-bdc2-9cb5-97171146bc59@digiware.nl> Date: Fri, 21 Oct 2016 17:21:33 +0200 Cc: FreeBSD Toolchain Message-Id: <8DCCD19E-01EE-4DB4-814E-396D3E450275@FreeBSD.org> References: <7b6713f1-5671-bdc2-9cb5-97171146bc59@digiware.nl> To: Willem Jan Withagen X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2016 15:21:44 -0000 --Apple-Mail=_58368D26-2D91-48DC-ABA8-AF07576FA4E4 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=windows-1252 On 21 Oct 2016, at 17:07, Willem Jan Withagen wrote: > > On 21-10-2016 15:09, Willem Jan Withagen wrote: >> Hi, >> >> All this Ceph stuff finally used to compile under FreeBSD. >> And all testss completed correctly. >> >> But somewhere in the Ceph-tree there was a lot of template and trait >> code added/replaced. >> Problem is that this compiles under GCC, but Clang throws an error. It >> looks like it cannot select types of automagic conversion. >> >> But this template/trait stuff is too much for me to wrap my head around. >> I'm reading up a lot, but that does not yet get me anywhere. >> >> So I was wondering if anybody with more C++ knowledge would like to >> assist and give some clues as to how to fix this. >> >> The error report is at: >> >> http://cephdev.digiware.nl:8180/jenkins/job/ceph-freebsd/39/consoleFull >> >> And the ceph code can be found at: >> https://github.com/ceph/ceph > > Oke, the preson responsable for the change helped to figure it out, and > it looks like the following diff helps > > diff --git a/src/include/denc.h b/src/include/denc.h > index 59f7686..caa095b 100644 > --- a/src/include/denc.h > +++ b/src/include/denc.h > @@ -722,7 +722,7 @@ struct denc_traits< > template > struct denc_traits< > std::vector, > - typename std::enable_if::supported>::type> { > + typename std::enable_if::supported != 0>::type> { > typedef denc_traits traits; > > enum { supported = true }; > @@ -831,7 +831,7 @@ struct denc_traits< > template > struct denc_traits< > std::set, > - typename std::enable_if::supported>::type> { > + typename std::enable_if::supported != 0>::type> { > typedef denc_traits traits; > > enum { supported = true }; > > And the conclusion is that std::enable_if<> does not always like it when > the value is 'int'. > the definition of supported is: > struct denc_traits { > enum { supported = 0 }; > enum { featured = false }; > enum { bounded = false }; > }; > > and values can range 0..2. > > So is this a GCC liberalization, or is Clang here to picky? It's hard to say without the full source code and a reproducer, but I'd say that enable_if has a bool as the first template argument, so it can't match an int by default. Maybe libstdc++ has a variant with an int as the first template argument, but I haven't looked. -Dimitry --Apple-Mail=_58368D26-2D91-48DC-ABA8-AF07576FA4E4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlgKMoQACgkQsF6jCi4glqPyrQCfT0p4RIyxgizAkmyevxCXXxM3 K58AoNtI56lg3AWLSj7H1p+tCQbqAlqH =p0uR -----END PGP SIGNATURE----- --Apple-Mail=_58368D26-2D91-48DC-ABA8-AF07576FA4E4-- From owner-freebsd-toolchain@freebsd.org Fri Oct 21 16:08:23 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C8AC1C12C for ; Fri, 21 Oct 2016 16:08:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3A8B7D4; Fri, 21 Oct 2016 16:08:22 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 8E1202B88F; Fri, 21 Oct 2016 18:08:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k8TLtclMiUYN; Fri, 21 Oct 2016 18:08:18 +0200 (CEST) Received: from [192.168.101.51] (vpn.ecoracks.nl [176.74.240.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 5907B2B88E; Fri, 21 Oct 2016 18:08:18 +0200 (CEST) Subject: Re: Seeking help with some Clang trouble, compiling ceph To: Dimitry Andric References: <7b6713f1-5671-bdc2-9cb5-97171146bc59@digiware.nl> <8DCCD19E-01EE-4DB4-814E-396D3E450275@FreeBSD.org> Cc: FreeBSD Toolchain From: Willem Jan Withagen Message-ID: Date: Fri, 21 Oct 2016 18:08:17 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <8DCCD19E-01EE-4DB4-814E-396D3E450275@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2016 16:08:23 -0000 On 21-10-2016 17:21, Dimitry Andric wrote: > On 21 Oct 2016, at 17:07, Willem Jan Withagen > wrote: >> >> On 21-10-2016 15:09, Willem Jan Withagen wrote: >>> Hi, >>> >>> All this Ceph stuff finally used to compile under FreeBSD. And >>> all testss completed correctly. >>> >>> But somewhere in the Ceph-tree there was a lot of template and >>> trait code added/replaced. Problem is that this compiles under >>> GCC, but Clang throws an error. It looks like it cannot select >>> types of automagic conversion. >>> >>> But this template/trait stuff is too much for me to wrap my >>> head around. I'm reading up a lot, but that does not yet get me >>> anywhere. >>> >>> So I was wondering if anybody with more C++ knowledge would >>> like to assist and give some clues as to how to fix this. >>> >>> The error report is at: >>> >>> http://cephdev.digiware.nl:8180/jenkins/job/ceph-freebsd/39/consoleFull >>> >>> >>> And the ceph code can be found at: >>> https://github.com/ceph/ceph >> >> Oke, the preson responsable for the change helped to figure it >> out, and it looks like the following diff helps >> >> diff --git a/src/include/denc.h b/src/include/denc.h index >> 59f7686..caa095b 100644 --- a/src/include/denc.h +++ >> b/src/include/denc.h @@ -722,7 +722,7 @@ struct denc_traits< >> template struct denc_traits< std::vector, - >> typename std::enable_if::supported>::type> { + >> typename std::enable_if::supported != 0>::type> { >> typedef denc_traits traits; >> >> enum { supported = true }; @@ -831,7 +831,7 @@ struct >> denc_traits< template struct denc_traits< >> std::set, - typename >> std::enable_if::supported>::type> { + typename >> std::enable_if::supported != 0>::type> { typedef >> denc_traits traits; >> >> enum { supported = true }; >> >> And the conclusion is that std::enable_if<> does not always like >> it when the value is 'int'. the definition of supported is: >> struct denc_traits { enum { supported = 0 }; enum { featured = >> false }; enum { bounded = false }; }; >> >> and values can range 0..2. >> >> So is this a GCC liberalization, or is Clang here to picky? > > It's hard to say without the full source code and a reproducer, but > I'd say that enable_if has a bool as the first template argument, > so it can't match an int by default. Maybe libstdc++ has a variant > with an int as the first template argument, but I haven't looked. Which I understand.... Ceph source is a rather big monster. OTOH it is mostly fetching with git, install-deps.sh and compiling, but it does require quite some packages to be installed. If you would be willing, I'd be able to give you a receipe or shell script to just do that. Or I could give you a shell account on the jenkins box and you go from what is there... So what you are suggesting is looking into the include tree of gcc and check what flavours of enable_if are there? And if it would take 'int' --WjW