I couldn’t get the correct command line tools installed. Installing the full Xcode did it for me.
The directory isn’t working for me, while /Applications/Xcode-beta.app/ works for me.
After doing so, I can’t reinstall python by homebrew, I am using Catalina Beta 5 and here’s the error when I was running the reinstallment
It seems you are still running Xcode 10.15 Your version number for xcode-select should be
xcode-select version 2368.
run the command xcode-select --version and see what outputs
Have you opened Xcode 11 after your installed it? If you haven’t Open the application agree to the terms then try running the command sudo xcode-select -s /Applications/Xcode-beta.app/
hope this helps
Thanks for the reply, I already opened Xcode and set up the CLT to Xcode 11.0,
but it seems homebrew can’t find my CLT
Then it builds python from source and it fails to finish.
two things to try:
- What happens when you run
- Try downloading the command line tools separately and see if that helps.
Are you using bash, zsh, or zsh downloaded from homebrew? Catalina uses zsh now instead of bash
run the command
which zsh to find out which one you are running
Additionally, you may need to update your xcode-beta. Please see the following :
I find an issue(https://github.com/Homebrew/brew/issues/5002) which is exactly the problem I am facing. Yes, I need to download the CLT from https://developer.apple.com/download/more/. After I install the CLT, run command brew config
Anyway, the problem was fixed, thank you for your kindly help bro.
Is anyone able to install Python2 while running Catalina?
brew install python@2
I get the following error:
ln -fsn Versions/Current/Python Python.framework/Python
ln -fsn Versions/Current/Headers Python.framework/Headers
ln -fsn Versions/Current/Resources Python.framework/Resources
clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -u _PyMac_Error Python.framework/Versions/2.7/Python -o python.exe \
Modules/python.o \ -ldl -framework CoreFoundation
DYLD_FRAMEWORK_PATH=/private/tmp/python@2-20190827-29454-1pwlkv6/Python-2.7.16 ./python.exe -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi
/bin/sh: line 1: 35581 Segmentation fault: 11 DYLD_FRAMEWORK_PATH=/private/tmp/python@2-20190827-29454-1pwlkv6/Python-2.7.16 ./python.exe -E -S -m sysconfig --generate-posix-vars
make: *** [pybuilddir.txt] Error 1
Anyone have any thoughts?
Looks like https://bugs.python.org/issue33374 ?
It looks like
gettext won’t build under Xcode 11 (tried beta 6 and beta 7). Spews this:
ftello.c:53:12: error: no member named '_flag' in 'struct __sFILE'; did you mean '_flags'? if (fp_->_flag & _IOWRT) ^~~~~ _flags /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:130:8: note: '_flags' declared here short _flags; /* flags, below; this FILE is free if 0 */ ^ ftello.c:53:20: error: use of undeclared identifier '_IOWRT' if (fp_->_flag & _IOWRT) ^ ftello.c:64:21: error: no member named '_flag' in 'struct __sFILE'; did you mean '_flags'? if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) ^~~~~ _flags /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:130:8: note: '_flags' declared here short _flags; /* flags, below; this FILE is free if 0 */ ^ ftello.c:64:50: error: no member named '_base' in 'struct __sFILE' if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) ~~~ ^ ftello.c:65:25: error: no member named '_ptr' in 'struct __sFILE' pos += fp_->_ptr - fp_->_base; ~~~ ^ ftello.c:65:37: error: no member named '_base' in 'struct __sFILE' pos += fp_->_ptr - fp_->_base; ~~~ ^ 6 errors generated.
gettext is a dependency of ungodly lots of stuff, this hurts.
I’m not too proficient in C and macOS SDK differences to dig into it deeper, sorry.
An update. Guess I figured out the cause, but still no idea how to fix it.
configure script for the
gnulib component, which replaces “broken” libc functions with its own versions, checks for some undesired behavior of
ftell(). It detects that on macOS, if you open a file in “r+” mode, read it up to EOF (by
fseek()ing to its end, really), write one more byte, and call
ftell() on it, the reported position will be wrong — the file pointer needs to advance as you write more data. There seems to be a known bug on Solaris, just like that.
So the configure script sets a variable telling that
ftell() is broken on this system, but
gnulib only has a replacement for Solaris, which uses the
struct __sFILE as found there, and predictably barfs because __sFILE on Darwin is nothing like that.
How healthy an approach to patching systems that misbehave is left as an exercise to the reader, but here’s one thing: up to and including Mojave,
ftell() was working just fine, and the replacement was never needed. Maybe, hm, someone more in the know should report it to Apple before they make a release?
XCode 11 beta 6 (haven’t tried beta 7) also makes
email@example.com segfault. A function accepts a pointer; at the callsite, it’s NULL, but in the function itself, it’s something bogus, which, upon dereferencing, gives a segfault. No idea whatsoever how that compiled. :-/
CLT for XCode Beta 7 seem to be unavailable (https://developer.apple.com/download/more/). Let’s see what tomorrow brings.
I had to downgrade back down to beta 6 as it cause conflicts for me when I upgraded to 7
newbie here, with clt 11 GM brew don’t see xcode-select and keep requesting installing it.
Have you tried installing Xcode from the developer site then run brew config
yes I did. I had to revert to beta 6 to have homwbrew see my clr
I was able to build gettext by setting FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE to 0 as described here:
ftell() really doesn’t work correctly (per assumptions) on Catalina. You can check that by running the very test program gettext itself is using —
ftell() fails expectations. The particular problem with gettext is that it then proceeds to apply a workaround for Solaris, using definitions from the Solaris’ guts.
You can of course set that variable, doesn’t mean your program won’t corrupt your data in the runtime because of this
Python now builds successfully on the latest Catalina public beta. I’m not sure if that’s a change in Catalina or somewhere in the Python code, but I’m no longer getting the error when getttext builds.
@johnbrady833 python2 or 3?