archive/issues_020542.json:
{
"assignees": [],
"body": "<div id=\"comment:0\"></div>\n\nThe problem is that the flag \"-march=native\" is now given to the compiler, causing GCC to generate assembly code that is not accepted by the ancient version of \"as\" that ships with 10.8 and 10.9. See \n\nhttps://groups.google.com/forum/#!topic/sage-devel/FloU3fAgQLM\n\nfor a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11.\n\n---\n\nFrom the above mentioned thread:\n\n *If you pass `gcc` the flag `-Wa,-q`, then it will use clang's assembler rather than the ancient version of the GNU assembler that comes with these versions of OS X. See*\n \n [http://stackoverflow.com/questions/9840207](http://stackoverflow.com/questions/9840207)\n \n ''I can confirm that adding this flag allowed me to compile all of NTL on these machines. Specifically, changing line 78 of `build/pkgs/ntl/spkg-install` to \n \n `SHAREDFLAGS=\"-fno-common -Wa,-q\"`\n \n *caused NTL to build smoothly.*\n \n *Nathan*\n\n\nCC: @kcrisman @unhyperbolic @kiwifb\n\nComponent: **algebra**\n\nKeywords: **MacOS AVX no such instruction**\n\n_Issue created by migration from https://trac.sagemath.org/ticket/20779_\n\n",
"closed_at": "2019-01-14T17:27:46Z",
"created_at": "2016-06-07T17:40:50Z",
"labels": [
"https://github.com/sagemath/sage/labels/bug",
"https://github.com/sagemath/sage/labels/c%3A%20algebra",
"https://github.com/sagemath/sage/labels/invalid"
],
"reactions": [],
"repository": "https://github.com/sagemath/sage",
"title": "NTL 9.8.1 does not build on OS X versions 10.8 and 10.9, nor CentOS 6.8",
"type": "issue",
"updated_at": "2019-01-14T17:27:46Z",
"url": "https://github.com/sagemath/sage/issues/20779",
"user": "https://github.com/NathanDunfield"
}
The problem is that the flag "-march=native" is now given to the compiler, causing GCC to generate assembly code that is not accepted by the ancient version of "as" that ships with 10.8 and 10.9. See
https://groups.google.com/forum/#!topic/sage-devel/FloU3fAgQLM
for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11.
From the above mentioned thread:
If you pass gcc
the flag -Wa,-q
, then it will use clang's assembler rather than the ancient version of the GNU assembler that comes with these versions of OS X. See
http://stackoverflow.com/questions/9840207
''I can confirm that adding this flag allowed me to compile all of NTL on these machines. Specifically, changing line 78 of build/pkgs/ntl/spkg-install
to
`SHAREDFLAGS="-fno-common -Wa,-q"`
caused NTL to build smoothly.
Nathan
CC: @kcrisman @unhyperbolic @kiwifb
Component: algebra
Keywords: MacOS AVX no such instruction
Issue created by migration from https://trac.sagemath.org/ticket/20779
archive/issue_events_289972.json:
{
"actor": "https://github.com/NathanDunfield",
"created_at": "2016-06-07T17:40:50Z",
"event": "milestoned",
"issue": "https://github.com/sagemath/sage/issues/20779",
"milestone_number": null,
"milestone_title": "sage-7.3",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289972"
}
archive/issue_events_289973.json:
{
"actor": "https://github.com/NathanDunfield",
"created_at": "2016-06-07T17:40:50Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/20779",
"label": "https://github.com/sagemath/sage/labels/c%3A%20algebra",
"label_color": "0000ff",
"label_name": "c: algebra",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289973"
}
archive/issue_events_289974.json:
{
"actor": "https://github.com/NathanDunfield",
"created_at": "2016-06-07T17:40:50Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/20779",
"label": "https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
"label_color": "ffbb00",
"label_name": "p: major / 3",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289974"
}
archive/issue_events_289975.json:
{
"actor": "https://github.com/NathanDunfield",
"created_at": "2016-06-07T17:40:50Z",
"event": "labeled",
"issue": "https://github.com/sagemath/sage/issues/20779",
"label": "https://github.com/sagemath/sage/labels/bug",
"label_color": "d73a4a",
"label_name": "bug",
"label_text_color": "ffffff",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289975"
}
archive/issue_comments_301321.json:
{
"body": "Description changed:\n``````diff\n--- \n+++ \n@@ -2,4 +2,4 @@\n \n https://groups.google.com/forum/#!topic/sage-devel/FloU3fAgQLM\n \n-for a discussion and some potential solutions. \n+for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11. \n``````\n",
"created_at": "2016-06-07T17:42:14Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301321",
"user": "https://github.com/NathanDunfield"
}
Description changed:
---
+++
@@ -2,4 +2,4 @@
https://groups.google.com/forum/#!topic/sage-devel/FloU3fAgQLM
-for a discussion and some potential solutions.
+for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11.
archive/issue_comments_301322.json:
{
"body": "Description changed:\n``````diff\n--- \n+++ \n@@ -2,4 +2,21 @@\n \n https://groups.google.com/forum/#!topic/sage-devel/FloU3fAgQLM\n \n-for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11. \n+for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11.\n+\n+---\n+\n+From the above mentioned thread:\n+\n+ *If you pass `gcc` the flag `-Wa,-q`, then it will use clang's assembler rather than the ancient version of the GNU assembler that comes with these versions of OS X. See*\n+ \n+ [http://stackoverflow.com/questions/9840207](http://stackoverflow.com/questions/9840207)\n+ \n+ ''I can confirm that adding this flag allowed me to compile all of NTL on these machines. Specifically, changing line 78 of `build/pkgs/ntl/spkg-install` to \n+ \n+ `SHAREDFLAGS=\"-fno-common -Wa,-q\"`\n+ \n+ *caused NTL to build smoothly.*\n+ \n+ *Nathan*\n+\n``````\n",
"created_at": "2016-06-22T16:32:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301322",
"user": "https://github.com/nexttime"
}
Description changed:
---
+++
@@ -2,4 +2,21 @@
https://groups.google.com/forum/#!topic/sage-devel/FloU3fAgQLM
-for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11.
+for a discussion and some potential solutions. Currently, it seems unknown if this NTL builds on 10.10 but it is known to do so on 10.11.
+
+---
+
+From the above mentioned thread:
+
+ *If you pass `gcc` the flag `-Wa,-q`, then it will use clang's assembler rather than the ancient version of the GNU assembler that comes with these versions of OS X. See*
+
+ [http://stackoverflow.com/questions/9840207](http://stackoverflow.com/questions/9840207)
+
+ ''I can confirm that adding this flag allowed me to compile all of NTL on these machines. Specifically, changing line 78 of `build/pkgs/ntl/spkg-install` to
+
+ `SHAREDFLAGS="-fno-common -Wa,-q"`
+
+ *caused NTL to build smoothly.*
+
+ *Nathan*
+
archive/issue_comments_301323.json:
{
"body": "Changed keywords from none to **MacOS AVX no such instruction**",
"created_at": "2016-06-22T16:32:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301323",
"user": "https://github.com/nexttime"
}
Changed keywords from none to MacOS AVX no such instruction
archive/issue_comments_301324.json:
{
"body": "<div id=\"comment:3\" align=\"right\">comment:3</div>\n\nIs this something we should report upstream?\n\n(And is the work-around using clang's assembler instead possible on all affected MacOS X systems? In fact, it's better than dropping `-march=native` or adding `-mno-avx` and/or `-mno-avx2` in case the default assembler doesn't support AVX.)",
"created_at": "2016-06-22T16:32:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301324",
"user": "https://github.com/nexttime"
}
Is this something we should report upstream?
(And is the work-around using clang's assembler instead possible on all affected MacOS X systems? In fact, it's better than dropping -march=native
or adding -mno-avx
and/or -mno-avx2
in case the default assembler doesn't support AVX.)
archive/issue_comments_301325.json:
{
"body": "<div id=\"comment:4\" align=\"right\">comment:4</div>\n\nWe could ask Victor for his opinion, but it probably works out of the box on an OS X system. The `-march=native` is automatically tested by ntl's tuning system unless `NATIVE=off` is passed to the configuration. I actually inserted a bit of code in `spkg-install` to disable native for binary. The test could be extended to OS X.\n\n```\n # If SAGE_FAT_BINARY is enabled we don't want ntl to be built with cpu specific \n # instructions such as avx and fma.\n if [ \"$SAGE_FAT_BINARY\" = \"yes\" ]; then\n DISABLE_NATIVE=\"NATIVE=off\"\n else\n DISABLE_NATIVE=\"NATIVE=on\"\n fi\n```\n\nBut I would go for adding the `-Wa,-q` in the already existing appropriate section. I would think it would work for all versions of OS X.",
"created_at": "2016-06-22T22:19:05Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301325",
"user": "https://github.com/kiwifb"
}
We could ask Victor for his opinion, but it probably works out of the box on an OS X system. The -march=native
is automatically tested by ntl's tuning system unless NATIVE=off
is passed to the configuration. I actually inserted a bit of code in spkg-install
to disable native for binary. The test could be extended to OS X.
# If SAGE_FAT_BINARY is enabled we don't want ntl to be built with cpu specific
# instructions such as avx and fma.
if [ "$SAGE_FAT_BINARY" = "yes" ]; then
DISABLE_NATIVE="NATIVE=off"
else
DISABLE_NATIVE="NATIVE=on"
fi
But I would go for adding the -Wa,-q
in the already existing appropriate section. I would think it would work for all versions of OS X.
archive/issue_comments_301326.json:
{
"body": "<div id=\"comment:5\" align=\"right\">comment:5</div>\n\nAs mentioned on #20563, we could also configure Sage's GCC (which is built and used on MacOS X in any case?) to use *clang's* assembler on MacOS X by default.\n\nNot using AVX (when building from source) on capable CPUs is perhaps too much punishment, or do you think they get what they deserve?",
"created_at": "2016-06-22T22:34:17Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301326",
"user": "https://github.com/nexttime"
}
As mentioned on #20563, we could also configure Sage's GCC (which is built and used on MacOS X in any case?) to use clang's assembler on MacOS X by default.
Not using AVX (when building from source) on capable CPUs is perhaps too much punishment, or do you think they get what they deserve?
archive/issue_comments_301327.json:
{
"body": "<div id=\"comment:6\" align=\"right\">comment:6</div>\n\nReplying to [@nexttime](#comment%3A5):\n> As mentioned on #20563, we could also configure Sage's GCC (which is built and used on MacOS X in any case?) to use *clang's* assembler on MacOS X by default.\n> \n\nThat would actually be the best solution in my opinion and would mean no changes are needed in other packages. ntl and SnapPy are probably just the tip of the iceberg (linbox and co will want to do that kind of stuff too once we finish their upgrade ticket). Stuff will start to break. If a single fix in gcc can save us trouble in the future we should go for it.",
"created_at": "2016-06-22T22:39:16Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301327",
"user": "https://github.com/kiwifb"
}
Replying to @nexttime:
As mentioned on #20563, we could also configure Sage's GCC (which is built and used on MacOS X in any case?) to use clang's assembler on MacOS X by default.
That would actually be the best solution in my opinion and would mean no changes are needed in other packages. ntl and SnapPy are probably just the tip of the iceberg (linbox and co will want to do that kind of stuff too once we finish their upgrade ticket). Stuff will start to break. If a single fix in gcc can save us trouble in the future we should go for it.
archive/issue_comments_301328.json:
{
"body": "<div id=\"comment:7\" align=\"right\">comment:7</div>\n\nI agree that we shouldn't use *clang*'s assembler **just** for NTL --- I compiled `SnapPy` successfully with `-Wa,-q` on 10.8 against the binary distro of Sage (which used *gcc*'s assembler) but got segfaults when I ran it possibly related to stack alignment issues. Going whole hog and using *clang*'s assembler for all of Sage makes sense, assuming it actually works ;-).",
"created_at": "2016-06-22T22:45:32Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301328",
"user": "https://github.com/NathanDunfield"
}
I agree that we shouldn't use clang's assembler just for NTL --- I compiled SnapPy
successfully with -Wa,-q
on 10.8 against the binary distro of Sage (which used gcc's assembler) but got segfaults when I ran it possibly related to stack alignment issues. Going whole hog and using clang's assembler for all of Sage makes sense, assuming it actually works ;-).
archive/issue_comments_301329.json:
{
"body": "<div id=\"comment:8\" align=\"right\">comment:8</div>\n\nWell, only one way to do that, let's try it. How do we do that.",
"created_at": "2016-06-22T22:51:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301329",
"user": "https://github.com/kiwifb"
}
Well, only one way to do that, let's try it. How do we do that.
archive/issue_comments_301330.json:
{
"body": "<div id=\"comment:9\" align=\"right\">comment:9</div>\n\nReplying to [@kiwifb](#comment%3A8):\n> Well, only one way to do that, let's try it. How do we do that.\n\nhttps://gcc.gnu.org/install/configure.html#with-as ?\n\nAn even easier way would be to install a wrapper script `as` in `$SAGE_LOCAL/bin/` on MacOS X to call the \"right\" one, no idea whether its location differs on different systems. (Or does clang's assembler have a unique alias?)",
"created_at": "2016-06-22T23:07:28Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301330",
"user": "https://github.com/nexttime"
}
Replying to @kiwifb:
Well, only one way to do that, let's try it. How do we do that.
https://gcc.gnu.org/install/configure.html#with-as ?
An even easier way would be to install a wrapper script as
in $SAGE_LOCAL/bin/
on MacOS X to call the "right" one, no idea whether its location differs on different systems. (Or does clang's assembler have a unique alias?)
archive/issue_comments_301331.json:
{
"body": "<div id=\"comment:10\" align=\"right\">comment:10</div>\n\nI am not in favor of the wrapper unless unless we cannot do otherwise. I am more concerned about whether clang needs options to tell it to act as an assembler.",
"created_at": "2016-06-22T23:21:25Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301331",
"user": "https://github.com/kiwifb"
}
I am not in favor of the wrapper unless unless we cannot do otherwise. I am more concerned about whether clang needs options to tell it to act as an assembler.
archive/issue_comments_301332.json:
{
"body": "<div id=\"comment:11\" align=\"right\">comment:11</div>\n\nReplying to [@kiwifb](#comment%3A10):\n> I am not in favor of the wrapper unless unless we cannot do otherwise. I am more concerned about whether clang needs options to tell it to act as an assembler.\n\nWell, more precisely, it's not clang's assembler, but LLVM's, hence presumably `llvm-as`.",
"created_at": "2016-06-22T23:25:26Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301332",
"user": "https://github.com/nexttime"
}
Replying to @kiwifb:
I am not in favor of the wrapper unless unless we cannot do otherwise. I am more concerned about whether clang needs options to tell it to act as an assembler.
Well, more precisely, it's not clang's assembler, but LLVM's, hence presumably llvm-as
.
archive/issue_comments_301333.json:
{
"body": "<div id=\"comment:12\" align=\"right\">comment:12</div>\n\nI don't seem to have `llvm-as` on my OS X system, but based on the script at https://gist.github.com/xianyi/2957847, it looks like `clang -c -x assembler` is how you invoke it.",
"created_at": "2016-06-22T23:27:06Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301333",
"user": "https://github.com/NathanDunfield"
}
I don't seem to have llvm-as
on my OS X system, but based on the script at https://gist.github.com/xianyi/2957847, it looks like clang -c -x assembler
is how you invoke it.
archive/issue_comments_301334.json:
{
"body": "<div id=\"comment:13\" align=\"right\">comment:13</div>\n\nWe may have to go the wrapper route unfortunately\n\n```\nchecking whether a default linker was specified... no\nconfigure: error: cannot execute: clang -c -x assembler: check --with-as or env. var. DEFAULT_ASSEMBLER\nmake[2]: *** [configure-stage1-gcc] Error 1\n```\nI am not sure what configure expect, `config.log` doesn't have more info.",
"created_at": "2016-06-22T23:47:13Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301334",
"user": "https://github.com/kiwifb"
}
We may have to go the wrapper route unfortunately
checking whether a default linker was specified... no
configure: error: cannot execute: clang -c -x assembler: check --with-as or env. var. DEFAULT_ASSEMBLER
make[2]: *** [configure-stage1-gcc] Error 1
I am not sure what configure expect, config.log
doesn't have more info.
archive/issue_comments_301335.json:
{
"body": "<div id=\"comment:14\" align=\"right\">comment:14</div>\n\nReplying to [@NathanDunfield](#comment%3A12):\n> I don't seem to have `llvm-as` on my OS X system, \n\nSure? It's usually *not* in `$PATH`, but in some subfolder of clang/LLVM, on Linux for example in /usr/local/clang-X.Y/bin/`.\n\n> but based on the script at https://gist.github.com/xianyi/2957847, it looks like `clang -c -x assembler` is how you invoke it. \n\nHmmm, the `-x assembler` should only be necessary if the input comes from a pipe, or the filename doesn't end with `.s`, `.S`, `.asm` or the like.",
"created_at": "2016-06-22T23:49:30Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301335",
"user": "https://github.com/nexttime"
}
Replying to @NathanDunfield:
I don't seem to have
llvm-as
on my OS X system,
Sure? It's usually not in $PATH
, but in some subfolder of clang/LLVM, on Linux for example in /usr/local/clang-X.Y/bin/`.
but based on the script at https://gist.github.com/xianyi/2957847, it looks like
clang -c -x assembler
is how you invoke it.
Hmmm, the -x assembler
should only be necessary if the input comes from a pipe, or the filename doesn't end with .s
, .S
, .asm
or the like.
archive/issue_comments_301336.json:
{
"body": "<div id=\"comment:15\" align=\"right\">comment:15</div>\n\nWell same results from gcc's stage 1 configure script with or without `-x assembler`.",
"created_at": "2016-06-22T23:53:48Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301336",
"user": "https://github.com/kiwifb"
}
Well same results from gcc's stage 1 configure script with or without -x assembler
.
archive/issue_comments_301337.json:
{
"body": "<div id=\"comment:16\" align=\"right\">comment:16</div>\n\n\n```sh\nclang -print-prog-name=llvm-as\n```\nperhaps? (Dumps the full pathname at least in case it is non-standard; maybe `as` instead of `llvm-as`.)\n\nThat's a GCC(-compatible) option btw.",
"created_at": "2016-06-23T00:23:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301337",
"user": "https://github.com/nexttime"
}
clang -print-prog-name=llvm-as
perhaps? (Dumps the full pathname at least in case it is non-standard; maybe as
instead of llvm-as
.)
That's a GCC(-compatible) option btw.
archive/issue_comments_301338.json:
{
"body": "<div id=\"comment:17\" align=\"right\">comment:17</div>\n\nHum...\n\n```\n(sage-sh) fbissey@Mirage:sage-7.2.beta5$ clang --print-prog-name=as\n/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as\n(sage-sh) fbissey@Mirage:sage-7.2.beta5$ clang --print-prog-name=llvm-as\nllvm-as\n(sage-sh) fbissey@Mirage:sage-7.2.beta5$ gcc --print-prog-name=as\nas\n(sage-sh) fbissey@Mirage:sage-7.2.beta5$ which as\n/usr/bin/as\n```\nAnd\n\n```\n(sage-sh) fbissey@Mirage:sage-7.2.beta5$ as --help\nOVERVIEW: clang LLVM compiler\n\nUSAGE: clang [options] <inputs>\n```\nso the `as` on the path is already `clang`.",
"created_at": "2016-06-23T00:42:25Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301338",
"user": "https://github.com/kiwifb"
}
Hum...
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ clang --print-prog-name=as
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ clang --print-prog-name=llvm-as
llvm-as
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ gcc --print-prog-name=as
as
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ which as
/usr/bin/as
And
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ as --help
OVERVIEW: clang LLVM compiler
USAGE: clang [options] <inputs>
so the as
on the path is already clang
.
archive/issue_comments_301339.json:
{
"body": "<div id=\"comment:18\" align=\"right\">comment:18</div>\n\nReplying to [@kiwifb](#comment%3A17):\n> And\n> \n> ```\n> (sage-sh) fbissey@Mirage:sage-7.2.beta5$ as --help\n> OVERVIEW: clang LLVM compiler\n> \n> USAGE: clang [options] <inputs>\n> ```\n> so the `as` on the path is already `clang`.\n\nWhat version of OS X is this? On 10.8 and 10.9, the `as` command doesn't even accept the `--help` flag and `as -v` gives (on 10.9)\n\n```\nApple Inc version cctools-862, GNU assembler version 1.38\n```\nI think Apple switched to a clang-based `as` in either 10.10 or 10.11, which is why this version of NTL has been confirmed to work on 10.11 but fails on 10.8 and 10.9.",
"created_at": "2016-06-23T01:40:43Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301339",
"user": "https://github.com/NathanDunfield"
}
Replying to @kiwifb:
And
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ as --help OVERVIEW: clang LLVM compiler USAGE: clang [options] <inputs>
so the
as
on the path is alreadyclang
.
What version of OS X is this? On 10.8 and 10.9, the as
command doesn't even accept the --help
flag and as -v
gives (on 10.9)
Apple Inc version cctools-862, GNU assembler version 1.38
I think Apple switched to a clang-based as
in either 10.10 or 10.11, which is why this version of NTL has been confirmed to work on 10.11 but fails on 10.8 and 10.9.
archive/issue_comments_301340.json:
{
"body": "<div id=\"comment:19\" align=\"right\">comment:19</div>\n\nReplying to [@NathanDunfield](#comment%3A18):\n> I think Apple switched to a clang-based `as` in either 10.10 or 10.11, which is why this version of NTL has been confirmed to work on 10.11 but fails on 10.8 and 10.9.\n\nSo, in fact, Sage has been using clang's `as` on 10.11 without a hitch or anyone even noticing, which suggests that we should be able to switch to it on 10.8, 10.9, and (maybe) 10.10 to solve this and related tickets.",
"created_at": "2016-06-23T01:44:37Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301340",
"user": "https://github.com/NathanDunfield"
}
Replying to @NathanDunfield:
I think Apple switched to a clang-based
as
in either 10.10 or 10.11, which is why this version of NTL has been confirmed to work on 10.11 but fails on 10.8 and 10.9.
So, in fact, Sage has been using clang's as
on 10.11 without a hitch or anyone even noticing, which suggests that we should be able to switch to it on 10.8, 10.9, and (maybe) 10.10 to solve this and related tickets.
archive/issue_comments_301341.json:
{
"body": "<div id=\"comment:20\" align=\"right\">comment:20</div>\n\nIt is 10.11.5.\n\n```\n(sage-sh) fbissey@Mirage:sage-7.2.beta5$ as -v\nApple LLVM version 7.3.0 (clang-703.0.29)\nTarget: x86_64-apple-darwin15.5.0\nThread model: posix\nInstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\" -cc1as -triple x86_64-apple-macosx10.9.0 -filetype obj -main-file-name - -target-cpu core2 -dwarf-version=2 -fdebug-compilation-dir /Users/fbissey/build/sage-7.2.beta5 -dwarf-debug-producer Apple LLVM version 7.3.0 (clang-703.0.29) -mrelocation-model pic -o a.out -\n```",
"created_at": "2016-06-23T01:45:12Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301341",
"user": "https://github.com/kiwifb"
}
It is 10.11.5.
(sage-sh) fbissey@Mirage:sage-7.2.beta5$ as -v
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1as -triple x86_64-apple-macosx10.9.0 -filetype obj -main-file-name - -target-cpu core2 -dwarf-version=2 -fdebug-compilation-dir /Users/fbissey/build/sage-7.2.beta5 -dwarf-debug-producer Apple LLVM version 7.3.0 (clang-703.0.29) -mrelocation-model pic -o a.out -
archive/issue_comments_301342.json:
{
"body": "<div id=\"comment:21\" align=\"right\">comment:21</div>\n\nW.r.t. script solutions:\n\nPutting one of the following into `$SAGE_ROOT/local/bin/as` (and of course `chmod +x` it) should work.\n\n```sh\n#!/bin/sh\n\nexec /usr/bin/as -q \"$@\"\n```\n\n\n\n\n```sh\n#!/bin/sh\n\nexec `clang -print-prog-name=as` \"$@\"\n```\n\nI'm not sure whether the first at all works if `/usr/bin/as` is already LLVM's `as` (e.g. on 10.11; Fran\u00e7ois?), and one could hardcode the path to `as` in the second (perhaps unless it is shipped with a binary distribution of Sage).",
"created_at": "2016-06-25T22:45:49Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301342",
"user": "https://github.com/nexttime"
}
W.r.t. script solutions:
Putting one of the following into $SAGE_ROOT/local/bin/as
(and of course chmod +x
it) should work.
#!/bin/sh
exec /usr/bin/as -q "$@"
#!/bin/sh
exec `clang -print-prog-name=as` "$@"
I'm not sure whether the first at all works if /usr/bin/as
is already LLVM's as
(e.g. on 10.11; François?), and one could hardcode the path to as
in the second (perhaps unless it is shipped with a binary distribution of Sage).
archive/issue_comments_301343.json:
{
"body": "<div id=\"comment:22\" align=\"right\">comment:22</div>\n\nP.S.:\n\nAt least both versions avoid using `-x assembler` etc. and checking whether filenames were given or the input comes from a pipe.",
"created_at": "2016-06-25T22:48:48Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301343",
"user": "https://github.com/nexttime"
}
P.S.:
At least both versions avoid using -x assembler
etc. and checking whether filenames were given or the input comes from a pipe.
archive/issue_comments_301344.json:
{
"body": "<div id=\"comment:23\" align=\"right\">comment:23</div>\n\nTesting stuff on 10.11.5....",
"created_at": "2016-06-26T21:45:19Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301344",
"user": "https://github.com/kiwifb"
}
Testing stuff on 10.11.5....
archive/issue_comments_301345.json:
{
"body": "<div id=\"comment:24\" align=\"right\">comment:24</div>\n\nIt's taking more time to do it right than I had expected. Especially when you realize you messed up after a full build on this little laptop...",
"created_at": "2016-06-27T05:13:55Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301345",
"user": "https://github.com/kiwifb"
}
It's taking more time to do it right than I had expected. Especially when you realize you messed up after a full build on this little laptop...
archive/issue_comments_301346.json:
{
"body": "<div id=\"comment:25\" align=\"right\">comment:25</div>\n\nTesting on 10.9...",
"created_at": "2016-06-27T13:13:31Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301346",
"user": "https://github.com/NathanDunfield"
}
Testing on 10.9...
archive/issue_comments_301347.json:
{
"body": "<div id=\"comment:26\" align=\"right\">comment:26</div>\n\nReplying to [@NathanDunfield](#comment%3A25):\n> Testing on 10.9...\n\nStill working on this, but a quick comment: The second script in comment [comment:21] actually invokes the default gcc-based `as` on 10.9, not clang's. The following gets clang's `as` but I'm still seeing if this fixes the problem at hand:\n\n```\n#!/usr/bin/env bash\n\nclang -print-prog-name=as \"$@\"\n```",
"created_at": "2016-06-27T17:15:47Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301347",
"user": "https://github.com/NathanDunfield"
}
Replying to @NathanDunfield:
Testing on 10.9...
Still working on this, but a quick comment: The second script in comment [comment:21] actually invokes the default gcc-based as
on 10.9, not clang's. The following gets clang's as
but I'm still seeing if this fixes the problem at hand:
#!/usr/bin/env bash
clang -print-prog-name=as "$@"
archive/issue_comments_301348.json:
{
"body": "<div id=\"comment:27\" align=\"right\">comment:27</div>\n\nReplying to [@NathanDunfield](#comment%3A26):\n> Replying to [@NathanDunfield](#comment%3A25):\n> > Testing on 10.9...\n> \n> \n> Still working on this, but a quick comment: The second script in comment [comment:21] actually invokes the default gcc-based `as` on 10.9, not clang's. The following gets clang's `as` but I'm still seeing if this fixes the problem at hand:\n> \n> ```\n> #!/usr/bin/env bash\n> \n> clang -print-prog-name=as \"$@\"\n> ```\n\nDoes `clang -print-prog-name=as` give a full pathname on your system? (If no specific assembler or other program was configured during the build, the \"input\" just gets echoed verbatim, no matter whether such a program exists at all, and even the return value is zero.)\n\nDoes `llvm-as` exist on your system (not necessarily along `$PATH`)?",
"created_at": "2016-06-27T17:42:01Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301348",
"user": "https://github.com/nexttime"
}
Replying to @NathanDunfield:
Replying to @NathanDunfield:
Testing on 10.9...
Still working on this, but a quick comment: The second script in comment [comment:21] actually invokes the default gcc-based
as
on 10.9, not clang's. The following gets clang'sas
but I'm still seeing if this fixes the problem at hand:#!/usr/bin/env bash clang -print-prog-name=as "$@"
Does clang -print-prog-name=as
give a full pathname on your system? (If no specific assembler or other program was configured during the build, the "input" just gets echoed verbatim, no matter whether such a program exists at all, and even the return value is zero.)
Does llvm-as
exist on your system (not necessarily along $PATH
)?
archive/issue_comments_301349.json:
{
"body": "<div id=\"comment:28\" align=\"right\">comment:28</div>\n\n> Does `clang -print-prog-name=as` give a full pathname on your system? \n\nYes, it gives `/Library/Developer/CommandLineTools/usr/bin/as` which is the gcc `as`. On a different 10.9 machine which has Xcode installed, not just the command line tools, I get:\n\n```\n/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as\n```\n\nwhich is again the gcc `as`. \n\n> Does `llvm-as` exist on your system (not necessarily along `$PATH`)?\n\nNo, or at least not as far as I can tell. In particular, there no `llvm-as` (or any renamed version of such) in `/Library/Developer/CommandLineTools/usr/bin/` which where it should be if it exists. \n\nOn 10.10 and newer, the version of `as` at `/Library/Developer/CommandLineTools/usr/bin/` becomes clang's assembler.\n\nI realized my replacement script doesn't work either --- I guess we have do something with the `-x assembler` flag \nor similar?",
"created_at": "2016-06-27T18:07:03Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301349",
"user": "https://github.com/NathanDunfield"
}
Does
clang -print-prog-name=as
give a full pathname on your system?
Yes, it gives /Library/Developer/CommandLineTools/usr/bin/as
which is the gcc as
. On a different 10.9 machine which has Xcode installed, not just the command line tools, I get:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as
which is again the gcc as
.
Does
llvm-as
exist on your system (not necessarily along$PATH
)?
No, or at least not as far as I can tell. In particular, there no llvm-as
(or any renamed version of such) in /Library/Developer/CommandLineTools/usr/bin/
which where it should be if it exists.
On 10.10 and newer, the version of as
at /Library/Developer/CommandLineTools/usr/bin/
becomes clang's assembler.
I realized my replacement script doesn't work either --- I guess we have do something with the -x assembler
flag
or similar?
archive/issue_comments_301350.json:
{
"body": "<div id=\"comment:29\" align=\"right\">comment:29</div>\n\nWe could check whether `clang -print-prog-name=as` still gives Apple's version of GAS, and if so, use `as -q`. (I wonder what the latter calls in that case; is `/usr/bin/as` a script in that case?)",
"created_at": "2016-06-27T18:13:49Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301350",
"user": "https://github.com/nexttime"
}
We could check whether clang -print-prog-name=as
still gives Apple's version of GAS, and if so, use as -q
. (I wonder what the latter calls in that case; is /usr/bin/as
a script in that case?)
archive/issue_comments_301351.json:
{
"body": "<div id=\"comment:30\" align=\"right\">comment:30</div>\n\nP.S.: I didn't know it is at all possible to install the command line tools *without* installing Xcode. Does Sage build without having Xcode installed?",
"created_at": "2016-06-27T18:17:28Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301351",
"user": "https://github.com/nexttime"
}
P.S.: I didn't know it is at all possible to install the command line tools without installing Xcode. Does Sage build without having Xcode installed?
archive/issue_comments_301352.json:
{
"body": "<div id=\"comment:31\" align=\"right\">comment:31</div>\n\nReplying to [@nexttime](#comment%3A29):\n> We could check whether `clang -print-prog-name=as` still gives Apple's version of GAS, and if so, use `as -q`. \n\nI'll try `as -q` on 10.9 and report back. \n\n> (I wonder what the latter calls in that case; is `/usr/bin/as` a script in that case?\n\nOn 10.9 `/usr/bin/as` is a tiny 14K executable, so I guess it must function basically as a shell script. \n\n> P.S.: I didn't know it is at all possible to install the command line tools without installing Xcode...\n\nThis has been possible for a while. On clean 10.9 machine if you type \"clang\" in Terminal.app, then a dialog pops up to ask if you want to install the command line tools, though there is also a button to install the whole of Xcode. \n\n> Does Sage build without having Xcode installed?\n\nI'm about to find out ;-). It should, I think. At the very least, it can build everything up to NTL.",
"created_at": "2016-06-27T18:27:51Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301352",
"user": "https://github.com/NathanDunfield"
}
Replying to @nexttime:
We could check whether
clang -print-prog-name=as
still gives Apple's version of GAS, and if so, useas -q
.
I'll try as -q
on 10.9 and report back.
(I wonder what the latter calls in that case; is
/usr/bin/as
a script in that case?
On 10.9 /usr/bin/as
is a tiny 14K executable, so I guess it must function basically as a shell script.
P.S.: I didn't know it is at all possible to install the command line tools without installing Xcode...
This has been possible for a while. On clean 10.9 machine if you type "clang" in Terminal.app, then a dialog pops up to ask if you want to install the command line tools, though there is also a button to install the whole of Xcode.
Does Sage build without having Xcode installed?
I'm about to find out ;-). It should, I think. At the very least, it can build everything up to NTL.
archive/issue_comments_301353.json:
{
"body": "<div id=\"comment:32\" align=\"right\">comment:32</div>\n\nFWIW, on Linux at least, `llvm-as` (or whatever it is called on the system) is quite small, too (~16 KB), since most functionality is contained in an LLVM shared library it uses.",
"created_at": "2016-06-27T20:06:19Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301353",
"user": "https://github.com/nexttime"
}
FWIW, on Linux at least, llvm-as
(or whatever it is called on the system) is quite small, too (~16 KB), since most functionality is contained in an LLVM shared library it uses.
archive/issue_comments_301354.json:
{
"body": "<div id=\"comment:33\" align=\"right\">comment:33</div>\n\nOk, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9:\n\n1. Get source.\n\n2. Create $SAGE_ROOT/local/bin and put a script `as` consisting of \n\n```\n#!/usr/bin/env bash\n\nexec /usr/bin/as -q \"$@\"\n```\n\n3. Type `make` as usual. \n\nI'm running the doctests now, and will report back when those are done. It looks good so far, though.",
"created_at": "2016-06-28T13:00:59Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301354",
"user": "https://github.com/NathanDunfield"
}
Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9:
-
Get source.
-
Create $SAGE_ROOT/local/bin and put a script
as
consisting of
#!/usr/bin/env bash
exec /usr/bin/as -q "$@"
- Type
make
as usual.
I'm running the doctests now, and will report back when those are done. It looks good so far, though.
archive/issue_comments_301355.json:
{
"body": "<div id=\"comment:34\" align=\"right\">comment:34</div>\n\nReplying to [@NathanDunfield](#comment%3A33):\n> Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9:\n> \n> 1. Get source.\n> \n> 2. Create $SAGE_ROOT/local/bin and put a script `as` consisting of \n> \n> ```\n> #!/usr/bin/env bash\n> \n> exec /usr/bin/as -q \"$@\"\n> ```\n> \n> 3. Type `make` as usual. \n\nYep, we could create such a script in Sage's `configure` when necessary (i.e., on MacOS X, if the default `as` is still GAS).\n\nI still don't know whether `as -q ...` works on more recent versions (where it shouldn't be necessary). While we could check that in `configure` for source builds, that doesn't help with binary dists. If it doesn't break anything on 10.10 and later, we could simply include the script in (all) binary distributions of Sage for MacOS X.\n\nNot sure whether we have to require Apple's \"command line tools\" **and** Xcode then (at least for builds from source and \"developing\" with bdists).\n\n\n\n\nAll of this is IMHO still orthogonal to fixing NTL's `-march=native` check (which apparently simply tests whether the compiler *accepts the option*, but nothing beyond that -- I haven't looked into the code though).",
"created_at": "2016-06-28T13:50:37Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301355",
"user": "https://github.com/nexttime"
}
Replying to @NathanDunfield:
Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9:
Get source.
Create $SAGE_ROOT/local/bin and put a script
as
consisting of#!/usr/bin/env bash exec /usr/bin/as -q "$@"
- Type
make
as usual.
Yep, we could create such a script in Sage's configure
when necessary (i.e., on MacOS X, if the default as
is still GAS).
I still don't know whether as -q ...
works on more recent versions (where it shouldn't be necessary). While we could check that in configure
for source builds, that doesn't help with binary dists. If it doesn't break anything on 10.10 and later, we could simply include the script in (all) binary distributions of Sage for MacOS X.
Not sure whether we have to require Apple's "command line tools" and Xcode then (at least for builds from source and "developing" with bdists).
All of this is IMHO still orthogonal to fixing NTL's -march=native
check (which apparently simply tests whether the compiler accepts the option, but nothing beyond that -- I haven't looked into the code though).
archive/issue_comments_301356.json:
{
"body": "<div id=\"comment:35\" align=\"right\">comment:35</div>\n\nP.S.: Where \"developing with bdists\" includes installing optional Sage packages that involves compilation of C/C++ files, cf. #20563.",
"created_at": "2016-06-28T14:04:06Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301356",
"user": "https://github.com/nexttime"
}
P.S.: Where "developing with bdists" includes installing optional Sage packages that involves compilation of C/C++ files, cf. #20563.
archive/issue_comments_301357.json:
{
"body": "<div id=\"comment:36\" align=\"right\">comment:36</div>\n\n> I still don't know whether `as -q ...` works on more recent versions (where it shouldn't be necessary). While we could check that in `configure` for source builds, that doesn't help with binary dists. If it doesn't break anything on 10.10 and later, we could simply include the script in (all) binary distributions of Sage for MacOS X.\n\nI checked that on 10.10 and 10.11 that `as` accepts `-q` without complaining. I haven't yet tried building Sage this way, though. \n\n> Not sure whether we have to require Apple's \"command line tools\" **and** Xcode then (at least for builds from source and \"developing\" with bdists).\n\nDefinitely just the command-line tools --- I didn't have Xcode installed on the 10.9 system referred to above. \n\n> All of this is IMHO still orthogonal to fixing NTL's `-march=native` check (which apparently simply tests whether the compiler *accepts the option*, but nothing beyond that -- I haven't looked into the code though).\n\nI think it's reasonable on NTL's part to assume that if the compiler accepts the option then it generates working code --- I would argue that the issue here on OS X is a mismatch or if you prefer a misconfiguration between the compiler and the assembler. \n\nI haven't tested yet, but I think `as -q` might also resolve #20563, so two birds with one stone and all that.",
"created_at": "2016-06-28T14:05:55Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301357",
"user": "https://github.com/NathanDunfield"
}
I still don't know whether
as -q ...
works on more recent versions (where it shouldn't be necessary). While we could check that inconfigure
for source builds, that doesn't help with binary dists. If it doesn't break anything on 10.10 and later, we could simply include the script in (all) binary distributions of Sage for MacOS X.
I checked that on 10.10 and 10.11 that as
accepts -q
without complaining. I haven't yet tried building Sage this way, though.
Not sure whether we have to require Apple's "command line tools" and Xcode then (at least for builds from source and "developing" with bdists).
Definitely just the command-line tools --- I didn't have Xcode installed on the 10.9 system referred to above.
All of this is IMHO still orthogonal to fixing NTL's
-march=native
check (which apparently simply tests whether the compiler accepts the option, but nothing beyond that -- I haven't looked into the code though).
I think it's reasonable on NTL's part to assume that if the compiler accepts the option then it generates working code --- I would argue that the issue here on OS X is a mismatch or if you prefer a misconfiguration between the compiler and the assembler.
I haven't tested yet, but I think as -q
might also resolve #20563, so two birds with one stone and all that.
archive/issue_comments_301358.json:
{
"body": "<div id=\"comment:37\" align=\"right\">comment:37</div>\n\nReplying to [@NathanDunfield](#comment%3A36):\n> > All of this is IMHO still orthogonal to fixing NTL's `-march=native` check (which apparently simply tests whether the compiler *accepts the option*, but nothing beyond that -- I haven't looked into the code though).\n> \n> \n> I think it's reasonable on NTL's part to assume that if the compiler accepts the option then it generates working code.\n\n:-) It *does* generate \"working\" code in the sense that the assembly output is valid (even in the case of #20563 btw.).\n\nBut the test should check whether the whole toolchain works, and -- unless cross-compiling, where `-march=native` wouldn't make sense anyway -- whether such a program can be run on the machine.\n\nBesides hardware bugs, there've also frequently been issues with VMs. (And note that for example AVX requires *operating system* support, not just an AVX-capable CPU.)\n\n---\n\n> I haven't tested yet, but I think `as -q` might also resolve #20563, so two birds with one stone and all that. \n\nThe (newer) LLVM assembler certainly complies with Intel's AVX specification... ;-)",
"created_at": "2016-06-28T14:43:14Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301358",
"user": "https://github.com/nexttime"
}
Replying to @NathanDunfield:
All of this is IMHO still orthogonal to fixing NTL's
-march=native
check (which apparently simply tests whether the compiler accepts the option, but nothing beyond that -- I haven't looked into the code though).I think it's reasonable on NTL's part to assume that if the compiler accepts the option then it generates working code.
:-) It does generate "working" code in the sense that the assembly output is valid (even in the case of #20563 btw.).
But the test should check whether the whole toolchain works, and -- unless cross-compiling, where -march=native
wouldn't make sense anyway -- whether such a program can be run on the machine.
Besides hardware bugs, there've also frequently been issues with VMs. (And note that for example AVX requires operating system support, not just an AVX-capable CPU.)
I haven't tested yet, but I think
as -q
might also resolve #20563, so two birds with one stone and all that.
The (newer) LLVM assembler certainly complies with Intel's AVX specification... ;-)
archive/issue_comments_301359.json:
{
"body": "<div id=\"comment:38\" align=\"right\">comment:38</div>\n\nReplying to [@NathanDunfield](#comment%3A33):\n> Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9:\n> [...]\n> I'm running the doctests now, and will report back when those are done. \n\nAll tests pass! I did skip the long ones, will run those now. Tomorrow, I will test on 10.11 as well.",
"created_at": "2016-06-28T21:34:29Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301359",
"user": "https://github.com/NathanDunfield"
}
Replying to @NathanDunfield:
Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9: [...] I'm running the doctests now, and will report back when those are done.
All tests pass! I did skip the long ones, will run those now. Tomorrow, I will test on 10.11 as well.
archive/issue_comments_301360.json:
{
"body": "<div id=\"comment:39\" align=\"right\">comment:39</div>\n\nI actually already done so on 10.11. build succeeded and sage starts. Haven't run doctests though but I would think it is all ok.",
"created_at": "2016-06-28T21:39:22Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301360",
"user": "https://github.com/kiwifb"
}
I actually already done so on 10.11. build succeeded and sage starts. Haven't run doctests though but I would think it is all ok.
archive/issue_comments_301361.json:
{
"body": "<div id=\"comment:40\" align=\"right\">comment:40</div>\n\nReplying to [@NathanDunfield](#comment%3A38):\n> > Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9:\n> > [...]\n> > I'm running the doctests now, and will report back when those are done. \n> \n> \n> All tests pass! I did skip the long ones, will run those now. \n\nThere was one failure in the long doctests, but probably presumably not related to the change at hand:\n\n```\nsage -t --long --warn-long 24.0 src/sage/parallel/map_reduce.py\n**********************************************************************\nFile \"src/sage/parallel/map_reduce.py\", line 1082, in sage.parallel.map_reduce.RESetMapReduce.start_workers\nFailed example:\n all(w.is_alive() for w in S._workers)\nExpected:\n True\nGot:\n False\n**********************************************************************\n```\n\nSo assuming we want to add this `as` script, how would we go about it? I'm completely ignorant about Sage's bootstrap/config process...",
"created_at": "2016-06-29T13:44:50Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301361",
"user": "https://github.com/NathanDunfield"
}
Replying to @NathanDunfield:
Ok, with Sage 7.3.beta5, which includes this version of NTL, the following worked to build Sage on 10.9: [...] I'm running the doctests now, and will report back when those are done.
All tests pass! I did skip the long ones, will run those now.
There was one failure in the long doctests, but probably presumably not related to the change at hand:
sage -t --long --warn-long 24.0 src/sage/parallel/map_reduce.py
**********************************************************************
File "src/sage/parallel/map_reduce.py", line 1082, in sage.parallel.map_reduce.RESetMapReduce.start_workers
Failed example:
all(w.is_alive() for w in S._workers)
Expected:
True
Got:
False
**********************************************************************
So assuming we want to add this as
script, how would we go about it? I'm completely ignorant about Sage's bootstrap/config process...
archive/issue_comments_301362.json:
{
"body": "<div id=\"comment:41\" align=\"right\">comment:41</div>\n\nThis now hits us on CentOS (6.8, with apparently ancient binutils) as well:\n\n```\nHost system:\nLinux pmlapsag01 2.6.32-642.1.1.el6.x86_64 #1 SMP Tue May 31 21:57:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux\n****************************************************\nC compiler: gcc\nC compiler version:\nUsing built-in specs.\nCOLLECT_GCC=gcc\nCOLLECT_LTO_WRAPPER=/home/sageadm/sage/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper\nTarget: x86_64-unknown-linux-gnu\nConfigured with: ../src/configure --prefix=/home/sageadm/sage/local --with-local-prefix=/home/sageadm/sage/local --with-gmp=/home/sageadm/sage/local --with-mpfr=/home/sageadm/sage/local --with-mpc=/home/sageadm/sage/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm\nThread model: posix\ngcc version 4.9.3 (GCC)\n****************************************************\n\nApplying patches to NTL.\n\n....\n\nconfig.status: executing libtool commands\n\nConfiguring NTL.\n***** checking for libtool *****\nlibtool (GNU libtool) 2.4.2\nWritten by Gordon Matzigkeit < ... >, 1996\n\nCopyright (C) 2011 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n***** libtool OK *****\n\n*** checking -march=native flag\nCXXAUTOFLAGS=\" -march=native\"\n*** -march=native works\nCXXAUTOFLAGS=\" -march=native\"\n\n[ntl-9.8.1.p0] Tuning and building NTL.\n[ntl-9.8.1.p0] make[3]: Entering directory `/home/sageadm/sage/local/var/tmp/sage/build/ntl-9.8.1.p0/src/ntl/src'\n[ntl-9.8.1.p0] make setup1\n[ntl-9..8.1.p0] make[4]: Entering directory `/home/sageadm/sage/local/var/tmp/sage/build/ntl-9.8.1.p0/src/ntl/src'\n[ntl-9.8.1.p0] g++ -I../include -I. -march=native -O2 -g -c MakeDescAux.c\n[ntl-9.8.1.p0] g++ -I../include -I. -march=native -O2 -g -L/home/sageadm/sage/local/lib -Wl,-rpath,/home/sageadm/sage/local/lib -o MakeDesc MakeDesc.c MakeDescAux.o -lm\n[ntl-9.8.1.p0] /tmp/ccPRNw4z.s: Assembler messages:\n[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:873: Error: no such instruction: `shlx %r12,%rax,%rax'\n[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:932: Error: no such instruction: `shlx %r12,%rax,%rax'\n\n...\n\n[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:4374: Error: no such instruction: `shlx %rax,%r15,%r15'\n[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:4791: Error: no such instruction: `shlx %r13,%rdx,%rdx'\n[ntl-9.8.1.p0] make[4]: *** [setup1] Error 1\n```\n(From [sage-devel](http://permalink.gmane.org/gmane.comp.mathematics.sage.devel/87772).)",
"created_at": "2016-07-19T16:49:04Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301362",
"user": "https://github.com/nexttime"
}
This now hits us on CentOS (6.8, with apparently ancient binutils) as well:
Host system:
Linux pmlapsag01 2.6.32-642.1.1.el6.x86_64 #1 SMP Tue May 31 21:57:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/sageadm/sage/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../src/configure --prefix=/home/sageadm/sage/local --with-local-prefix=/home/sageadm/sage/local --with-gmp=/home/sageadm/sage/local --with-mpfr=/home/sageadm/sage/local --with-mpc=/home/sageadm/sage/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm
Thread model: posix
gcc version 4.9.3 (GCC)
****************************************************
Applying patches to NTL.
....
config.status: executing libtool commands
Configuring NTL.
***** checking for libtool *****
libtool (GNU libtool) 2.4.2
Written by Gordon Matzigkeit < ... >, 1996
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
***** libtool OK *****
*** checking -march=native flag
CXXAUTOFLAGS=" -march=native"
*** -march=native works
CXXAUTOFLAGS=" -march=native"
[ntl-9.8.1.p0] Tuning and building NTL.
[ntl-9.8.1.p0] make[3]: Entering directory `/home/sageadm/sage/local/var/tmp/sage/build/ntl-9.8.1.p0/src/ntl/src'
[ntl-9.8.1.p0] make setup1
[ntl-9..8.1.p0] make[4]: Entering directory `/home/sageadm/sage/local/var/tmp/sage/build/ntl-9.8.1.p0/src/ntl/src'
[ntl-9.8.1.p0] g++ -I../include -I. -march=native -O2 -g -c MakeDescAux.c
[ntl-9.8.1.p0] g++ -I../include -I. -march=native -O2 -g -L/home/sageadm/sage/local/lib -Wl,-rpath,/home/sageadm/sage/local/lib -o MakeDesc MakeDesc.c MakeDescAux.o -lm
[ntl-9.8.1.p0] /tmp/ccPRNw4z.s: Assembler messages:
[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:873: Error: no such instruction: `shlx %r12,%rax,%rax'
[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:932: Error: no such instruction: `shlx %r12,%rax,%rax'
...
[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:4374: Error: no such instruction: `shlx %rax,%r15,%r15'
[ntl-9.8.1.p0] /tmp/ccPRNw4z.s:4791: Error: no such instruction: `shlx %r13,%rdx,%rdx'
[ntl-9.8.1.p0] make[4]: *** [setup1] Error 1
(From sage-devel.)
archive/issue_events_289976.json:
{
"actor": "https://github.com/nexttime",
"created_at": "2016-07-19T16:49:04Z",
"event": "renamed",
"issue": "https://github.com/sagemath/sage/issues/20779",
"title_is": "NTL 9.8.1 does not build on OS X versions 10.8 and 10.9, nor CentOS 6.8",
"title_was": "NTL 9.8.1 does not build on OS X versions 10.8 and 10.9",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289976"
}
archive/issue_comments_301363.json:
{
"body": "<div id=\"comment:42\" align=\"right\">comment:42</div>\n\nReplying to [@nexttime](#comment%3A34):\n> All of this is IMHO still orthogonal to fixing NTL's `-march=native` check (which apparently simply tests whether the compiler *accepts the option*, but nothing beyond that -- I haven't looked into the code though).\n\nBecause this now hits us on older Linux distros as well (where Sage's GCC gets built), I think we should fix the NTL package (or any package which tries to use `-march=native`) quickly *on another ticket* (making it a blocker for Sage 7.3).",
"created_at": "2016-07-19T16:58:53Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301363",
"user": "https://github.com/nexttime"
}
Replying to @nexttime:
All of this is IMHO still orthogonal to fixing NTL's
-march=native
check (which apparently simply tests whether the compiler accepts the option, but nothing beyond that -- I haven't looked into the code though).
Because this now hits us on older Linux distros as well (where Sage's GCC gets built), I think we should fix the NTL package (or any package which tries to use -march=native
) quickly on another ticket (making it a blocker for Sage 7.3).
archive/issue_comments_301364.json:
{
"body": "<div id=\"comment:43\" align=\"right\">comment:43</div>\n\nReplying to [@nexttime](#comment%3A42):\n> Because this now hits us on older Linux distros as well (where Sage's GCC gets built), I think we should fix the NTL package (or any package which tries to use `-march=native`) quickly *on another ticket* (making it a blocker for Sage 7.3).\n\nI think it would be fine to use the current ticket to fix NTL on both Linux and OS X, assuming it's essentially the same fix on both platforms. Messing with clang's asm on OS X can go under #20563.",
"created_at": "2016-07-19T17:30:32Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301364",
"user": "https://github.com/NathanDunfield"
}
Replying to @nexttime:
Because this now hits us on older Linux distros as well (where Sage's GCC gets built), I think we should fix the NTL package (or any package which tries to use
-march=native
) quickly on another ticket (making it a blocker for Sage 7.3).
I think it would be fine to use the current ticket to fix NTL on both Linux and OS X, assuming it's essentially the same fix on both platforms. Messing with clang's asm on OS X can go under #20563.
archive/issue_comments_301365.json:
{
"body": "<div id=\"comment:44\" align=\"right\">comment:44</div>\n\nReplying to [@NathanDunfield](#comment%3A43):\n> Replying to [@nexttime](#comment%3A42):\n> > Because this now hits us on older Linux distros as well (where Sage's GCC gets built), I think we should fix the NTL package (or any package which tries to use `-march=native`) quickly *on another ticket* (making it a blocker for Sage 7.3).\n> \n> \n> I think it would be fine to use the current ticket to fix NTL on both Linux and OS X, assuming it's essentially the same fix on both platforms. Messing with clang's asm on OS X can go under #20563. \n\nFrom the ticket's title, yes, but the comments here mainly deal with `clang` and MacOS X specifics, so I'd prefer to leave it open for a solution to the latter on *this* ticket (rather than #20563).",
"created_at": "2016-07-19T17:38:33Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301365",
"user": "https://github.com/nexttime"
}
Replying to @NathanDunfield:
Replying to @nexttime:
Because this now hits us on older Linux distros as well (where Sage's GCC gets built), I think we should fix the NTL package (or any package which tries to use
-march=native
) quickly on another ticket (making it a blocker for Sage 7.3).I think it would be fine to use the current ticket to fix NTL on both Linux and OS X, assuming it's essentially the same fix on both platforms. Messing with clang's asm on OS X can go under #20563.
From the ticket's title, yes, but the comments here mainly deal with clang
and MacOS X specifics, so I'd prefer to leave it open for a solution to the latter on this ticket (rather than #20563).
archive/issue_comments_301366.json:
{
"body": "<div id=\"comment:45\" align=\"right\">comment:45</div>\n\nReplying to [@nexttime](#comment%3A44):\n> From the ticket's title, yes, but the comments here mainly deal with `clang` and MacOS X specifics, so I'd prefer to leave it open for a solution to the latter on *this* ticket (rather than #20563).\n\nOk, that makes sense. If you put me in the \"cc\" for the new ticket I can test on OS X.",
"created_at": "2016-07-19T17:41:17Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301366",
"user": "https://github.com/NathanDunfield"
}
Replying to @nexttime:
From the ticket's title, yes, but the comments here mainly deal with
clang
and MacOS X specifics, so I'd prefer to leave it open for a solution to the latter on this ticket (rather than #20563).
Ok, that makes sense. If you put me in the "cc" for the new ticket I can test on OS X.
archive/issue_comments_301367.json:
{
"body": "<div id=\"comment:46\" align=\"right\">comment:46</div>\n\nHmmm, still haven't pushed a branch to #21064 (still playing a little with improvements)...\n\nI wonder what `as -q -v </dev/null` gives on older versions of MacOS X where the default `as` is still Apple's GAS.\n\nDoes it print its own version, or does it invoke LLVM's `as`, and if so, what does the latter give?\n\n(At least older versions of LLVM's assembler *on Linux*, probably not on MacOS X, don't know/accept `-v`, but `-version` as well as `--version`.)\n\nAnd does `as -v -q </dev/null` (options swapped) behave the same?",
"created_at": "2016-07-20T19:50:18Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301367",
"user": "https://github.com/nexttime"
}
Hmmm, still haven't pushed a branch to #21064 (still playing a little with improvements)...
I wonder what as -q -v </dev/null
gives on older versions of MacOS X where the default as
is still Apple's GAS.
Does it print its own version, or does it invoke LLVM's as
, and if so, what does the latter give?
(At least older versions of LLVM's assembler on Linux, probably not on MacOS X, don't know/accept -v
, but -version
as well as --version
.)
And does as -v -q </dev/null
(options swapped) behave the same?
archive/issue_comments_301368.json:
{
"body": "<div id=\"comment:47\" align=\"right\">comment:47</div>\n\n> I wonder what `as -q -v </dev/null` gives on older versions of MacOS X where the default `as` is still Apple's GAS.\n> \n> Does it print its own version, or does it invoke LLVM's `as`, and if so, what does the latter give?\n\nIt's LLVM's `as` that's invoked (seen here on 10.9):\n\n```\n% as -v -q < /dev/null\nApple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)\nTarget: x86_64-apple-darwin13.4.0\nThread model: posix\n \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\" -cc1as -triple x86_64-apple-macosx10.9.0 -filetype obj -main-file-name - -target-cpu core2 -fdebug-compilation-dir /Users/dunfield -dwarf-debug-producer Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) -o a.out -\n```\n\n> And does `as -v -q </dev/null` (options swapped) behave the same?\n\nYes, it does. The `-version` flag is not accepted in either order, but `--version` and produces:\n\n```\n% as -q --version < /dev/null\nApple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)\nTarget: x86_64-apple-darwin13.4.0\nThread model: posix\n```",
"created_at": "2016-07-20T19:56:54Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301368",
"user": "https://github.com/NathanDunfield"
}
I wonder what
as -q -v </dev/null
gives on older versions of MacOS X where the defaultas
is still Apple's GAS.Does it print its own version, or does it invoke LLVM's
as
, and if so, what does the latter give?
It's LLVM's as
that's invoked (seen here on 10.9):
% as -v -q < /dev/null
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1as -triple x86_64-apple-macosx10.9.0 -filetype obj -main-file-name - -target-cpu core2 -fdebug-compilation-dir /Users/dunfield -dwarf-debug-producer Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) -o a.out -
And does
as -v -q </dev/null
(options swapped) behave the same?
Yes, it does. The -version
flag is not accepted in either order, but --version
and produces:
% as -q --version < /dev/null
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
archive/issue_comments_301369.json:
{
"body": "<div id=\"comment:48\" align=\"right\">comment:48</div>\n\nP.S.: A funny interpretation of `-q` on Apple's side by the way; to the original GNU assembler, `-q` means *\"quieten some warnings\"* (**not** including errors, I guess)... XD",
"created_at": "2016-07-20T20:00:07Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301369",
"user": "https://github.com/nexttime"
}
P.S.: A funny interpretation of -q
on Apple's side by the way; to the original GNU assembler, -q
means "quieten some warnings" (not including errors, I guess)... XD
archive/issue_comments_301370.json:
{
"body": "<div id=\"comment:49\" align=\"right\">comment:49</div>\n\nFYI (in case you don't already know it):\n\n[This nice list](https://gist.github.com/yamaya/2924292#file-xcode-clang-vers) maps Xcode versions to (Apple) clang versions at least.\n\nWe could use it to get the Xcode version from `clang --version`, and in conjunction with [data from wikipedia](https://en.wikipedia.org/wiki/Xcode#Version_comparison_table), could check whether it is (one of) the most recent version(s) available for MacOS X 10.*N* (aka Darwin *N+4* IIRC).\n\n(I haven't found any information on the assembler versions / when Apple's GAS vanished, though.)\n\n\n\n\n[According to that](https://en.wikipedia.org/wiki/Xcode#Toolchain_versions), Travis' friend (with `as` being GNU's) was using something between Xcode 6.3 and 6.4 (inclusive; cctools-870) on \"El Capitan\", while for that, 7.x (and 8.0 beta) are available since about ten months (or e.g. four months for 7.3).",
"created_at": "2016-07-22T00:26:47Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301370",
"user": "https://github.com/nexttime"
}
FYI (in case you don't already know it):
This nice list maps Xcode versions to (Apple) clang versions at least.
We could use it to get the Xcode version from clang --version
, and in conjunction with data from wikipedia, could check whether it is (one of) the most recent version(s) available for MacOS X 10.N (aka Darwin N+4 IIRC).
(I haven't found any information on the assembler versions / when Apple's GAS vanished, though.)
According to that, Travis' friend (with as
being GNU's) was using something between Xcode 6.3 and 6.4 (inclusive; cctools-870) on "El Capitan", while for that, 7.x (and 8.0 beta) are available since about ten months (or e.g. four months for 7.3).
archive/issue_comments_301371.json:
{
"body": "<div id=\"comment:50\" align=\"right\">comment:50</div>\n\nReplying to [@nexttime](#comment%3A49):\n> (I haven't found any information on the assembler versions / when Apple's GAS vanished, though.)\n\nI *guess* it was removed when switching from Xcode 6.x to 7.x; *if that's true*, the\n\n* last version *with* GAS would be 6.4 (with cctools-870, Apple LLVM 6.1.0, clang-602.0.53), the\n\n* first version *without* GAS would be 7.0 (with cctools-877.5, Apple LLVM 7.0.0, clang-700.0.72).\n\nXcode versions 7.0 - 7.2.1 require at least Yosemite, Xcode 7.3 and later El Capitan.\n\n\n\n\nIt seems the Xcode and \"Apple LLVM\" *major* version numbers are (meanwhile) derived from the *minor* version of upstream LLVM (with some fuzz), while the versions in \"clang-*x.y.z*\" are more weird (*x* = 100 * Xcode major version + *n* with a \"random\" *n < 10*, *y* being a small minor version number and *z* being the patchlevel).",
"created_at": "2016-07-22T15:15:13Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301371",
"user": "https://github.com/nexttime"
}
Replying to @nexttime:
(I haven't found any information on the assembler versions / when Apple's GAS vanished, though.)
I guess it was removed when switching from Xcode 6.x to 7.x; if that's true, the
-
last version with GAS would be 6.4 (with cctools-870, Apple LLVM 6.1.0, clang-602.0.53), the
-
first version without GAS would be 7.0 (with cctools-877.5, Apple LLVM 7.0.0, clang-700.0.72).
Xcode versions 7.0 - 7.2.1 require at least Yosemite, Xcode 7.3 and later El Capitan.
It seems the Xcode and "Apple LLVM" major version numbers are (meanwhile) derived from the minor version of upstream LLVM (with some fuzz), while the versions in "clang-x.y.z" are more weird (x = 100 * Xcode major version + n with a "random" n < 10, y being a small minor version number and z being the patchlevel).
archive/issue_comments_301372.json:
{
"body": "<div id=\"comment:51\" align=\"right\">comment:51</div>\n\nReplying to [@nexttime](#comment%3A50):\n> Replying to [@nexttime](#comment%3A49):\n> > (I haven't found any information on the assembler versions / when Apple's GAS vanished, though.)\n> \n> \n> I *guess* it was removed when switching from Xcode 6.x to 7.x; *if that's true*, the\n> \n> * last version *with* GAS would be 6.4 (with cctools-870, Apple LLVM 6.1.0, clang-602.0.53), the\n> \n> * first version *without* GAS would be 7.0 (with cctools-877.5, Apple LLVM 7.0.0, clang-700.0.72).\n> \n> Xcode versions 7.0 - 7.2.1 require at least Yosemite, Xcode 7.3 and later El Capitan.\n\nAccording to [this post on sage-support](http://permalink.gmane.org/gmane.comp.mathematics.sage.support/39668), my guess was a bit wrong.\n\nApple's GAS was removed / LLVM's assembler made the default in (still presumably) Xcode 7.**3**, not 7.0 or 7.1 (but perhaps already 7.2, which in contrast to 7.3 is available for MacOS X 10.10).",
"created_at": "2016-07-28T06:13:20Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301372",
"user": "https://github.com/nexttime"
}
Replying to @nexttime:
Replying to @nexttime:
(I haven't found any information on the assembler versions / when Apple's GAS vanished, though.)
I guess it was removed when switching from Xcode 6.x to 7.x; if that's true, the
last version with GAS would be 6.4 (with cctools-870, Apple LLVM 6.1.0, clang-602.0.53), the
first version without GAS would be 7.0 (with cctools-877.5, Apple LLVM 7.0.0, clang-700.0.72).
Xcode versions 7.0 - 7.2.1 require at least Yosemite, Xcode 7.3 and later El Capitan.
According to this post on sage-support, my guess was a bit wrong.
Apple's GAS was removed / LLVM's assembler made the default in (still presumably) Xcode 7.3, not 7.0 or 7.1 (but perhaps already 7.2, which in contrast to 7.3 is available for MacOS X 10.10).
archive/issue_comments_301373.json:
{
"body": "<div id=\"comment:52\" align=\"right\">comment:52</div>\n\nI've opened #21116 for improvements to Sage's top-level `configure`, where we could check Darwin and Xcode versions, and install a wrapper script when necessary. (That's only *one of* the items I've listed there, referring back to this ticket.)\n\nFor binary distributions, we'd probably have to include such a script as well, at least when they're used also on older versions of MacOS X than the buildbot has, or when the Xcode version (if any) on the user's machine is less recent than that with which the binary got built (if the user wants to install packages requiring compilation, or probably rebuild parts of Sage).",
"created_at": "2016-07-28T15:13:05Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301373",
"user": "https://github.com/nexttime"
}
I've opened #21116 for improvements to Sage's top-level configure
, where we could check Darwin and Xcode versions, and install a wrapper script when necessary. (That's only one of the items I've listed there, referring back to this ticket.)
For binary distributions, we'd probably have to include such a script as well, at least when they're used also on older versions of MacOS X than the buildbot has, or when the Xcode version (if any) on the user's machine is less recent than that with which the binary got built (if the user wants to install packages requiring compilation, or probably rebuild parts of Sage).
archive/issue_comments_301374.json:
{
"body": "<div id=\"comment:53\" align=\"right\">comment:53</div>\n\nSage now ships NTL 10.3.0.\n\nAre there any outstanding issues from this ticket?\n\nOr was it solved, maybe by #21064?",
"created_at": "2019-01-14T17:19:29Z",
"formatter": "markdown",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_comment",
"url": "https://github.com/sagemath/sage/issues/20779#issuecomment-301374",
"user": "https://github.com/slel"
}
Sage now ships NTL 10.3.0.
Are there any outstanding issues from this ticket?
Or was it solved, maybe by #21064?
archive/issue_events_289977.json:
{
"actor": "https://github.com/jdemeyer",
"created_at": "2019-01-14T17:27:46Z",
"event": "closed",
"issue": "https://github.com/sagemath/sage/issues/20779",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289977"
}
archive/issue_events_289978.json:
{
"actor": "https://github.com/jdemeyer",
"created_at": "2019-01-14T17:27:46Z",
"event": "demilestoned",
"issue": "https://github.com/sagemath/sage/issues/20779",
"milestone_number": null,
"milestone_title": "sage-7.3",
"type": "issue_event",
"url": "https://github.com/sagemath/sage/issues/20779#event-289978"
}