SpockBotMC / SpockBot

High level Python framework for building Minecraft clients and bots.
MIT License
198 stars 47 forks source link

setup.py fails on mac. #200

Closed TimJSwan89 closed 8 years ago

TimJSwan89 commented 8 years ago

In El Capitan update, /usr/bin/ is no longer writable. However, setup.py insists on inferring that a file must be there, even though it can't place one there. Is there a way to get this working without installing anything into system folders? I'd rather just place any non-existing libraries needed into the local folders.

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -c _configtest.c -o _configtest.o
_configtest.c:1:1: error: thread-local storage is not supported for the current target
__thread int some_threadlocal_variable_42;
^
1 error generated.
failure.
removing: _configtest.c _configtest.o
compiling '_configtest.c':
int some_regular_variable_42;

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
Note: will not use '__thread' in the C code
The above error message can be safely ignored
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
         ^
1 error generated.
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1
Gjum commented 8 years ago

This is probably a problem with the cryptography package, not SpockBot itself. Try out http://stackoverflow.com/a/24961925 and whatever fixes it, we should put that in the README.

nickelpro commented 8 years ago

There is no C code in SpockBot, so this is not our bug. I agree with Gjum, this is cryptography's problem. Closing

TimJSwan89 commented 8 years ago

I have cryptography installed...

nickelpro commented 8 years ago

OSX uses a precompiled binary for cryptography too...

This still isn't our bug, but reopening until I we figure out who owns it. Full pip log?

TimJSwan89 commented 8 years ago

host-14-218:SpockBot timothyswan$ pip3 install cryptography --upgrade Requirement already up-to-date: cryptography in /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages Cleaning up...

nickelpro commented 8 years ago

I meant for the install, what is pip trying to install when it chokes?

TimJSwan89 commented 8 years ago
host-14-218:SpockBot timothyswan$ python3 setup.py install
running install
running bdist_egg
running egg_info
writing spockbot.egg-info/PKG-INFO
writing requirements to spockbot.egg-info/requires.txt
writing dependency_links to spockbot.egg-info/dependency_links.txt
writing top-level names to spockbot.egg-info/top_level.txt
reading manifest file 'spockbot.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.md' under directory 'examples'
warning: no files found matching '*.py' under directory 'examples'
writing manifest file 'spockbot.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
creating build/bdist.macosx-10.6-intel/egg
creating build/bdist.macosx-10.6-intel/egg/spockbot
copying build/lib/spockbot/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot
creating build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/biomes.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/blocks.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/constants.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/items.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/materials.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/recipes.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/utils.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
copying build/lib/spockbot/mcdata/windows.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcdata
creating build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/bbuff.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/datautils.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/extensions.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/mcpacket.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/nbt.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/proto.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
copying build/lib/spockbot/mcp/yggdrasil.py -> build/bdist.macosx-10.6-intel/egg/spockbot/mcp
creating build/bdist.macosx-10.6-intel/egg/spockbot/plugins
copying build/lib/spockbot/plugins/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins
copying build/lib/spockbot/plugins/base.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins
creating build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/auth.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/event.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/net.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/settings.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/taskmanager.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/ticker.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
copying build/lib/spockbot/plugins/core/timers.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core
creating build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/channels.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/chat.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/clientinfo.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/craft.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/entities.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/interact.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/inventory.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/keepalive.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/movement.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/pathfinding.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/physics.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/respawn.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/start.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/helpers/world.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers
copying build/lib/spockbot/plugins/loader.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins
creating build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/plugins/tools/__init__.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/plugins/tools/collision.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/plugins/tools/event.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/plugins/tools/inventory_async.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/plugins/tools/smpmap.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/plugins/tools/task.py -> build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools
copying build/lib/spockbot/vector.py -> build/bdist.macosx-10.6-intel/egg/spockbot
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/biomes.py to biomes.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/blocks.py to blocks.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/constants.py to constants.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/items.py to items.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/materials.py to materials.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/recipes.py to recipes.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/utils.py to utils.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcdata/windows.py to windows.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/bbuff.py to bbuff.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/datautils.py to datautils.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/extensions.py to extensions.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/mcpacket.py to mcpacket.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/nbt.py to nbt.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/proto.py to proto.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/mcp/yggdrasil.py to yggdrasil.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/base.py to base.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/auth.py to auth.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/event.py to event.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/net.py to net.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/settings.py to settings.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/taskmanager.py to taskmanager.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/ticker.py to ticker.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/core/timers.py to timers.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/channels.py to channels.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/chat.py to chat.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/clientinfo.py to clientinfo.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/craft.py to craft.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/entities.py to entities.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/interact.py to interact.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/inventory.py to inventory.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/keepalive.py to keepalive.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/movement.py to movement.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/pathfinding.py to pathfinding.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/physics.py to physics.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/respawn.py to respawn.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/start.py to start.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/helpers/world.py to world.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/loader.py to loader.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools/collision.py to collision.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools/event.py to event.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools/inventory_async.py to inventory_async.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools/smpmap.py to smpmap.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/plugins/tools/task.py to task.cpython-34.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/spockbot/vector.py to vector.cpython-34.pyc
creating build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying spockbot.egg-info/PKG-INFO -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying spockbot.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying spockbot.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying spockbot.egg-info/requires.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying spockbot.egg-info/top_level.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/spockbot-0.1.3-py3.4.egg' and adding 'build/bdist.macosx-10.6-intel/egg' to it
removing 'build/bdist.macosx-10.6-intel/egg' (and everything under it)
Processing spockbot-0.1.3-py3.4.egg
Removing /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/spockbot-0.1.3-py3.4.egg
Copying spockbot-0.1.3-py3.4.egg to /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
spockbot 0.1.3 is already the active version in easy-install.pth

Installed /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/spockbot-0.1.3-py3.4.egg
Processing dependencies for spockbot==0.1.3
Searching for cffi>=1.1.0
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.3.1
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.3.1.tar.gz#md5=deeba7c1fd32a66f1db587988d760c11
Processing cffi-1.3.1.tar.gz
Writing /var/folders/3q/5v9c_n555xvf3zcbf0jr8sch0000gn/T/easy_install-s_td2z6u/cffi-1.3.1/setup.cfg
Running cffi-1.3.1/setup.py -q bdist_egg --dist-dir /var/folders/3q/5v9c_n555xvf3zcbf0jr8sch0000gn/T/easy_install-s_td2z6u/cffi-1.3.1/egg-dist-tmp-z8bqs58b
compiling '_configtest.c':
__thread int some_threadlocal_variable_42;

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -c _configtest.c -o _configtest.o
_configtest.c:1:1: error: thread-local storage is not supported for the current target
__thread int some_threadlocal_variable_42;
^
1 error generated.
failure.
removing: _configtest.c _configtest.o
compiling '_configtest.c':
int some_regular_variable_42;

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
Note: will not use '__thread' in the C code
The above error message can be safely ignored
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
         ^
1 error generated.
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1
nickelpro commented 8 years ago

I have no idea what cffi is or why it needs to be installed but there's your bug

TimJSwan89 commented 8 years ago

Under the mac osx section on this page: https://cffi.readthedocs.org/en/latest/installation.html

I followed the instructions

brew install pkg-config libffi
PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig pip install cffi

and it didn't work, but I changed pip to pip3 so,

brew install pkg-config libffi
PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig pip3 install cffi

and it installed, then spockbot setup ran through!

nickelpro commented 8 years ago

Fantastic, closing