Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Latest commit

 

History

History
456 lines (342 loc) · 20.6 KB

20508.md

File metadata and controls

456 lines (342 loc) · 20.6 KB

Issue 20508: Windows 64-bit: warning: -fPIC ignored for target (all code is position independent)

archive/issues_020271.json:

{
    "assignees": [
        "https://github.com/embray"
    ],
    "body": "<div id=\"comment:0\"></div>\n\nThis is an annoying warning that GCC always outputs on Cygwin either 32-bit or 64-bit.  It's harmless really but it is output for every single compiled source file--C or fortran--and there is no `-Wno-` flag to disable it.\n\nThere is a patch now in GCC to remove this outright: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00836.html  But I don't know when it will be available.  The default GCC currently in Cygwin is 5.3, and it does not have this patch.\n\nIt's not worth putting in a lot of effort over this, but I'm squashing it wherever I see it by just removing the `-fPIC` flag (if possible) on Cygwin.  I will maintain a branch for these changes wherever I come across them.\n\nUpstream: **Fixed upstream, in a later stable release.**\n\nComponent: **porting: Cygwin**\n\nAuthor: **Erik Bray**\n\nBranch/Commit: **[u/embray/cygwin-fpic](https://github.com/sagemath/sagetrac-mirror/tree/u/embray/cygwin-fpic) @ [`3302dc8`](https://github.com/sagemath/sagetrac-mirror/commit/3302dc8cd42338976dfa232dc9b9c6281d52a289)**\n\n_Issue created by migration from https://trac.sagemath.org/ticket/20508_\n\n",
    "created_at": "2016-04-27T13:12:32Z",
    "labels": [
        "https://github.com/sagemath/sage/labels/c%3A%20porting%3A%20cygwin",
        "https://github.com/sagemath/sage/labels/p%3A%20trivial%20/%205",
        "https://github.com/sagemath/sage/labels/bug",
        "https://github.com/sagemath/sage/labels/wishlist%20item",
        "https://github.com/sagemath/sage/labels/needs%20work"
    ],
    "reactions": [],
    "repository": "https://github.com/sagemath/sage",
    "title": "Windows 64-bit: warning: -fPIC ignored for target (all code is position independent)",
    "type": "issue",
    "updated_at": "2017-03-16T19:07:24Z",
    "url": "https://github.com/sagemath/sage/issues/20508",
    "user": "https://github.com/embray"
}

This is an annoying warning that GCC always outputs on Cygwin either 32-bit or 64-bit. It's harmless really but it is output for every single compiled source file--C or fortran--and there is no -Wno- flag to disable it.

There is a patch now in GCC to remove this outright: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00836.html But I don't know when it will be available. The default GCC currently in Cygwin is 5.3, and it does not have this patch.

It's not worth putting in a lot of effort over this, but I'm squashing it wherever I see it by just removing the -fPIC flag (if possible) on Cygwin. I will maintain a branch for these changes wherever I come across them.

Upstream: Fixed upstream, in a later stable release.

Component: porting: Cygwin

Author: Erik Bray

Branch/Commit: u/embray/cygwin-fpic @ 3302dc8

Issue created by migration from https://trac.sagemath.org/ticket/20508


archive/issue_events_286460.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-04-27T13:12:32Z",
    "event": "milestoned",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "milestone_number": null,
    "milestone_title": "sage-7.2",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286460"
}

archive/issue_events_286461.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-04-27T13:12:32Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "label": "https://github.com/sagemath/sage/labels/c%3A%20porting%3A%20cygwin",
    "label_color": "0000b0",
    "label_name": "c: porting: cygwin",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286461"
}

archive/issue_events_286462.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-04-27T13:12:32Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "label": "https://github.com/sagemath/sage/labels/p%3A%20trivial%20/%205",
    "label_color": "fff9e5",
    "label_name": "p: trivial / 5",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286462"
}

archive/issue_events_286463.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-04-27T13:12:32Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "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/20508#event-286463"
}

archive/issue_events_286464.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-04-27T13:12:39Z",
    "event": "assigned",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "subject": "https://github.com/embray",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286464"
}

archive/issue_events_286465.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-07-06T12:09:55Z",
    "event": "demilestoned",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "milestone_number": null,
    "milestone_title": "sage-7.2",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286465"
}

archive/issue_events_286466.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-07-06T12:09:55Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "label": "https://github.com/sagemath/sage/labels/wishlist%20item",
    "label_color": "e81ff9",
    "label_name": "wishlist item",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286466"
}

archive/issue_comments_296071.json:

{
    "body": "Author: **Erik Bray**",
    "created_at": "2016-07-06T14:46:46Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296071",
    "user": "https://github.com/embray"
}

