[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2021-01-01 Thread David Beazley


Change by David Beazley :


--
stage:  -> 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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2016-08-04 Thread Lawrence Velázquez

Changes by Lawrence Velázquez :


--
nosy: +larryv

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2016-08-02 Thread Mojca Miklavec

Changes by Mojca Miklavec :


Removed file: 
http://bugs.python.org/file43974/python3.5.2-should-not-use-libatomic-with-old-clang.diff

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2016-08-02 Thread Mojca Miklavec

Changes by Mojca Miklavec :


Added file: 
http://bugs.python.org/file43975/python3.5.2-should-not-use-libatomic-with-old-clang.diff

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2016-08-02 Thread Mojca Miklavec

Changes by Mojca Miklavec :


--
keywords: +patch
Added file: 
http://bugs.python.org/file43974/python3.5.2-should-not-use-libatomic-with-old-clang.diff

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-12-26 Thread Tim Smith

Changes by Tim Smith :


--
nosy: +tdsmith

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-12-11 Thread Mojca Miklavec

Mojca Miklavec added the comment:

Is anyone willing to help me a bit to come up with a pull request?

I took some ideas from here:
https://fossies.org/diffs/xscreensaver/5.30_vs_5.32/utils/thread_util.c-diff.html

Citation from that patch:
   Clang 3.0 has a partial implementation of GNU atomics; 3.1 rounds it out.

   
http://llvm.org/viewvc/llvm-project/cfe/tags/RELEASE_30/final/include/clang/Basic/Builtins.def?view=markup
   
http://llvm.org/viewvc/llvm-project/cfe/tags/RELEASE_31/final/include/clang/Basic/Builtins.def?view=markup

   Apple changes the Clang version to track Xcode versions; use
   __apple_build_version__ to distinguish between the two.

   Xcode 4.3 uses Apple LLVM 3.1, which corresponds to Clang 3.1.
   https://en.wikipedia.org/wiki/Xcode

One should probably adapt this into "at least clang 3.3 (or perhaps even 3.4?) 
is needed". Now, the basic test in configure.ac is the following:

volatile int val = 1;
int main() {
__atomic_load_n(, __ATOMIC_SEQ_CST);
return 0;
}

With clang on 10.7 (Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 
3.2svn)) this compiles, runs and returns 0. Evidently a more complex test is 
needed to trigger the error, but I'm not sure that that test should be since I 
don't have enough experience with "atomic". If you have a clue what 
functionality I should test, I will gladly do it and try to come up with a 
better test.

An alternative could be to blacklist a compiler and this is what I am proposing 
here as a very naive approach:

volatile int val = 1;
int main() {
 
__atomic_load_n(, __ATOMIC_SEQ_CST);

#define VERSION_CHECK(cc_major, cc_minor, req_major, req_minor) \
((cc_major) > (req_major) || \
(cc_major) == (req_major) && (cc_minor) >= (req_minor))

#if defined(__clang__)
#if defined(__apple_build_version__)
// either one test or the other should work
// #if __apple_build_version__ < 500
#if !VERSION_CHECK(__clang_major__, __clang_minor__, 5, 0)
this_should_fail();
#endif
// not sure if this is 3.3 or 3.4
#elif !VERSION_CHECK(__clang_major__, __clang_minor__, 3, 3)
this_should_fail();
#endif
#endif

  return 0;
}

--
nosy: +Mojca Miklavec

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Please either mark as wontfix or send me a pull request.

--

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-24 Thread Ned Deily

Ned Deily added the comment:

I don't think we should hold 3.5.0 for a patch for this.  I recommend lowering 
the priority and targeting a patch for 3.5.1.

--
priority: release blocker - normal

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-14 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
nosy: +ronaldoussoren

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-12 Thread STINNER Victor

STINNER Victor added the comment:

You can try to add an ifdef in Include/pyatomic.h.

--

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-11 Thread Larry Hastings

Larry Hastings added the comment:

I'd need to see the patch to be certain, but yes my assumption is I'd accept a 
pull request for this.

--

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-11 Thread Ned Deily

Ned Deily added the comment:

This is a regression from previous releases of Python.  It was introduced by 
fbe87fb071a6 (for Issue22038) which added the use of C built-in functions for 
atomic memory access for additional architectures like x86_64.  It seems that 
the relatively early version of Apple's clang included with Xcode 4 fails 
compiling this code.  The specific clang version that failed (Apple LLVM 
version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)) is the version included 
with the last shipped version of Xcode 4, Xcode 4.6.3, for OS X 10.7 and 10.8.  
For OS X 10.8, there is available a more recent version of Xcode, Xcode 5.1.1, 
which includes a new version of clang, Apple LLVM 5.1 (clang-503.0.40), which 
does correctly compile this code.  In general, we always recommend using the 
most recent available version of Xcode- or Command Line Tools-installed build 
tools for a particular version of OS X (with the notable exception of OS X 10.6 
- stick with Xcode 3.2.6 there).  So upgrading to Xcode 5.1.1 on 
 OS X 10.8.5 should solve the problem there.  Unfortunately, for OS X 10.7.x, 
Xcode 4.6.3 is the most recent version and Xcode 4 has always been somewhat 
problematic for Python builds.  It was in Xcode 4 that Apple stopped shipping 
the native gcc-4.2 compiler in favor of clang and the hybrid Apple 
llvm-gcc-4.2 compiler (which uses gcc as the front end and LLVM as the 
backend).  The llvm-gcc-4.2 compiler was a transitional tool, not 
well-maintained, and is known to incorrectly compile recent versions of Python 
3 (Issue13241) so it cannot be used as a substitute for clang in this case on 
OS X 10.7 (it was no longer shipped as of Xcode 5).

Support for OS X 10.8 is much more important than OS X 10.7: I doubt there are 
*that* many users are still on 10.7.  So I think a case could be made for 
marking this as won't fix.  On the other hand, it should be possible to add 
tests to ./configure to skip trying to use the atomic builtins when this 
compiler is in use.

--
nosy: +haypo, larry
title: Python 3.5rc1 compilation error on OS X 10.8 - Python 3.5rc1 
compilation error with Apple clang 4.2 included with Xcode 4

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