Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Python fails to build in Mountain Lion (OS X 10.8.3) #18671

Closed
DragonFired opened this issue Mar 22, 2013 · 23 comments
Closed

Python fails to build in Mountain Lion (OS X 10.8.3) #18671

DragonFired opened this issue Mar 22, 2013 · 23 comments
Labels

Comments

@DragonFired
Copy link

I get the following error when building on a reasonably new and clean MacBookPro. I have tried just about everything I can think of to try and come up empty handed! I have this successfully built on two iMacs, both running on Mountain Loin, but not on this machine...
Aaarggg!

==> ./configure --prefix=/usr/local/Cellar/python/2.7.3 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.3/share --datadir=/usr/local/Cellar/python/2.7.3/share --enabl
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.3
: __inline_strcpy_chk (dest, src))
^
5 errors generated.
make[1]: *** [pythonw] Error 1
make: *** [frameworkinstallapps] Error 2

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

These open issues may also help:
#16646
#17994
#18189
#18657
#18203
#18594
#16303
#17908

Porta-Puter:~ arana$ brew doctor
Your system is raring to brew.
Porta-Puter:~ arana$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 3563364
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8.3-x86_64
Xcode: 4.6.1
CLT: 4.6.0.0.1.1362189000
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

@mistydemeo
Copy link
Member

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

Please follow those instructions and post the build logs it requests, thanks.

@DragonFired
Copy link
Author

Sorry about that...

https://gist.github.com/DragonFired/5225882

@samueljohn
Copy link
Contributor

Never seen this error. I'd like to know which other formulae you have installed? (brew list).
Do you have a different compiler than what comes with Xcode?

What is the output of brew doctor ?

@DragonFired
Copy link
Author

I haven't seen it before either. As I mentioned in the original post, I have built this on other machines successfully, but not on my laptop. Brew doctor comes up totally empty. I am using the latest version of XCode and havent't installed any other compilers.

I am trying to install eric4.4.5 and this is the first piece of doing that. When I just tried to install eric and let brew install all of the dependancies, it failed. I think it's due to it using the system python, so i pulled out all of the brews (and homebrew) and started all over from scratch...

Porta-Puter:~ arana$ brew list
freetype gdbm graphviz libpng pkg-config readline sqlite

@samueljohn
Copy link
Contributor

What is /usr/include/secure/_string.h and where is that coming from? Is that from OS X? Is it the same as on the other Macs? Can you verify that since the error is perhaps related to this.

@DragonFired
Copy link
Author

It appears to be an Apple generated header file. See the opening piece below.

I can only check one of the other machines right now, but that machine does NOT have either the file or the secure directory. One additional piece of information is the both of the other machines were upgrades to Mountain Lion, the MacBook Pro was a fresh install…

I can post the entire file to Gist or forward it if you would like. I'll also check my iMac at home tonight and let you know about that machine as well…

Thanks!!!

Porta-Puter:secure arana$ cat _string.h
/*

  • Copyright (c) 2007 Apple Inc. All rights reserved.
    *
  • @APPLE_LICENSE_HEADER_START@
    *
  • This file contains Original Code and/or Modifications of Original Code
  • as defined in and that are subject to the Apple Public Source License
  • Version 2.0 (the 'License'). You may not use this file except in
  • compliance with the License. Please obtain a copy of the License at
  • http://www.opensource.apple.com/apsl/ and read it before using this
  • file.
    *
  • The Original Code and all software distributed under the License are
  • distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  • EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  • INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  • Please see the License for the specific language governing rights and
  • limitations under the License.
    *
  • @APPLE_LICENSE_HEADER_END@
    */

#ifndef STRING_H

error "Never use <secure/_string.h> directly; include <string.h> instead."

#endif

#ifndef SECURE__STRING_H
#define SECURE__STRING_H

#include <sys/cdefs.h>
#include <secure/_common.h>

#if _USE_FORTIFY_LEVEL > 0

On Mar 25, 2013, at 2:22 PM, Samuel John notifications@github.com wrote:

What is /usr/include/secure/_string.h and where is that coming from? Is that from OS X? Is it the same as on the other Macs? Can you verify that since the error is perhaps related to this.


Reply to this email directly or view it on GitHub.

@lasko
Copy link

lasko commented Mar 26, 2013

I'm currently on a fresh 10.8.3 install (<1 week). I haven't done much so I believe this is a default header file.

$ ls /usr/include/secure
_common.h _stdio.h _string.h

My config:

$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 10bd6be
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.1
CLT: 4.6.0.0.1.1358221012
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Hope this helps.

@DragonFired
Copy link
Author

Those are the ones same ones I have as well, but not on the upgraded machine…

On Mar 26, 2013, at 12:26 PM, Lasko notifications@github.com wrote:

I'm currently on a fresh 10.8.3 install (<1 week). I haven't done much so I believe this is a default header file.

$ ls /usr/include/secure
_common.h _stdio.h _string.h

My config:

$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 10bd6be
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.1
CLT: 4.6.0.0.1.1358221012
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Hope this helps.


Reply to this email directly or view it on GitHub.

@samueljohn
Copy link
Contributor

Ah yes, /usr/include/secure/_string.h and the whole dir seems to come from the "Command Line Tools for Xcode". That shall be no issue. But then again, we have to find what the issue really is ...

@DragonFired
Copy link
Author

Great!

Let me know what I can do to assist!

Arana

On Mar 26, 2013, at 12:34 PM, Samuel John notifications@github.com wrote:

