DebianJoe / dungeons

Roguelike Project in Python w/ libtcod
13 stars 5 forks source link

Installing on Waldorf 64-bit #1

Closed Frostlock closed 11 years ago

Frostlock commented 11 years ago

libtcod 1.5.1 comes compiled for libc 2.14 and my waldorf 64-bit has libc 2.13. I have manged to partially recompile libtcod but I haven't gotten all the dependencies right yet. I got a new libtcod.so which was enough to run dungeons.py but I'm not sure if it is entirely without fault. Also the libtcod 64 bit package comes without a libSDL.so , guess I'll have to find one myself :-) Any tips on how you got this running cleanly would be appreciated!

The proposed solution to copy libtcod.so and libtcodpy.py from the 1.5.1 package doesn't work. The libtcod.so depends on libc 2.14 On my system this produces the following error: OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./libtcod.so)

Frostlock commented 11 years ago

Working solution: Recompile libtcod

Walldorf (64bit) comes with version 2.13-38 of libc6, unfortunately as we can tell from the error we need version 2.14 This means that the libtcod we downloaded was compiled using version 2.14 of the compiler, however on my system I have 2.13 of the compiler and libraries. This combination will not fly :-) At this point there is two options, upgrade libc6 to a higher version or recompiling using my current 2.13 compiler. Upgrading libc6 is an option but I have had my fun with apt-pinning and living on the edge. At the moment I prefer to stick as close as possible to the stable repository. Specifically for such an important component as libc I'll stick with stable. That leaves the second option, recompiling.

The extracted libtcod has a subdirectory with makefiles and a readme. Based on the readme the following packages are required.

Running the following make command will compile a useable libtcod.so make -f makefiles/makefile-linux64 release

Put libtcod.so and libtcodpy.py in the same directory as dungeons.py and it should run

wesleywerner commented 11 years ago

@Frostlock I did not mean to copy those files as a solution for your problem, but for the guide to get the game running - sorry for the confusion.

I hear you on the pinning thing, if the compiled version works for you then I'd say it's a Go. I thought I'd be clever and suggest an alternative as grabbing 2.14 libc6 from the Debian archives and export it's path, in effect overriding your 2.13 library detection, but it seems as if 2.14 is not even in the archives :/

hint: try installing these mayhaps - sudo apt-get install libpng12-dev libsdl1.2-dev zlib1g-dev

upx is sneaky, it is based on ucl so perhaps libucl-dev will satisfy it? I won't count on that though, my experience is still young...

DebianJoe commented 11 years ago

If you're having good luck with the recompile, then I'd say that you're good to go. I should have expected some oddities with 1/2 of us working with Waldorf and some of us (well, me for instance) using Sid and Arch for developing. Are you having any issues with the actual performance beyond the difficulty in making the package?

Frostlock commented 11 years ago

@wesleywerner Yep got those packages and thanks for pointing me to libucl-dev I guess the dev versions helped satisfy the needed dependencies, I update my original workaround post to include libucl-dev. Thanks!

@DebianJoe Performance so far looks ok, I'll let you know if I run into trouble. I could post the recompiled version to help out others, not sure what the correct Github way to do this is :-)

Output of compile is now limited to three lines (sorry if it looks a bit mangled) I am not used to recompiling stuff myself but I think this looks ok, any comments?

gcc -shared -Wl,-soname,libtcod.so -o libtcod.so /tmp/libtcod/release/bresenham_c.o /tmp/libtcod/release/bsp_c.o /tmp/libtcod/release/color_c.o /tmp/libtcod/release/console_c.o /tmp/libtcod/release/fov_c.o /tmp/libtcod/release/fov_circular_raycasting.o /tmp/libtcod/release/fov_diamond_raycasting.o /tmp/libtcod/release/fov_recursive_shadowcasting.o /tmp/libtcod/release/fov_permissive2.o /tmp/libtcod/release/fov_restrictive.o /tmp/libtcod/release/heightmap_c.o /tmp/libtcod/release/image_c.o /tmp/libtcod/release/lex_c.o /tmp/libtcod/release/list_c.o /tmp/libtcod/release/mersenne_c.o /tmp/libtcod/release/noise_c.o /tmp/libtcod/release/parser_c.o /tmp/libtcod/release/path_c.o /tmp/libtcod/release/sys_c.o /tmp/libtcod/release/sys_opengl_c.o /tmp/libtcod/release/sys_sdl_c.o /tmp/libtcod/release/sys_sdl_img_bmp.o /tmp/libtcod/release/sys_sdl_img_png.o /tmp/libtcod/release/txtfield_c.o /tmp/libtcod/release/tree_c.o /tmp/libtcod/release/wrappers.o /tmp/libtcod/release/zip_c.o /tmp/libtcod/release/namegen_c.o /tmp/libtcod/release/png/lodepng.o -lz `sdl-config --libs`  -Iinclude -Iinclude/gui -Wall `sdl-config --cflags`  -fno-strict-aliasing -fPIC -ansi -lGL
gcc -shared -Wl,-soname,libtcodxx.so -o libtcodxx.so /tmp/libtcod/release/bresenham.o /tmp/libtcod/release/bsp.o /tmp/libtcod/release/color.o /tmp/libtcod/release/console.o /tmp/libtcod/release/fov.o /tmp/libtcod/release/heightmap.o /tmp/libtcod/release/image.o /tmp/libtcod/release/lex.o /tmp/libtcod/release/mersenne.o /tmp/libtcod/release/mouse.o /tmp/libtcod/release/noise.o /tmp/libtcod/release/parser.o /tmp/libtcod/release/path.o /tmp/libtcod/release/sys.o /tmp/libtcod/release/txtfield.o /tmp/libtcod/release/zip.o /tmp/libtcod/release/namegen.o -L. -ltcod  -Iinclude -Iinclude/gui -Wall `sdl-config --cflags`  -fno-strict-aliasing -fPIC -ansi
gcc -shared -Wl,-soname,libtcodgui.so -o libtcodgui.so /tmp/libtcod/release/gui/button.o /tmp/libtcod/release/gui/container.o /tmp/libtcod/release/gui/flatlist.o /tmp/libtcod/release/gui/hbox.o /tmp/libtcod/release/gui/image.o /tmp/libtcod/release/gui/label.o /tmp/libtcod/release/gui/radiobutton.o /tmp/libtcod/release/gui/slider.o /tmp/libtcod/release/gui/statusbar.o /tmp/libtcod/release/gui/textbox.o /tmp/libtcod/release/gui/togglebutton.o /tmp/libtcod/release/gui/toolbar.o /tmp/libtcod/release/gui/vbox.o /tmp/libtcod/release/gui/widget.o -L. -ltcod -ltcodxx  -Iinclude -Iinclude/gui -Wall `sdl-config --cflags`  -fno-strict-aliasing -fPIC -ansi
DebianJoe commented 11 years ago

That's awesome. I really appreciate the INSTALL file for anyone who may need it. I just made the switch from Arch to Tumbleweed-openSUSE, so I may need that myself. :+1: I'm closing this issue, and thanks again.