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

brew install python3 --universal fails #37596

Closed
AlexanderOMara opened this issue Mar 11, 2015 · 12 comments
Closed

brew install python3 --universal fails #37596

AlexanderOMara opened this issue Mar 11, 2015 · 12 comments
Assignees
Labels

Comments

@AlexanderOMara
Copy link

I had previously installed Python 3 with brew install python3 --universal, but I have been unable to upgrade from 3.4.2 to 3.4.3.

Gist with log files and output.

brew doctor output (nothing unexpected):

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libcompress42.dylib
    /usr/local/lib/libtinfl.dylib

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    php54
    qt

Excerpt of error:

./Modules/posixmodule.c:2370:48: error: use of undeclared identifier 'AT_SYMLINK_NOFOLLOW'
                         follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
                                               ^
./Modules/posixmodule.c:2717:22: error: use of undeclared identifier 'AT_SYMLINK_NOFOLLOW'
            flags |= AT_SYMLINK_NOFOLLOW;
                     ^
./Modules/posixmodule.c:2719:22: error: use of undeclared identifier 'AT_EACCESS'
            flags |= AT_EACCESS;
                     ^
./Modules/posixmodule.c:3011:49: error: use of undeclared identifier 'AT_SYMLINK_NOFOLLOW'
                          follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
                                                ^
./Modules/posixmodule.c:3331:49: error: use of undeclared identifier 'AT_SYMLINK_NOFOLLOW'
                          follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
                                                ^
./Modules/posixmodule.c:3565:31: error: use of undeclared identifier 'AT_SYMLINK_FOLLOW'
            follow_symlinks ? AT_SYMLINK_FOLLOW : 0);
                              ^
./Modules/posixmodule.c:4420:48: error: use of undeclared identifier 'AT_REMOVEDIR'
        result = unlinkat(dir_fd, path.narrow, AT_REMOVEDIR);
                                               ^
7 errors generated.
make: *** [Modules/posixmodule.o] Error 1
@tdsmith
Copy link
Contributor

tdsmith commented Mar 11, 2015

The system headers seem wonky. If you cd to /usr/include and run grep -R "#define AT_EACCESS" . where does it show up?

Does installing python3 --build-from-source without --universal work?

@AlexanderOMara
Copy link
Author

grep -R "#define AT_EACCESS" . from /usr/include returned no output.

Is there a way I can try python3 --build-from-source without first removing my currently functional Python 3?

@AlexanderOMara
Copy link
Author

I just tried installing python3 in a clean VM running 10.9.5 and Xcode 6.2, and both brew install python3 --build-from-source and brew install python3 --universal completed successfully.

This is very strange. Also, the VM does not have a /usr/local folder, unlike my host OS.

I also tried renaming the /usr/include folder on my host OS out of the way, but brew upgrade python3 failed very quickly that way, saying "configure: error: cannot run C compiled programs.".

@tdsmith
Copy link
Contributor

tdsmith commented Mar 12, 2015

Indeed, fresh OS installs do not have a /usr/local.

I think the headers in /usr/include are mostly installed by the Xcode Command Line Tools; maybe you can try reinstalling the CLT using a package from https://developer.apple.com/downloads/. You seem to be missing useful headers from that path.

@AlexanderOMara
Copy link
Author

Ah, my bad, I meant to say that the clean VM does not contain the /usr/include directory. Yep, installing the Xcode Command Line Utilities package added the /usr/include directory.

After installing the CLU package, brew install python3 --universal fails in the VM, but brew install python3 --build-from-source succeeds. The grep command also returns nothing in the VM.

@redbar0n
Copy link

Having the same problem.

grep -R "#define AT_EACCESS" . from /usr/include returned no output.

Both brew install python3 --build-from-source and brew install python3 --universal fails with the same error:

==> Installing python3
==> Downloading https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
Already downloaded: /Library/Caches/Homebrew/python3-3.4.3.tar.xz
==> ./configure --prefix=/usr/local/Cellar/python3/3.4.3 --enable-ipv6 --datarootdir=/usr/local/Cellar/python3/3.4.3/share --datadir=/usr/local/Cellar/python3/3.4.3/share --enable
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python3/3.4.3
        /usr/bin/install -c -s Mac/pythonw /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/bin/python3.4m; \
    fi
/usr/bin/strip: for architecture i386 object: /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/bin/python3.4m malformed object (unknown load command 10)
install: child process failed: xcrun strip - /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/bin/python3.4m
make: *** [altbininstall] Error 70

READ THIS: http://git.io/brew-troubleshooting

These open issues may also help:
python3 failed to build on 10.9.5 (https://github.com/Homebrew/homebrew/issues/37596)

System specs:
OSX 10.9.5 Mavericks
Xcode 6.1.1
Qt 5.4.1
No CLT/CLU installed (as I'm using the one bundled in Xcode)

Btw, I was coming into this problem through following this guide: http://danmarner.com/2014/04/23/Installing-PyQt5-with-Python-3-On-OS-X.html

@tdsmith
Copy link
Contributor

tdsmith commented Mar 13, 2015

Please open a new issue with the result of brew gist-logs python3, @redbar0n; that failure is different.

@tdsmith
Copy link
Contributor

tdsmith commented Mar 13, 2015

FWIW, that blog post is outdated; brew install pyqt5 gives you a python3 PyQt5 module just fine, now.

@redbar0n
Copy link

Ah, ok. Thanks. I was able to circumvent my problem somehow.

@tdsmith tdsmith changed the title python3 failed to build on 10.9.5 brew install python3 --universal fails Apr 6, 2015
@tdsmith tdsmith added the python label Apr 6, 2015
@tdsmith tdsmith self-assigned this Apr 6, 2015
@geeklady2
Copy link

To add to the discussion.

brew install python3 --univeral on Mac 10.10.4
installs fine no errors BUT I get the following error

The brew install one line summary

/usr/local/Cellar/python3/3.4.3_2: 5950 files, 103M, built in 3.2 minutes

The error

Ss-Mac:~ dev_user$ python3
Python 3.4.3 (default, Aug 6 2015, 17:28:47)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import sqlite3
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/sqlite3/init.py", line 23, in
from sqlite3.dbapi2 import *
File "/usr/local/Cellar/python3/3.4.3_2/Frameworks/Python.framework/Versions/3.4/lib/python3.4/sqlite3/dbapi2.py", line 27, in
from _sqlite3 import *
ImportError: No module named '_sqlite3'
exit()

Now when I install python3 with out the --universal I do not get the above error.

I realize this issue is closed but I can't help wondering if my issue is related.

@tdsmith
Copy link
Contributor

tdsmith commented Aug 7, 2015

Can you share the output of brew gist-logs python3 please?

@tdsmith
Copy link
Contributor

tdsmith commented Sep 24, 2015

I don't think there's an open issue here that Homebrew can resolve.

@tdsmith tdsmith closed this as completed Sep 24, 2015
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 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