Ah yes, /usr/include/secure/_string.h and the whole dir seems to come from the "Command Line Tools for Xcode". That shall be no issue. But then again, we have to find what the issue really is ...


Reply to this email directly or view it on GitHub.

@samueljohn
Copy link
Contributor

Does it make a difference if you brew install python --env=std?

@samueljohn
Copy link
Contributor

I can't reproduce. I have tested on 10.8.3 with Xcode-only and with CLT-only.

@samueljohn
Copy link
Contributor

I am slowly running out of options ...

@samueljohn
Copy link
Contributor

This is a virgin Mac?
Send me your PATH, your brew --config, the output of env... and brew list. Please make a gist for these ...

@DragonFired
Copy link
Author

Samuel,

This is where it gets a bit cloudy. It was a virgin machine. Then I used Migration Assistant to move over the apps. I didn't move over the System stuff, but I'm unclear exactly what gets moved by Migration Assistant…

The gist is located here: https://gist.github.com/DragonFired/5247625

You will notice that there is a lot more in the brew list than there was in the first one, since I tried brewing weechat as someone suggested that had worked fine for them, but that also failed for me.

Arana

On Mar 26, 2013, at 1:01 PM, Samuel John notifications@github.com wrote:

This is a virgin Mac?
Send me your PATH, your brew --config, the output of env... and brew list. Please make a gist for these ...


Reply to this email directly or view it on GitHub.

@DragonFired
Copy link
Author

The machine in my home office has the security folder but not the _string.h file (nor the other two on my laptop)

On Mar 26, 2013, at 2:06 PM, Arana Fireheart aranafireheart@mac.com wrote:

Samuel,

This is where it gets a bit cloudy. It was a virgin machine. Then I used Migration Assistant to move over the apps. I didn't move over the System stuff, but I'm unclear exactly what gets moved by Migration Assistant…

The gist is located here: https://gist.github.com/DragonFired/5247625

You will notice that there is a lot more in the brew list than there was in the first one, since I tried brewing weechat as someone suggested that had worked fine for them, but that also failed for me.

Arana

On Mar 26, 2013, at 1:01 PM, Samuel John notifications@github.com wrote:

This is a virgin Mac?
Send me your PATH, your brew --config, the output of env... and brew list. Please make a gist for these ...


Reply to this email directly or view it on GitHub.

@samueljohn
Copy link
Contributor

brew list --unbrewed ?

@DragonFired
Copy link
Author

It was quite long, so I added it to the end of the second gist.

On Mar 26, 2013, at 8:25 PM, Samuel John notifications@github.com wrote:

brew list --unbrewed ?


Reply to this email directly or view it on GitHub.

@samueljohn
Copy link
Contributor

Oh so many unbrewed stuff. Why does the doctor not complain about? This breaks numerous builds. Its known. You told this was "a reasonably new and clean Mac" :-) It doesn't look so.
I don't think MySQL, Trolltech or the fuse stuff is a problem for python. But there are pip and easy_install and outdated lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg and perhaps more.
I suggest to rm the Qt stuff and install Qt via homebrew. If you can live with another version of MySQL then the same for that (though 5.x is not in homebrew/versions I think).
Then delete ALL other unbrewed files. Especially lib/python2.7 and the gpg related stuff (remember the error was something about "secure" - perhaps this is a hint.
You can reinstall the fuse stuff afterwards - we don't have it in homebrew yet.
But all other unbrewed files should go! Brew can't isolate software from all those files, they pick them up and builds fail.

@ghost ghost assigned samueljohn Mar 27, 2013
@DragonFired
Copy link
Author

Samuel,

Could those all be from failed brew attempts?

I uninstalled homebrew a few times, thinking I was clearing the decks. I guess not! I will try to delete all of that stuff, reload homebrew and try to just brew python. I will let you know how it goes. 

Arana

Sent from my iPhone

On Mar 27, 2013, at 2:26 AM, Samuel John notifications@github.com wrote:

Oh so many unbrewed stuff. Why does the doctor not complain about? This breaks numerous builds. Its known. You told this was "a reasonably new and clean Mac" :-) It doesn't look so.
I don't think MySQL, Trolltech or the fuse stuff is a problem for python. But there are pip and easy_install and outdated lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg and perhaps more.
I suggest to rm the Qt stuff and install Qt via homebrew. If you can live with another version of MySQL then the same for that (though 5.x is not in homebrew/versions I think).
Then delete ALL other unbrewed files. Especially lib/python2.7 and the gpg related stuff (remember the error was something about "secure" - perhaps this is a hint.
You can reinstall the fuse stuff afterwards - we don't have it in homebrew yet.
But all other unbrewed files should go! Brew can't isolate software from all those files, they pick them up and builds fail.


Reply to this email directly or view it on GitHub.

@samueljohn
Copy link
Contributor

Don't think so. At least not most stuff. Some perhaps.
Let me know....

@DragonFired
Copy link
Author

Samuel,

Well, it worked!!

I took the output of brew --unbrewed and created a script that removed all of the items listed there. then I did the same for brew list…

Now when I ran brew install python it succeded!

Thanks for the assistance and more importantly, the education about homebrew. I can only assume that all of that stuff cam over somehow with Migration Assistant. Now on to the ultimate goal… installing the Eric IDE!

Arana

On Mar 27, 2013, at 10:26 AM, Samuel John notifications@github.com wrote:

Don't think so. At least not most stuff. Some perhaps.
Let me know....

Reply to this email directly or view it on GitHub.

@samueljohn
Copy link
Contributor

So glad!

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants