From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#14789: BUG: Modules compile as ELF's on PE/PE+ architecture Date: Sat, 06 Jul 2013 15:09:53 -0400 Message-ID: <877gh3a4ji.fsf@tines.lan> References: <87wqp5asca.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373137869 26918 80.91.229.3 (6 Jul 2013 19:11:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jul 2013 19:11:09 +0000 (UTC) Cc: 14789@debbugs.gnu.org To: Vasiliy Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Jul 06 21:11:09 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UvXsy-0007qX-73 for guile-bugs@m.gmane.org; Sat, 06 Jul 2013 21:11:08 +0200 Original-Received: from localhost ([::1]:60863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvXsx-0005yU-MC for guile-bugs@m.gmane.org; Sat, 06 Jul 2013 15:11:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvXst-0005x5-Tk for bug-guile@gnu.org; Sat, 06 Jul 2013 15:11:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvXss-0005j3-Ng for bug-guile@gnu.org; Sat, 06 Jul 2013 15:11:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvXss-0005iz-L7 for bug-guile@gnu.org; Sat, 06 Jul 2013 15:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UvXss-0002Tw-Co for bug-guile@gnu.org; Sat, 06 Jul 2013 15:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 06 Jul 2013 19:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14789 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14789-submit@debbugs.gnu.org id=B14789.13731378299486 (code B ref 14789); Sat, 06 Jul 2013 19:11:02 +0000 Original-Received: (at 14789) by debbugs.gnu.org; 6 Jul 2013 19:10:29 +0000 Original-Received: from localhost ([127.0.0.1]:35332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvXsL-0002Sv-8G for submit@debbugs.gnu.org; Sat, 06 Jul 2013 15:10:29 -0400 Original-Received: from world.peace.net ([96.39.62.75]:42689 ident=hope7) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvXsJ-0002Sn-2n for 14789@debbugs.gnu.org; Sat, 06 Jul 2013 15:10:27 -0400 Original-Received: from 209-6-120-240.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com ([209.6.120.240] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UvXsA-0002iQ-3n; Sat, 06 Jul 2013 15:10:18 -0400 In-Reply-To: (Vasiliy's message of "Sat, 6 Jul 2013 11:01:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7200 Archived-At: Vasiliy writes: > It's just to highlight I've got that error of: > fail: scm_from_double (1) == +nan.0 > FAIL: test-conversion.exe > > while compiling with: > CFLAGS="-mtune=native -march=native -Ofast -fomit-frame-pointer" I now see the problem. -Ofast implies -ffast-math, which implies -funsafe-math-optimizations, -ffinite-math-only, etc. Specifically, this enabled the compiler to optimize (guile_Inf / guile_Inf) to 1.0, which foiled Guile's attempt to create a NaN object. >From the GCC manual (Optimize Options): `-Ofast' Disregard strict standards compliance. `-Ofast' enables all `-O3' optimizations. It also enables optimizations that are not valid for all standard compliant programs. It turns on `-ffast-math' and the Fortran-specific `-fno-protect-parens' and `-fstack-arrays'. My recommendation would be to avoid -Ofast, not just in Guile but in general. It is likely to create subtle problems in a lot of software. Things like language interpreters in particular tend to push the boundaries of standards compliance, and are likely to be broken in subtle ways by -Ofast. It's reasonable and sometimes useful to use -Ofast in isolated modules containing hot code, but only in modules whose -Ofast safety has been investigated by someone who understands the associated compiler optimizations, and is familiar with the kinds of breakage that can occur. > There's, however, still an error with 'test-ffi', and there's no > automatic invocation of 'numbers.test'. Strange. Did you run "make check" in the top-level build directory? If that doesn't work, maybe try: "./check-guile numbers.test" > Would be there any support for -Ofast in future? I doubt that we would officially support it. It's possible that the bugs introduced by -Ofast will not affect you, I don't know. At the very least, you are likely to get incorrect answers from the numerics library in some cases. There might be more serious problems as well. Some of these problems might be discovered by our test suite, which you don't seem to be running most of. Others might remain undetected. > Just one point more here: the latest autogen when compiled > --with-guile=2.2 refers to 'scm_subr_table' not present in mainstream > Guile. This indicates that you compiled against Guile 1.8's headers. You'll need to arrange to have Guile 2.2's headers come first in the search path. I guess the --with-libguile option to autogen's configure is what you need. Regards, Mark