Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 6:38 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Apr 12, 2009 8:29 pm 
Offline

Joined: Sun Apr 12, 2009 6:38 pm
Posts: 6
Bonjour,

Je suis en train d'essayer de faire en sorte que le paquet maniadrive dans les dépôts de Mandriva Linux fonctionne (ce qui n'est pas le cas aujourd'hui).

Au niveau de la compilation, j'ai bien lu la FAQ sur le sujet des libs php et ode nécessaires, et il n'est pas très difficile de modifier le Makefile pour que libraydium soit lié dynamiquement aux lib php et ode de la distribution. Jusque là, la personne qui avait fait le paquetage pour Mandriva il y a 2 ans et demi s'était bien débrouillée.

Malheureusement, à l'heure actuelle maniadrive packagé par Mandriva ne fonctionne pas : l'exécution échoue avec une erreur php : "Fatal error: Call to undefined function curl_init() in /usr/share/games/maniadrive/rayphp/libfile.php on line 57".

Je ne suis pas un packageur aguerri mais j'ai quelques notions et j'ai passé plusieurs heures sur le problème. Qui se réduit à ceci : libraydium.so est lié dynamiquement à libphp5_common5.so, qui est la bibliothèque partagée php de Mandriva. Cela permet à raydium d'utiliser php comme prévu, mais il y a un hic : curl et d'autres extensions php nécessaires à raydium sont compilées en tant qu'extensions, disponibles dans /usr/lib/php/extensions, et ne sont donc pas incluses directement dans le fichier libphp5_common5.so. Apparemment, raydium n'a donc pas accès à des fonctions telles que curl_init().

Dans un contexte d'utilisation habituel de php, le fichier /etc/php.ini est lu par php, ainsi que les fichiers /etc/php.d/*.ini, ce qui permet de bénéficier des extensions. Mais dans le contexte assez particulier de raydium, je ne sais pas comment faire pour que raydium parvienne à utiliser les fonctions curl et autres.

Auriez-vous une piste pour moi ?


Top
 Profile  
 
PostPosted: Sun Apr 12, 2009 8:32 pm 
Offline

Joined: Sun Apr 12, 2009 6:38 pm
Posts: 6
Pour information, le rapport de bug est ici : https://qa.mandriva.com/show_bug.cgi?id=37748


Top
 Profile  
 
PostPosted: Tue Apr 28, 2009 11:47 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Salut,

Je n'ai pas trop le temps de me pencher sur le problème, mais je serais très content de voir le paquet ManiaDrive fonctionner à nouveau, donc voilà une petite info qui va peut être aider : le php.ini est lu par Raydium dans le répertoire courant. C'est d'ailleurs comme ça que ce même problème est géré sous windows.

Voir le define PHP_INI_PATH dans config.h pour plus d'infos. En espérant que ça aide ! :)


Top
 Profile  
 
PostPosted: Mon May 11, 2009 12:48 pm 
Offline

Joined: Sun Apr 12, 2009 6:38 pm
Posts: 6
J'ai modifié le PHP_INI_PATH dans config.h et je n'ai plus d'erreur PHP, donc c'est bon signe.

Le problème, c'est qu'à la place j'ai un segmentation fault dont voici les infos de debug dans GDB, des fois que ça évoquerait quelque chose :