Author: Erik Bray


archive/issue_comments_296072.json:

{
    "body": "Commit: **[`3302dc8`](https://github.com/sagemath/sagetrac-mirror/commit/3302dc8cd42338976dfa232dc9b9c6281d52a289)**",
    "created_at": "2016-07-06T14:46:46Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296072",
    "user": "https://github.com/embray"
}

Commit: 3302dc8


archive/issue_comments_296073.json:

{
    "body": "<div id=\"comment:3\" align=\"right\">comment:3</div>\n\nWent ahead and fixed this for most, if not all packages, while waiting for a build to finish.\n\nAgain, the only thing this is fixing as an annoying warning (that will appear for almost every file compiled) on Cygwin where the `-fPIC` flag is enabled.  If future spkgs add this flag it's not a big deal.\n\n---\nLast 10 new commits:\n<table><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/78ecb4fc6f8e5e64b120bfaa5e4de0b7f97025c3\"><code>78ecb4f</code></a></td><td><code>Disable -fPIC when building libfplll on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/6c28afc4939a83708526e30021690af72ff2011f\"><code>6c28afc</code></a></td><td><code>Disable -fPIC when building libpng on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/65efc908d3ffbe3592949abf852976e0142143fc\"><code>65efc90</code></a></td><td><code>Disable -fPIC when building m4ri and m4rie on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/048b1ff830e85b8c1870bb2a48dfd23902a1e0f3\"><code>048b1ff</code></a></td><td><code>Disable -fPIC when building meataxe on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/60bf280ee1e0c686f8f62ae43ad01ac841b00eba\"><code>60bf280</code></a></td><td><code>Disable -fPIC when building modular_decomposition on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/8bd68be1f1ed448ced7ea5ae3713f8e3706f849e\"><code>8bd68be</code></a></td><td><code>Disable -fPIC when building mpfi on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/fa849c84f1c6d0fe63eec30efe954a37331e9e73\"><code>fa849c8</code></a></td><td><code>Disable -fPIC when building ratpoints on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/f1d38190c634ada5e7f53316b66e31c12f2d9d4f\"><code>f1d3819</code></a></td><td><code>Disable -fPIC when building singular on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/ea623698b56bef5e3538dd293f458c765c04d778\"><code>ea62369</code></a></td><td><code>Disable -fPIC when building symmetrica on Cygwin</code></td></tr><tr><td><a href=\"https://github.com/sagemath/sagetrac-mirror/commit/3302dc8cd42338976dfa232dc9b9c6281d52a289\"><code>3302dc8</code></a></td><td><code>Disable -fPIC when building termcap on Cygwin</code></td></tr></table>\n",
    "created_at": "2016-07-06T14:46:46Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296073",
    "user": "https://github.com/embray"
}
comment:3

Went ahead and fixed this for most, if not all packages, while waiting for a build to finish.

Again, the only thing this is fixing as an annoying warning (that will appear for almost every file compiled) on Cygwin where the -fPIC flag is enabled. If future spkgs add this flag it's not a big deal.


Last 10 new commits:

78ecb4fDisable -fPIC when building libfplll on Cygwin
6c28afcDisable -fPIC when building libpng on Cygwin
65efc90Disable -fPIC when building m4ri and m4rie on Cygwin
048b1ffDisable -fPIC when building meataxe on Cygwin
60bf280Disable -fPIC when building modular_decomposition on Cygwin
8bd68beDisable -fPIC when building mpfi on Cygwin
fa849c8Disable -fPIC when building ratpoints on Cygwin
f1d3819Disable -fPIC when building singular on Cygwin
ea62369Disable -fPIC when building symmetrica on Cygwin
3302dc8Disable -fPIC when building termcap on Cygwin

archive/issue_events_286467.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-07-06T14:46:46Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "label": "https://github.com/sagemath/sage/labels/needs%20review",
    "label_color": "7fff00",
    "label_name": "needs review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286467"
}

archive/issue_comments_296074.json:

{
    "body": "Branch: **[u/embray/cygwin-fpic](https://github.com/sagemath/sagetrac-mirror/tree/u/embray/cygwin-fpic)**",
    "created_at": "2016-07-06T14:46:46Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296074",
    "user": "https://github.com/embray"
}

Branch: u/embray/cygwin-fpic


archive/issue_comments_296075.json:

{
    "body": "<div id=\"comment:4\" align=\"right\">comment:4</div>\n\nI don't like adding pointless complexity to `spkg-install` files. I'm not setting the ticket to needs_work for this, but I really don't see the point...",
    "created_at": "2016-07-15T09:16:09Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296075",
    "user": "https://github.com/jdemeyer"
}
comment:4

