Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCode 5.1 broke many packages #1654

Closed
ParkerK opened this issue Mar 18, 2014 · 13 comments
Closed

XCode 5.1 broke many packages #1654

ParkerK opened this issue Mar 18, 2014 · 13 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@ParkerK
Copy link

ParkerK commented Mar 18, 2014

As of XCode 5.1, LLVM now treats unknown command-line arguments as errors this can be temporarily avoided with -Wno-error=unused-command-line-argument-hard-error-in-future

I think pip should implement this for OS X, so that packages can install. Currently trying things like pip install Pillow result in this for me:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.5.3/include/freetype2 -I/private/tmp/pip_build_root/Pillow/libImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1`
@dstufft
Copy link
Member

dstufft commented Mar 18, 2014

I think I disagree, because reading the output in the error message that is going to be a hard error in the future. So even if we fix this ourselves it's only a temporary fix until another upgrade happens and it cannot be downgraded to a warning. Have you filed a bug with Apple's radar?

/cc @qwcode @pfmoore

@wsanchez
Copy link

Apple has a Radar ticket open on this.

Until it's fixed, here's a workaround:

export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future";

@Ivoz
Copy link
Contributor

Ivoz commented Mar 28, 2014

IMHO its an Apple bug, pure and simple. Why they want to exist their system's Ruby and Python incompatible with their own build chain is beyond me. :(

@dstufft
Copy link
Member

dstufft commented Mar 28, 2014

@pypa/pip-developers any other thoughts on if we should deal with this or let it fall to upstream?

@pfmoore
Copy link
Member

pfmoore commented Mar 28, 2014

Given that (1) there's a user-level workaround, (2) any fix would stop working when Apple release the next version anyway, and (3) it's clearly an Apple bug at its core, I don't think it;s worth trying to fix in pip. But don't place too much weight on my opinion as I don't use OSX :-)

@dstufft
Copy link
Member

dstufft commented Mar 28, 2014

Ok I've changed my mind, since there's another fix or two i'll fix this and those and push a release.

@dstufft dstufft added this to the 1.5.5 milestone Mar 28, 2014
@typophil
Copy link

Hello,

I've had this issue while installing bcrypt, and the workaround described by @wsanchez worked for me. But I'm having trouble with installing MySQL-python now. I grabbed the mysql_config script from a source package but I get the same error compiling:

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
clang: error: no such file or directory: '@CFLAGS@'
error: command 'cc' failed with exit status 1

But this time, the workaround does not help! Any suggestions?

@grzn
Copy link
Contributor

grzn commented Apr 14, 2014

cannot reproduce:

 ✘ ⮀ issue1654 ⮀ 13:11:19 ⮀ Guys-MacBook-Air ⮀ ~/github/pip ⮀ ⭠ develop ⮀ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 5.1.0.0.1.1396320587
volume: /
location: /
install-time: 1397322771
groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group
 issue1654 ⮀ 13:11:22 ⮀ Guys-MacBook-Air ⮀ ~/github/pip ⮀ ⭠ develop ⮀ pip install MySQL-python
Downloading/unpacking MySQL-python
  http://localhost:3141/root/pypi/MySQL-python/ uses an insecure transport scheme (http). Consider using https if localhost:3141 has it available
  Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
  Running setup.py (path:/Users/guy/.virtualenvs/issue1654/build/MySQL-python/setup.py) egg_info for package MySQL-python

Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python
    building '_mysql' extension
    cc -fno-builtin -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/local/Cellar/mysql/5.6.16/include/mysql -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-x86_64-2.7/_mysql.o -Os -g -fno-strict-aliasing
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.16/include/mysql/my_config.h:348:11: warning: 'SIZEOF_SIZE_T' macro redefined
      #define SIZEOF_SIZE_T  SIZEOF_LONG
              ^
    /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:43:17: note: previous definition is here
    #        define SIZEOF_SIZE_T           8
                    ^
    In file included from _mysql.c:44:
    /usr/local/Cellar/mysql/5.6.16/include/mysql/my_config.h:442:9: warning: 'HAVE_WCSCOLL' macro redefined
    #define HAVE_WCSCOLL
            ^
    /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:902:9: note: previous definition is here
    #define HAVE_WCSCOLL 1
            ^
    _mysql.c:1589:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
            if (how < 0 || how >= sizeof(row_converters)) {
                ~~~ ^ ~
    3 warnings generated.
    cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.9-x86_64-2.7/_mysql.o -L/usr/local/Cellar/mysql/5.6.16/lib -lmysqlclient_r -o build/lib.macosx-10.9-x86_64-2.7/_mysql.so

Successfully installed MySQL-python
Cleaning up...
 issue1654 ⮀ 13:11:24 ⮀ Guys-MacBook-Air ⮀ ~/github/pip ⮀ ⭠ develop ⮀

@typophil
Copy link

Hey,

ok. Hmm. Do you happen to have mysql / mysql-server installed?
I've only put mysql_config(.sh) in /usr/local/mysql/bin and amended the path var:

 → export PATH=$PATH:/usr/local/mysql/bin

So it could be, that the version of the script I use is borked. As mentioned above, it's taken from a
ubuntu source package. I not really willing to install 150MB worth of software, where I only need a
7KB script to build the mysql client software. (not a pip problem, I know.) [I was also only able to
find a mysql-server package for Mac on dev.mysql.com/downloads, MySQL utilities don't do the
trick and I didn't find any other, smaller package, than "mysql community server"]

→ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 5.1.0.0.1.1396320587
volume: /
location: /
install-time: 1397416869
groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group

 → pip install MySQL-python
Downloading/unpacking MySQL-python
  Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded
  Running setup.py (path:/private/tmp/pip_build_root/MySQL-python/setup.py) egg_info for package MySQL-python
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected

Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected
    building '_mysql' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I@pkgincludedir@ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-intel-2.7/_mysql.o @CFLAGS@
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    clang: error: no such file or directory: '@CFLAGS@'
    error: command 'cc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wTWvY2-record/install-record.txt --single-version-externally-managed --compile:
    /usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected

/usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected

/usr/local/mysql/bin/mysql_config: line 105: [: @MYSQL_TCP_PORT_DEFAULT@: integer expression expected

running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

copying _mysql_exceptions.py -> build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/MySQLdb

copying MySQLdb/__init__.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb

copying MySQLdb/converters.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb

copying MySQLdb/connections.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb

copying MySQLdb/cursors.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb

copying MySQLdb/release.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb

copying MySQLdb/times.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb

creating build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-intel-2.7/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.macosx-10.9-intel-2.7

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I@pkgincludedir@ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.9-intel-2.7/_mysql.o @CFLAGS@

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

clang: error: no such file or directory: '@CFLAGS@'

error: command 'cc' failed with exit status 1

@grzn
Copy link
Contributor

grzn commented Apr 15, 2014

I installed myself with brew. I don't know why you insist of not installing it, but if you still do, and python-MySQL does not link with the shared libraries of mysql, then you can remove it once you installed the python module.

@typophil
Copy link

Hey,

thanks for your time and input, it's much appreciated.

The problem with installing mysql server is maybe best explained with a short example:

One morning you wake up and get ready to go to work. Good news, someone parked a car in front of
your house. "Use this, it's the best way to get to work, given your way to work!"
But: The car won't start. In order to get it running, you need a new ignition plug. Would you buy another
car or a motorcycle to get it, only to dump the rest of it? In the end you just need the ignition plug. ;-)

This is rather a problem of the package itself. I.e. MySQL Workbench does properly work without any other mysql component installed. It was build $somewhere and works just fine now. I need this 7KB
script only to build the client (MySQL-python), but I have "to buy another car" to get the client working.

And yes, I guess what I'll try to do next, is to install the server, try to build it again and dump the server
once the build succeeds. But IMHO this is a very bad approach to solving dependencies.

I'm stubborn from time to time, head first through the wall, no matter what's behind it. Not jumping on
first freight train that'll take me around it, making a huge detour. So please don't take offense!

My Best,

@grzn
Copy link
Contributor

grzn commented Apr 15, 2014

Well the installation with brew is pretty isolated and removing it is very clean

I don't know why python-MySQL chose to do this, and not to embed everything they need like other C extensions do, like gevent for example. You should open an issue with them about it.

@dstufft dstufft modified the milestones: Improve our User Experience, 1.5.5 Apr 19, 2014
@dstufft
Copy link
Member

dstufft commented Jul 3, 2014

This is fixed in OSX 10.9.3, so I'm going to close this as it was fixed upstream.

@dstufft dstufft closed this as completed Jul 3, 2014
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

7 participants