[sam@localhost ~]$ gdb maniadrive
GNU gdb 6.8-6mdv2009.1 (Mandriva Linux release 2009.1)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mandriva-linux-gnu"...
(gdb) run
Starting program: /usr/games/maniadrive
[Thread debugging using libthread_db enabled]
Raydium: Raydium 3D Game Engine
Raydium: version 0.705
Raydium: command line args: OK
Raydium: chdir to '/usr/games/': OK
Raydium: using '/home/sam/.mania_drive' as home dir
Raydium: Requesting 800x600:32 mode
Raydium: Xinerama detected with 1 screens:
Raydium: *** screen 0 : 1024x768 at (0,0)
Raydium: using Xinerama screen 0
[New Thread 0xb57c3710 (LWP 12345)]
Raydium: Found 800x600 with 24 bpp color and 24 bits zbuffer (stencil is 1)
Raydium: using GeForce FX 5200/AGP/SSE2, from NVIDIA Corporation (version 2.1.2 NVIDIA 173.14.18)
Raydium: Signal Handlers: OK
Raydium: OpenGL extensions: OK
Raydium: Platform "4xfloat" vector size is: 16 byte(s) long
Raydium: OpenGL implementation maximum texture size: 4096x4096
Raydium: OpenGL hardware providing 4 texture unit(s)
Raydium: vertex arrays memory: OK
Raydium: path: OK
Raydium: keyboard: OK
Raydium: mouse: OK
Raydium: /dev/input/event0: cannot open (rw), no Force Feedback.
Raydium: joy: FAILED (cannot open /dev/js0 and /dev/input/js0)
[New Thread 0xa9042b90 (LWP 12368)]
[Thread 0xa9042b90 (LWP 12368) exited]
[New Thread 0xa9042b90 (LWP 12369)]
[New Thread 0xa8841b90 (LWP 12370)]
[Thread 0xa8841b90 (LWP 12370) exited]
[Thread 0xa9042b90 (LWP 12369) exited]
[New Thread 0xa9042b90 (LWP 12371)]
[Thread 0xa9042b90 (LWP 12371) exited]
[New Thread 0xa9042b90 (LWP 12372)]
[New Thread 0xa8841b90 (LWP 12373)]
[New Thread 0xa8040b90 (LWP 12374)]
Raydium: sound: Buffer creation successfull
Raydium: sound: OK, using 'default device'
Raydium: PHP support: OK
Raydium: atexit functions: OK
Raydium: lights: OK
Raydium: fog: OK
Raydium: objects: OK
Raydium: network: OK
Raydium: timer: detection: 1 iterations: diff: 4 steps (1000000/sec)
Raydium: timecall: method accuracy = 0.004 ms (249999.98 Hz)
Raydium: timecall: Using basic gettimeofday() method
Raydium: timecall: OK (249999 Hz)
Raydium: timecall: softcall 0: 1 Hz (1000000 clocks interval)
Raydium: particle: OK
Raydium: gui: OK
Raydium: video (live): OK
Raydium: shadow: OK
Raydium: HDR: OK
Raydium: shaders: OK
Raydium: webserver: OK
Raydium: Raydium engine reseted to original state
Raydium: timecall: callback 1: 400 Hz (2500 clocks interval)
Raydium: physics: ODE Net: 10 element(s)/packet
Raydium: physics: OK
Raydium: RegAPI: OK
Raydium: Engine is now ready.
-----------------------------------------------------------
Raydium: sound: Tried to set negative or 0 Pitch , clipped to 0.1
Raydium: Texture num 1 (BOXfront.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 2 (BOXback.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 3 (BOXleft.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 4 (BOXright.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 5 (BOXbottom.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 6 (BOXtop.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 7 (theme-maniadrive.tga) loaded: 256x256, 4 Bpp (b1 lm0 hdr0)
Raydium: Texture num 8 (font3.tga) loaded: 512x512, 1 Bpp (b1 lm0 hdr0)
Raydium: timecall: softcall 2: 1 Hz (1000000 clocks interval)
Raydium: Changing game state to 1
Raydium: timecall: WARNING ! 0 Hz callback (num 1)
Raydium: Texture num 9 (video) FAKED: 256x256, 3 Bpp (b0 lm0 hdr0)
Raydium: live: texture 'video' created
Raydium: video: mania_menu_v1.jpgs (0) as live texture video (0), 256x256 20.00 fps (703 frames)
Raydium: Texture num 10 (BOXmania_cursor.tga) loaded: 32x32, 4 Bpp (b1 lm0 hdr0)
Raydium: ODE: Error: Cannot delete object: invalid name or index
Raydium: Texture num 11 (mania_logo2.tga) loaded: 512x512, 3 Bpp (b0 lm0 hdr0)
Raydium: Texture num 12 (BOXmania_music_popup.tga) loaded: 512x128, 4 Bpp (b1 lm0 hdr0)
Raydium: Texture num 13 (font2.tga) loaded: 512x512, 1 Bpp (b1 lm0 hdr0)
Raydium: Changing game state to 2
Raydium: timecall: callback 1: 400 Hz (2500 clocks interval)

Program received signal SIGSEGV, Segmentation fault.
0xb7482123 in _zend_mm_alloc_int (heap=0x9756208, size=28)
at /usr/src/debug/php-5.2.9/Zend/zend_alloc.c:1855
1855 heap->cache[index] = best_fit->prev_free_block;
(gdb) bt
#0 0xb7482123 in _zend_mm_alloc_int (heap=0x9756208, size=28)
at /usr/src/debug/php-5.2.9/Zend/zend_alloc.c:1855
#1 0xb74839c9 in _emalloc (size=28) at /usr/src/debug/php-5.2.9/Zend/zend_alloc.c:2407
#2 0xb74a6851 in zend_stack_push (stack=0xb75c5aa0, element=0xbfda1ab8, size=28)
at /usr/src/debug/php-5.2.9/Zend/zend_stack.c:46
#3 0xb74878d2 in zend_do_begin_variable_parse ()
at /usr/src/debug/php-5.2.9/Zend/zend_compile.c:910
#4 0xb7476956 in zendparse () at /usr/src/debug/php-5.2.9/Zend/zend_language_parser.c:4546
#5 0xb74781db in compile_file (file_handle=0xbfda50e4, type=8)
at /usr/src/debug/php-5.2.9/Zend/zend_language_scanner.c:3420
#6 0xb74a9b8a in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/src/debug/php-5.2.9/Zend/zend.c:1207
#7 0xb7445784 in php_execute_script (primary_file=0xbfda50e4)
at /usr/src/debug/php-5.2.9/main/main.c:2044
#8 0xb775471e in raydium_php_exec (name=0xb778d660 "rayphp/getfile.php") at raydium/php.c:241
#9 0xb7754f23 in raydium_rayphp_repository_file_get (
path=0xbfda56a4 "/home/sam/.mania_drive/mania_drive.story.pro") at raydium/rayphp.c:50
#10 0xb773633e in raydium_file_fopen (
file=0xbfda7a1d "/home/sam/.mania_drive/mania_drive.story.pro", mode=0x8053e40 "rt")
at raydium/file.c:151
#11 0x0804eda3 in build_gui_Story_sub (handle=0, filename=0x80546cc "mania_drive.story.pro",
x1=52, x2=83, id=1) at mania_drive.c:927
#12 0x0804f254 in build_gui_Story () at mania_drive.c:1005
#13 0xb776275c in raydium_gui_button_draw (w=1, window=0) at raydium/gui.c:420
#14 0xb77658c6 in raydium_gui_window_draw (window=0) at raydium/gui.c:1307
#15 0xb7765ad1 in raydium_gui_draw () at raydium/gui.c:1371
#16 0xb7732ea7 in raydium_callback_image () at raydium/callback.c:40
#17 0xb7756d0c in raydium_rendering_finish () at raydium/render.c:393
#18 0x08051d92 in display () at mania_drive.c:2195
#19 0xb776e1a8 in glutMainLoop () at raydium/myglut.c:59
#20 0xb7732fcd in raydium_callback (loop=0x80514f0) at raydium/callback.c:86
---Type <return> to continue, or q <return> to quit---
#21 0x08053ace in main (argc=Cannot access memory at address 0x34
) at mania_drive.c:2601
(gdb) /home/sam/rpmbuild/RPMS/i586/


Top
 Profile  
 
PostPosted: Mon May 11, 2009 12:56 pm 
Offline

Joined: Sun Apr 12, 2009 6:38 pm
Posts: 6
Et voici la fin de l'appel à strace :

open("maniadrive.gui", O_RDONLY) = 15
close(15) = 0
open("maniadrive.gui", O_RDONLY) = 15
fstat64(15, {st_mode=S_IFREG|0644, st_size=1280, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb50ce000
read(15, "// Default theme for Raydium's GU"..., 4096) = 1280
read(15, ""..., 4096) = 0
close(15) = 0
munmap(0xb50ce000, 4096) = 0
open("/home/sam/.mania_drive/mania_drive.story.pro", O_RDONLY) = -1 ENOENT (No such file or directory)
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
open("rayphp/getfile.php", O_RDONLY) = 15
time(NULL) = 1242046662
getcwd("/usr/share/games/maniadrive"..., 4096) = 28
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/games", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/games/maniadrive", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/games/maniadrive/rayphp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/share/games/maniadrive/rayphp/getfile.php", {st_mode=S_IFREG|0644, st_size=687, ...})= 0
ioctl(15, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb7f598) = -1 ENOTTY (Inappropriate ioctl for device)
fstat64(15, {st_mode=S_IFREG|0644, st_size=687, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb50ce000
read(15, "<?\n// gets file from repositories"..., 8192) = 687
read(15, ""..., 4096) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
[sam@localhost ~]$


Top
 Profile  
 
PostPosted: Mon May 11, 2009 7:29 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Bonjour,

Je ne peux pas trop aider, je m'occupe plutot de la partie windows.

Cependant cela ressemble a une erreur module php.

Est ce la bonne version, les includes sont ils les bons, sous windows il est très facile de tout mixer et de faire des plantages de ce type la.

Essaye une appli plus petite comme skel.c par exemple ?

Si cela marche train.c qui utilise des scripts php.

Bonne journée
Ouille


Top
 Profile  
 
PostPosted: Tue May 12, 2009 4:01 pm 
Offline

Joined: Sun Apr 12, 2009 6:38 pm
Posts: 6
Question sûrement bête, mais où puis-je trouver skel.c ou train.c et comment les tester ?


Top
 Profile  
 
PostPosted: Tue May 12, 2009 4:10 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Oups ...
Je suis allé trop vite.

Pour faire les tests essayer de recuperer le sdk de raydium le sdk de raydium.

A partir de la en utilisant les scripts par exemple
Quote:
"./ostatcomp.sh skel.c"


Cela permet de construire une application raydium de base qu'il suffit ensuite d'executer.

Peux tu faire ce test et poster le resultat, merci.

Ouille.


Top
 Profile  
 
PostPosted: Wed May 20, 2009 11:57 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Je vais tenter de jeter un coup d'œil de mon coté sur la 2009.1, parce que cette segfault me semble particulièrement étrange. Peut-être une évolution dans la version (récente) de PHP utilisée par la distrib ?


Top
 Profile  
 
PostPosted: Thu May 21, 2009 9:57 am 
Offline

Joined: Sun Apr 12, 2009 6:38 pm
Posts: 6
Ça ce serait super, parce que je suis un peu au point mort là, n'ayant pas réussi à réaliser les tests proposés par Ouille :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group