I don't like adding pointless complexity to spkg-install files. I'm not setting the ticket to needs_work for this, but I really don't see the point...


archive/issue_comments_296076.json:

{
    "body": "<div id=\"comment:5\" align=\"right\">comment:5</div>\n\nThe point is that without this build outputs on Cygwin are almost line noise.  \n\nAdding a single conditional when there are already plenty is hardly \"complexity\".  In the meantime I'm still working to squash the need for duplicating stuff in all these spkg-installs.  Please give this a positive review.",
    "created_at": "2016-07-15T09:51:04Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296076",
    "user": "https://github.com/embray"
}
comment:5

The point is that without this build outputs on Cygwin are almost line noise.

Adding a single conditional when there are already plenty is hardly "complexity". In the meantime I'm still working to squash the need for duplicating stuff in all these spkg-installs. Please give this a positive review.


archive/issue_comments_296077.json:

{
    "body": "<div id=\"comment:6\" align=\"right\">comment:6</div>\n\nHere is a cleaner suggestion: in `sage-env`, define a variable (just a local variable, no need to `export` it) called `fPIC` set to either `\"-fPIC\"` or `\"\"`. Then you can replace `-fPIC` by `$fPIC` in `spkg-install` files without conditionals.",
    "created_at": "2016-07-15T12:05:39Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296077",
    "user": "https://github.com/jdemeyer"
}
comment:6

Here is a cleaner suggestion: in sage-env, define a variable (just a local variable, no need to export it) called fPIC set to either "-fPIC" or "". Then you can replace -fPIC by $fPIC in spkg-install files without conditionals.


archive/issue_comments_296078.json:

{
    "body": "<div id=\"comment:7\" align=\"right\">comment:7</div>\n\nThat would be okay, sure.  Is `sage-env` the best place for that though?  Over in #20218 I added a `PIP_INSTALL` variable used in most Python packages for the common `pip` options to `build/make/install`.  Maybe that's not great now that I think about it, since it means running `spkg-install` manually won't work.  But I don't know if that's supposed to work or not.\n\nOn the other hand I don't like cluttering `sage-env` with countless environment variables used only for building, unless there's a way to do add such variables *only* at build time?",
    "created_at": "2016-07-15T12:33:25Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296078",
    "user": "https://github.com/embray"
}
comment:7

That would be okay, sure. Is sage-env the best place for that though? Over in #20218 I added a PIP_INSTALL variable used in most Python packages for the common pip options to build/make/install. Maybe that's not great now that I think about it, since it means running spkg-install manually won't work. But I don't know if that's supposed to work or not.

On the other hand I don't like cluttering sage-env with countless environment variables used only for building, unless there's a way to do add such variables only at build time?


archive/issue_comments_296079.json:

{
    "body": "<div id=\"comment:8\" align=\"right\">comment:8</div>\n\nReplying to [@embray](#comment%3A7):\n> On the other hand I don't like cluttering `sage-env` with countless environment variables used only for building, unless there's a way to do add such variables *only* at build time?\n\nLike I said, it doesn't have to be an *environment* variable, just a shell variable. I don't think it costs a lot to have such variables so I don't really see the problem.",
    "created_at": "2016-07-15T12:47:46Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296079",
    "user": "https://github.com/jdemeyer"
}
comment:8

Replying to @embray:

On the other hand I don't like cluttering sage-env with countless environment variables used only for building, unless there's a way to do add such variables only at build time?

Like I said, it doesn't have to be an environment variable, just a shell variable. I don't think it costs a lot to have such variables so I don't really see the problem.


archive/issue_comments_296080.json:

{
    "body": "<div id=\"comment:9\" align=\"right\">comment:9</div>\n\nOkay, in that case I'll try that.",
    "created_at": "2016-07-15T13:49:42Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20508#issuecomment-296080",
    "user": "https://github.com/embray"
}
comment:9

Okay, in that case I'll try that.


archive/issue_events_286468.json:

{
    "actor": "https://github.com/jdemeyer",
    "created_at": "2017-03-16T19:07:24Z",
    "event": "unlabeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "label": "https://github.com/sagemath/sage/labels/needs%20review",
    "label_color": "7fff00",
    "label_name": "needs review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286468"
}

archive/issue_events_286469.json:

{
    "actor": "https://github.com/jdemeyer",
    "created_at": "2017-03-16T19:07:24Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20508",
    "label": "https://github.com/sagemath/sage/labels/needs%20work",
    "label_color": "ffff00",
    "label_name": "needs work",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20508#event-286469"
}