compilation woes on 64bit linux

Moderator: Moderator

Post Reply
Message
Author
gwmngilfen
Low Yeek
Posts: 5
Joined: Tue Jan 10, 2012 6:32 pm

compilation woes on 64bit linux

#1 Post by gwmngilfen »

Hello all,

I've been attempting to compile the latest SVN version on my 64bit Archlinux box. The good news is that I've managed to compile a binary that seems to execute, however, launching the binary just gives a black screen. I followed the posts on the wiki/forum for editing premake4.lua and te4core.lua, which now look like this:

Code: Select all

===================================================================
--- premake4.lua	(revision 5176)
+++ premake4.lua	(working copy)
@@ -18,7 +18,8 @@
 		"src/physfs",
 		"src/physfs/zlib123",
 		"src/bzip2",
-		"/opt/SDL-2.0/include/SDL2/",
+		"/usr/include/SDL2",
+		"/usr/include/SDL",
 		"/usr/include/GL",
 	}
 	if _OPTIONS.lua == "default" then includedirs{"src/lua"}

Code: Select all

===================================================================
--- build/te4core.lua	(revision 5176)
+++ build/te4core.lua	(working copy)
@@ -57,8 +57,8 @@
 
 
 	configuration "linux"
-		libdirs {"/opt/SDL-2.0/lib/"}
-		links { "dl", "SDL2", "SDL2_ttf", "SDL2_image", "png", "openal", "vorbisfile", "GL", "GLU", "m", "pthread" }
+		libdirs {"/usr/lib/"}
+		links { "dl", "SDL2", "SDL_ttf", "SDL2_image", "png", "openal", "vorbisfile", "GL", "GLU", "m", "pthread" }
 		defines { [[TENGINE_HOME_PATH='".t-engine"']], 'SELFEXE_LINUX' }
 
 	configuration {"Debug"}
Combined with SDL-hg, SDL_image-hg, and SDL2_ttf from the core Arch repo, this appears to build without error, and as you can see, ldd finds all the libraries:

Code: Select all

$ make clean && premake4 clean && premake4 gmake && make
<snip long output>
$ ldd ./t-engine 
	linux-vdso.so.1 =>  (0x00007fff2d479000)
	liblua.so.5.1 => /usr/lib/liblua.so.5.1 (0x00007fbca6deb000)
	libm.so.6 => /lib/libm.so.6 (0x00007fbca6af6000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007fbca68f2000)
	libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x00007fbca662a000)
	libSDL_ttf-2.0.so.0 => /usr/lib/libSDL_ttf-2.0.so.0 (0x00007fbca6423000)
	libSDL2_image-1.2.so.0 => /usr/lib/libSDL2_image-1.2.so.0 (0x00007fbca6205000)
	libpng15.so.15 => /usr/lib/libpng15.so.15 (0x00007fbca5fd8000)
	libopenal.so.1 => /usr/lib/libopenal.so.1 (0x00007fbca5d81000)
	libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007fbca5b78000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fbca591a000)
	libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007fbca56ad000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x00007fbca5491000)
	libc.so.6 => /lib/libc.so.6 (0x00007fbca50f0000)
	/lib/ld-linux-x86-64.so.2 (0x00007fbca7017000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fbca4e51000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007fbca4c3b000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007fbca4a2b000)
	libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00007fbca4791000)
	librt.so.1 => /lib/librt.so.1 (0x00007fbca4589000)
	libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007fbca435c000)
	libogg.so.0 => /usr/lib/libogg.so.0 (0x00007fbca4156000)
	libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007fbca3f31000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fbca3d1e000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007fbca3b1b000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007fbca3914000)
	libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007fbca3712000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fbca33d9000)
	libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007fbca31c3000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fbca2fa5000)
	libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007fbca2d9f000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007fbca2b94000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fbca2890000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fbca267b000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fbca2477000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fbca2271000)


So far so good. However, when I launch t-engine, it just hangs with a black screen. The cmdline shows:

Code: Select all

$ ./t-engine 
[CPU] Detected 8 CPUs
OpenAL device available: OpenAL Soft (default OpenAL Soft)
Available video driver: x11
Available video driver: dummy
NO SELFEXE: bootstrapping from CWD
WARNING: No bootstrap code found, defaulting to working directory for engine code!
Creating particles thread 0
[DO RESIZE] 800x600 (0)
OpenGL max texture size: 8192
OpenGL max texture size: 8192
===fbo 1
Running lua loader code...
move 0 x 37
resize 1916 x 1039
[DO RESIZE] 1916x1039 (0)
OpenGL max texture size: 8192
If I strace it, I can see this repeated hundreds of times per second:

Code: Select all

recvfrom(6, 0x1493cb4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
select(7, [6], NULL, NULL, {0, 0})      = 0 (Timeout)
I'm sure I'm missing something obvious, and it feels like I've *almost* succeeded. Where am I going wrong? I can easily add SDL_ttf-hg as well, but I didn't think a font engine would break the entire display.

Thanks in advance

l0ser18q
Posts: 2
Joined: Fri Aug 31, 2012 12:55 am

Re: compilation woes on 64bit linux

#2 Post by l0ser18q »

Bump for the question.
I have the same error: black screen and nothing more.

Code: Select all

[ENGINE] Switching to turn based
Loading savefile 	/save//
Loading savefile 	/save/player/
Make wait background texture 2 : 1280x900 (2048, 1024)
Lua Error: /engine/Module.lua:392: attempt to index local 'bkgs' (a nil value)
	At [C]:-1 __index
	At /engine/Module.lua:392 
	At [C]:-1 enable
	At /engine/Module.lua:384 loadScreen
	At /engine/Module.lua:541 instanciate
	At /engine/utils.lua:1843 showMainMenu
	At /engine/init.lua:124 
	At [C]:-1 dofile
	At /loader/init.lua:183 
move 1 x 22
resize 1280 x 900
[DO RESIZE] 1280x900 (0)
OpenGL max texture size: 8192
move 1 x 52

skoffer
Posts: 4
Joined: Wed Oct 24, 2012 8:02 am

Re: compilation woes on 64bit linux

#3 Post by skoffer »

gwmngilfen, this is in no way connected with SDL. I get the same error and it turns out that I had lua already installed in system - too old lua. I just remove it, clean/recompile source and everything run smoothly.

May be developers can propose better solution, because now I do not have lua at all...

Post Reply