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

Installing/upgrading TCOD 8.0.0 fails on Xubuntu 16.04 #56

Closed
Wolfenswan opened this issue Nov 6, 2018 · 5 comments
Closed

Installing/upgrading TCOD 8.0.0 fails on Xubuntu 16.04 #56

Wolfenswan opened this issue Nov 6, 2018 · 5 comments
Assignees

Comments

@Wolfenswan
Copy link

Wolfenswan commented Nov 6, 2018

All required packages are installed. Python version is 3.6.4. Currently installed tcod version is 6.0.6.

I have tried installing the latest version of tcod using both pip install --upgrade and installing within a fresh virtual environment.

In both cases I receive this error message (pasting only the last lines, I can provide a full log if necessary):

    libtcod/src/libtcod/sdl2/sdl2_alias.cpp: In member function ‘void tcod::sdl2::SDL2InternalTilesetAlias_::sync_alias()’:
    libtcod/src/libtcod/sdl2/sdl2_alias.cpp:98:38: error: ‘SDL_PIXELFORMAT_RGBA32’ was not declared in this scope
             SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA32,
                                          ^
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
  Rolling back uninstall of tcod
Command "/usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-n92anhvf/tcod/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-2w986ex5/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-n92anhvf/tcod/
@HexDecimal
Copy link
Collaborator

HexDecimal commented Nov 6, 2018

I'm familiar with this problem. Currently libtcod requires SDL 2.0.5, the version of SDL on Ubuntu 16.04 is too old and is missing the enum symbol SDL_PIXELFORMAT_RGBA32.

The installer uses sdl2-config so it's possible to build and install the latest version of SDL manually and that will be linked when you install from pip. Otherwise you can upgrade Ubuntu to a later version such as 18.04 LTS, which will have an up-to-date package of SDL.

@HexDecimal HexDecimal self-assigned this Nov 6, 2018
@lee2sman
Copy link

lee2sman commented Nov 7, 2018

Hi, I had the exact same error. I'm on Ubuntu 16.04 LTS so also must have SDL 2.0.4.

I found this thread and followed along faithfully, even trying the --enable-mir-shared=nothat is mentioned lower in the thread. Didn't work for me.

Someone more knowledgeable than I can hopefully use that thread to fix this install method correctly or to update python-tcod.

Ok, but I did get things to work using an 'untrustworthy' PPA build. Info on building SDL 2.0.8 from a dev's source is here. Looks like this is working for me.

@HexDecimal
Copy link
Collaborator

The break specifically happened in python-tcod 7.0.0, when libtcod was updated to 1.9.0. If you're unable to upgrade SDL then you could potentially stick with python-tcod 6.0.7.

@Wolfenswan
Copy link
Author

Wolfenswan commented Nov 8, 2018

Thanks to the help! As per @lee2sman's suggestion Libsdl2-2.0.8 installed fine, though now the tcod installation is unable to find the sdl2-config file, while I'm unable to install libsdl2-dev. Technically my question has been answered however, so feel free to close the issue @HexDecimal.

@Wolfenswan
Copy link
Author

Scratch the last one, after fiddling with my package manager and getting libsdl2-dev to install, tcod 8.0.0 also installed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants