I made some work to build t-engine on OpenBSD, the compilation works now but when I execute the binary, I get a blank window, nothing happen except that the binary use 100% of a cpu.
Code: Select all
/usr/ports/pobj/t-engine4-src-1.4.9/t-engine4-src-1.4.9% ./t-engine
WebCore config: library(/libte4-web.so) spawn(/cef3spawn)
Loading WebCore: Failed loading /libte4-web.so: File not found
[CPU] Detected 4 CPUs
OpenAL device available: OpenAL Soft (default OpenAL Soft)
Available video driver: x11
Available video driver: dummy
NO SELFEXE: bootstrapping from CWD
Creating save thread
===top 2
Booting T-Engine from: /proc
SelfExe gave us app directory of: /
Creating particles thread 0
Creating particles thread 1
Creating particles thread 2
[DO RESIZE] Requested: 800x600 (0, 0); zoom 100%
[DO RESIZE] Got: 800x600 (0, 0)
OpenGL max texture size: 8192
OpenGL max texture size: 8192
Upgrading black texture to size 64
Running lua loader code...
[ACTION => closing the window manually]
Cleaning up!
Terminating!
Webcore shutdown complete
SDL shutdown complete
OpenAL shutdown complete
Thanks for having fun!
Code: Select all
--- src/getself.c.orig Mon Nov 28 12:08:24 2016
+++ src/getself.c Mon Nov 28 12:10:00 2016
@@ -57,8 +57,14 @@ int get_number_cpus()
{
int count;
size_t size=sizeof(count);
+ int name[2];
+ name[0] = CTL_HW;
+ name[1] = HW_NCPU;
- if (sysctlbyname("hw.ncpu",&count,&size,NULL,0)) return 1;
+ if (sysctl(name, 2, &count, &size, NULL, 0) < 0 {
+ count = 1;
+ }
+
return count;
}
Am I doing something wrong ? Do I need to do something else to start the game ?
When I use the OpenBSD ktrace tool to look at system calls, I see this a LOT (ktrace is producing 23 Mb of text running the game for ONE second), this would explain the cpu usage and why it's hanging, but I'm not sure about why it's doing this.
Code: Select all
[..this is only a very little portion of the traces, this part is getting repeated indefinitely..]
20859 t-engine CALL select(5,0x7f7ffffd7550,0,0,0x9f1dbfb73a0)
20859 t-engine STRU struct timeval { 0 }
20859 t-engine STRU struct fd_set { 4 }
20859 t-engine STRU struct fd_set { }
20859 t-engine RET select 0
20859 t-engine CALL clock_gettime(CLOCK_MONOTONIC,0x7f7ffffd7760)
20859 t-engine STRU struct timespec { 522529.616377936 }
20859 t-engine RET clock_gettime 0
20859 t-engine CALL recvmsg(4,0x7f7ffffd6dd0,0)
20859 t-engine RET recvmsg -1 errno 35 Resource temporarily unavailable
20859 t-engine CALL select(5,0x7f7ffffd7550,0,0,0x9f1dbfb73a0)
20859 t-engine STRU struct timeval { 0 }
20859 t-engine STRU struct fd_set { 4 }
20859 t-engine STRU struct fd_set { }
20859 t-engine RET select 0
20859 t-engine CALL clock_gettime(CLOCK_MONOTONIC,0x7f7ffffd7760)