sshivaji / kivy-chess

Chess Application using Kivy.
43 stars 15 forks source link

libchess module missing on Mac OS X #5

Open nallapan opened 9 years ago

nallapan commented 9 years ago

Hi, I am seeing this error on the Mac OSX. Followed all the steps. Am I missing some steps?

(chess)kivy-chess$ kivy main.py [INFO ] Kivy v1.8.0 Purge log fired. Analysing... Purge finished ! [INFO ] [Logger ] Record log in /Users/sainalla/.kivy/logs/kivy_14-10-08_14.txt [INFO ] [Factory ] 157 symbols loaded [DEBUG ] [Cache ] register with limit=None, timeout=60s [DEBUG ] [Cache ] register with limit=None, timeout=Nones [INFO ] [Image ] Providers: img_imageio, img_tex, img_dds, img_pygame, img_gif (img_pil ignored) [DEBUG ] [Cache ] register with limit=1000, timeout=60s [DEBUG ] [Cache ] register with limit=1000, timeout=3600s [DEBUG ] [Cache ] register with limit=None, timeout=Nones [INFO ] [Text ] Provider: pygame [DEBUG ] [Window ] Ignored (import error) [INFO ] [Window ] Provider: pygame(['window_egl_rpi'] ignored) [DEBUG ] [Window ] Display driver Quartz [DEBUG ] [Window ] Actual window size: 800x600 [DEBUG ] [Window ] Actual color bits r8 g8 b8 a8 [DEBUG ] [Window ] Actual depth bits: 24 [DEBUG ] [Window ] Actual stencil bits: 8 [DEBUG ] [Window ] Actual multisampling samples: 2 [INFO ] [GL ] OpenGL version <2.1 NVIDIA-8.26.28 310.40.55b01> [INFO ] [GL ] OpenGL vendor [INFO ] [GL ] OpenGL renderer <NVIDIA GeForce GT 650M OpenGL Engine> [INFO ] [GL ] OpenGL parsed version: 2, 1 [INFO ] [GL ] Shading version <1.20> [INFO ] [GL ] Texture max size <16384> [INFO ] [GL ] Texture max units <16> [DEBUG ] [Shader ] Fragment compiled successfully [DEBUG ] [Shader ] Vertex compiled successfully [DEBUG ] [ImageImageIO] Load </Applications/Kivy.app/Contents/Resources/kivy/kivy/data/glsl/default.png> [INFO ] [GL ] BGRA texture support is available [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked [DEBUG ] [Cache ] register with limit=500, timeout=60s [INFO ] [Loader ] using a thread pool of 2 workers [DEBUG ] [Cache ] register with limit=None, timeout=60.0s [DEBUG ] [Cache ] register with limit=None, timeout=60.0s Traceback (most recent call last): File "main.py", line 61, in from chess import polyglot_opening_book File "/Users/sainalla/Projects/chess/kivy-chess/chess/init.py", line 30, in from libchess import START_FEN ImportError: No module named libchess

sshivaji commented 9 years ago

Yes, this issue was specifically covered in step 3 of the build - " If not running on Mac OS X, the libchess.so library needs to be built, go to https://github.com/sshivaji/python-chess, switch to the pgn branch. Then execute "sudo python setup.py install".

At some point I want to automate the steps and have a setup.py that does it all.

nallapan commented 9 years ago

But I am running it on Mac OSX (Mavericks)

sshivaji commented 9 years ago

Typo in instructions, this needs to be run on all platforms. Libchess is not installed by default :) will fix instructions.

Sent from my iPhone

On Oct 9, 2014, at 8:05 AM, Sai Nallapaneni notifications@github.com wrote:

But I am running it on Mac OSX (Mavericks)

\ Reply to this email directly or view it on GitHub.

sshivaji commented 9 years ago

Now updated. The old instructions were a remnant from a while back.

Those days I had committed libchess.so to the source tree for Mac OS X users. Nowadays, due to different Mac OS X versions (e.g. 10.8 vs 10.9), its better to compile that library from scratch.

Spill-The-Tea commented 5 years ago

I've been struggling to install Kivy-Chess on my mac. I downloaded the libchess branch of Kivychess, and I've managed to overcome a number of obstacles, including figuring out how to compile libchess.so library, but still cannot manage to run the program. After ./run.sh, i recieve the following response:

Traceback (most recent call last): File "main.py", line 99, in from chess import libchess File "/Users/SpillTheTea/Documents/JDel Rio/Chess Games/Chess GUIs/kivy-chess-libchess/chess/init.py", line 30, in from libchess import START_FEN File "build/bdist.macosx-10.14-x86_64/egg/libchess.py", line 7, in File "build/bdist.macosx-10.14-x86_64/egg/libchess.py", line 6, in bootstrap ImportError: dlopen(/Users/SpillTheTea/Library/Caches/Python-Eggs/python_chess-0.0.5-py2.7-macosx-10.14-x86_64.egg-tmp/libchess.so, 2): Symbol not found: __ZN5boost6python17error_already_setD1Ev Referenced from: /Users/SpillTheTea/Library/Caches/Python-Eggs/python_chess-0.0.5-py2.7-macosx-10.14-x86_64.egg-tmp/libchess.so Expected in: flat namespace in /Users/SpillTheTea/Library/Caches/Python-Eggs/python_chess-0.0.5-py2.7-macosx-10.14-x86_64.egg-tmp/libchess.so

Which makes me think, that I may have compiled the libchess.so library wrong. I needed to change the setup.py file from python-chess, needed to link both the boost-regex and boost-python libraries, to directly point to the directory on my computer. Here are the libraries I specifically used: "/usr/local/Cellar/boost-python/1.68.0/lib/libboost_python27.dylib", "/usr/local/Cellar/boost/1.68.0/lib/libboost_regex.dylib",