[issue39961] warning: this use of "defined" may not be portable (Mac OS)

2020-03-15 Thread Clem Wang


Clem Wang  added the comment:

Oops: forgot version numbers

MacOS Catalina (10.15.13 19D76)
2.6 Ghz 6-Code Intel i7
32 GB RAM

Homebrew 2.2.10
Homebrew/homebrew-core (git revision 58c0; last commit 2020-03-13)
Homebrew/homebrew-cask (git revision ab52c7; last commit 2020-03-14)

Not sure which compiler is being used, but I have these installed:

gcc --version
gcc (MacPorts gcc9 9.2.0_1) 9.2.0

(3.8-env) C02ZD5VVLVDQ:3.8-env clem.wang$ clang --version
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

--

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



[issue39961] warning: this use of "defined" may not be portable (Mac OS)

2020-03-13 Thread Clem Wang


New submission from Clem Wang :

pyenv install 3.8.2
results in:

BUILD FAILED (OS X 10.15.3 using python-build 20180424)

Inspect or clean up the working tree at 
/var/folders/jy/10md97xn3mz_x_b42l1r2r8cgp/T/python-build.20200313154805.37448
Results logged to 
/var/folders/jy/10md97xn3mz_x_b42l1r2r8cgp/T/python-build.20200313154805.37448.log

Last 10 log lines:
  331 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
  |  ^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:331:6:
 warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:540:6:
 warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
  540 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
  |  ^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:540:6:
 warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
cc1: some warnings being treated as errors
make: *** [Objects/floatobject.o] Error 1
make: *** Waiting for unfinished jobs


The real problem is on line 199 of
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h

/*  */
#define _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT \
defined(SWIFT_CLASS_EXTRA) && 
(!defined(SWIFT_SDK_OVERLAY_PTHREAD_EPOCH) || (SWIFT_SDK_OVERLAY_PTHREAD_EPOCH 
< 1))


I'm not sure if this is a problem for Apple to fix or whether the Python build 
needs to be more tolerant of warnings.

--
components: macOS
messages: 364125
nosy: clem.wang, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: warning: this use of "defined" may not be portable (Mac OS)
type: compile error
versions: Python 3.7, Python 3.8

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