[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread David Edelsohn

David Edelsohn  added the comment:

The AIX buildbots has been exhibiting testsuite failures, but not build 
(compile) failures. The buildbots do not visibly distinguish between the two 
cases in a strong manner.

We can disable / expect failure for the few, additional testcases on AIX so 
that the buildbots will report "success" to make new failures more obvious.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The compilation error occurs only on the master branch, issue 32143 is the 
enhancement that is the  initial cause of this problem. This went unnoticed 
when issue 32143 was resolved because the AIX buildbots were already failing at 
that time for another reason.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread STINNER Victor

STINNER Victor  added the comment:

A compilation error is a blocking bug. It is short and short, it can be
backported to 2.7 and 3.6 no? Is ALL_SOURCE defined vy default?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Thanks Michael for your contribution in fixing this issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-05 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 502d551c6d782963d26957a9e5ff1588946f233f by xdegaye (Michael 
Felt) in branch 'master':
bpo-32390: Fix compilation failure on AIX after f_fsid was added to 
os.statvfs() (#4972)
https://github.com/python/cpython/commit/502d551c6d782963d26957a9e5ff1588946f233f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Michael Felt

Michael Felt  added the comment:

On 03/01/2018 18:03, Xavier de Gaye wrote:
> Xavier de Gaye  added the comment:
>
> The following patch may be less invasive and more explicit:
>
> diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
> index 38b6c80e6b..e0bb4ba869 100644
> --- a/Modules/posixmodule.c
> +++ b/Modules/posixmodule.c
> @@ -9325,7 +9325,11 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) {
>   PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
>   PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
>   #endif
> +#if defined(_AIX) && defined(_ALL_SOURCE)
> +PyStructSequence_SET_ITEM(v, 10, 
> PyLong_FromUnsignedLong(st.f_fsid.val[0]));
> +#else
>   PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid));
> +#endif
>   if (PyErr_Occurred()) {
>   Py_DECREF(v);
>   return NULL;
>
> --
Applied to the PR. Thx.
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Michael Felt

Michael Felt  added the comment:

Ignore my last comment - I have a headache. If I could edit/delete it I would.

aka "reset 2018 - here I come!"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Michael Felt

Michael Felt  added the comment:

On 03/01/2018 14:41, David Edelsohn wrote:
> David Edelsohn  added the comment:
>
> _ALL_SOURCE is overkill. It probably is too big a club for this regression.

Maybe. Clearly it is a big club. The documentation - if you can find any 
- is ancient and/or confusing. For example the xlc compiler reference 
quide (v12 is what I referenced, not the latest, but what I found) only 
has a single reference to any "_SOURCE" macro (-D_POSIX_SOURCE).

I do not know 'why' AIX and Linux differ in the way they name things. I 
do not want to care either - which is why I, personally, am less 
concerned about the size of the club. People much more clever than I 
decided that many variable names should be without two underscores 
(_ALL_SOURCE is defined) while others felt they must have two 
underscores (_ALL_SOURCE is undefined).

IMHO: 15+ years ago IBM (AIX) worked to find a method to simplify 
porting. And, I hope somewhere someone knows what these all meant. The 
practice seems to be to always define _ALL_SOURCE (see configure.ac:
   +882  # checks for UNIX variants that set C preprocessor variables
   +883  AC_USE_SYSTEM_EXTENSIONS
   +884
https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/Posix-Variants.html

Here is where I read that _ALL_SOURCE is for AIX3. I can neither deny 
nor affirm that that is (still) accurate. But that is what working with 
autotools does. Throws a sauce over everything that may, or maynot be 
what is needed.

I considered it 'interesting' that  at least talks a bit 
about _POSIX_SOURCE and _ALL_SOURCE.

>   However, the AIX header definition of fsid compatible with the current 
> Python posixmodule.c code is bracketed by _ALL_SOURCE.
>
> AFAICT, the change to posixmodule.c made assumptions about fsid based on 
> Linux and not required by POSIX. This didn't simply introduce a testsuite 
> regression, but broke the build on AIX. The posixmodule.c code should be 
> corrected or should be reverted.

Maybe reverting the change is better than using the "big club". But, 
asis, AIX is dead to development. Was it possible to have AIX included 
in the PR test process I would hope that the PR would never have been 
merged.

IMHO - this is a spelling issue, going back years. But if you use a 
UK-only spelling checker and try and use only US spelling rules - and 
v.v. - there will be 'issues'. What is the solution with the most 
clarity? Above my pay grade to answer.

In any case the previous issue that saw adding fsid as a solution was 
not fully tested across all platforms. Currently AIX is broken. Someone 
needs to decide how to restore a supported platform - and where the 
discussion on fsid either restarts or continues.

In short - I am just a messenger - you are the experts. :)

>
> --
> nosy: +vstinner
> title: AIX (xlc_r) compile error with Modules/posixmodule.c: Function 
> argument assignment between types "unsigned long" and "struct fsid_t" is not 
> allowed -> AIX compile error with Modules/posixmodule.c: Function argument 
> assignment between types "unsigned long" and "struct fsid_t" is not allowed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The following patch may be less invasive and more explicit:

diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 38b6c80e6b..e0bb4ba869 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -9325,7 +9325,11 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) {
 PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
 PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
 #endif
+#if defined(_AIX) && defined(_ALL_SOURCE)
+PyStructSequence_SET_ITEM(v, 10, 
PyLong_FromUnsignedLong(st.f_fsid.val[0]));
+#else
 PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid));
+#endif
 if (PyErr_Occurred()) {
 Py_DECREF(v);
 return NULL;

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32390] AIX compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2018-01-03 Thread David Edelsohn

David Edelsohn  added the comment:

_ALL_SOURCE is overkill. It probably is too big a club for this regression. 
However, the AIX header definition of fsid compatible with the current Python 
posixmodule.c code is bracketed by _ALL_SOURCE.

AFAICT, the change to posixmodule.c made assumptions about fsid based on Linux 
and not required by POSIX. This didn't simply introduce a testsuite regression, 
but broke the build on AIX. The posixmodule.c code should be corrected or 
should be reverted.

--
nosy: +vstinner
title: AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument 
assignment between types "unsigned long" and "struct fsid_t" is not allowed -> 
AIX compile error with Modules/posixmodule.c: Function argument assignment 
between types "unsigned long" and "struct fsid_t" is not allowed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com