View previous topic :: View next topic |
Author |
Message |
Squall
Joined: 22 Oct 2007 Posts: 24
|
Posted: Wed Nov 14, 2007 11:36 am Post subject: DerelictSDL on ubuntu 7.10 |
|
|
Has anyone tried DerelictSDL on 7.10 recently?
I would have thought this should work, I can't see that I doing anything wrong:
libsdl is 1.2.12. gdc is:
gdc (GCC) 4.1.3 20070831 (prerelease gdc 0.25, using dmd 1.021) (Ubuntu 0.25-4.1.2-16ubuntu1)
root@vm-fruitbat:/mnt/svn/sdltest# dsss build
sdltest.d => sdltest
+ /usr/bin/rebuild -Idsss_imports/ -I. -S./ -I/usr/include/d -S/usr/lib/ -I/usr/include/d -S/usr/lib -I/home/user/d/include/d -S/home/user/d/lib -oqdsss_objs/G -lldl -g sdltest.d -ofsdltest
root@vm-fruitbat:/mnt/svn/sdltest# ./sdltest
Segmentation fault (core dumped)
root@vm-fruitbat:/mnt/svn/sdltest# cat sdltest.d
Code: |
module sdltest;
import derelict.sdl.sdl;
void main()
{
DerelictSDL.load();
SDL_Init(SDL_INIT_VIDEO);
}
|
root@vm-fruitbat:/mnt/svn/sdltest# gdb sdltest
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /mnt/svn/sdltest/sdltest
[Thread debugging using libthread_db enabled]
[New Thread -1210029888 (LWP 15107)]
Program received signal SIGILL, Illegal instruction.
[Switching to Thread -1210029888 (LWP 15107)]
0x080ccc16 in SDL_ClearError ()
(gdb) bt
#0 0x080ccc16 in SDL_ClearError ()
#1 0xb7c7d7bf in SDL_Init () from /usr/lib/libSDL-1.2.so.0
#2 0x0808bcfb in _Dmain () at sdltest.d:8
#3 0x080af2fd in _D9dgccmain211_d_run_mainUiPPaPUAAaZiZi2goMFZv ()
#4 0x080af3aa in _d_run_main ()
#5 0x080ab86a in main ()
(gdb) q
The program is running. Exit anyway? (y or n) y
backtraces vary slightly:
(gdb) #0 0x080cc92d in SDL_InitSubSystem ()
(gdb) #1 0xb7c3e7c7 in SDL_Init () from /usr/lib/libSDL-1.2.so.0
(gdb) #2 0x0808bcfb in _Dmain () at sdltest.d:8
(gdb) #3 0x080af2fd in _D9dgccmain211_d_run_mainUiPPaPUAAaZiZi2goMFZv ()
(gdb) #4 0x080af3aa in _d_run_main ()
(gdb) #5 0x080ab86a in main () |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed Nov 14, 2007 9:48 pm Post subject: |
|
|
Based on the backtrace, I don't see that this has anything to do with Derelict. The error is occurring in the SDL library itself. It might be beneficial to whip up a version of the test in C and see if you still get the segfault. If so, you can take it to the SDL mailing list in a form that everyone there will be familiar with. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
Squall
Joined: 22 Oct 2007 Posts: 24
|
Posted: Thu Nov 15, 2007 11:31 am Post subject: |
|
|
I wrote a c program which loaded an image and displayed it. That worked ok.
There must be something amis with my config. I don't know what it could be. I'll look into it some more later. |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Thu Nov 15, 2007 9:13 pm Post subject: |
|
|
I can confirm this under Kubuntu Feisty. But what's weird is that I can get it to happen (randomly) in different places I get either a SIGSEGV or a SIGILL in SDL_WriteLE32(), SDL_CDName(), SDL_SetTimer(), and SDL_CDNumDrives(). I don't like nondeterminism.
[edit]And yes, I tried making a C program that used SDL too, and it works fine. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri Nov 16, 2007 2:42 am Post subject: |
|
|
OK, I don't have anything set up to test on Ubuntu right now. I wiped my Linux drive sometime ago to use for extra storage. If one of you can try it out with DMD and see if you get the same problems, that would be helpful. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
Posted: Fri Nov 16, 2007 2:53 am Post subject: |
|
|
Works fine with DMD on Ubuntu 7.10. |
|
Back to top |
|
|
Squall
Joined: 22 Oct 2007 Posts: 24
|
Posted: Fri Nov 16, 2007 8:02 am Post subject: |
|
|
Yes that's right. I've tried it too. It doesn't work with gdc for some reason. Thanks for the help. I'll see if I can look at a gdc list or try the latest version. |
|
Back to top |
|
|
mizai
Joined: 19 Nov 2007 Posts: 2
|
Posted: Mon Nov 19, 2007 12:35 am Post subject: |
|
|
Was this problem solved? I'm having the same trouble on Ubuntu 7.10. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Mon Nov 19, 2007 6:11 am Post subject: |
|
|
mizai wrote: | Was this problem solved? I'm having the same trouble on Ubuntu 7.10. |
It's out of my hands until one of you guys using GDC on Ubuntu can narrow it down. Right now, I have no idea if the problem lies on the GDC side or the Derelict side. Until I get more info, there's nothing I can do. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
Squall
Joined: 22 Oct 2007 Posts: 24
|
Posted: Tue Nov 20, 2007 3:26 am Post subject: |
|
|
It works with the DMD compiler from digital mars and not the gnu gdc compiler that's in the ubuntu repositories.
The fix, so far is to install the dmd compiler from the digital mars website. It appears that it's not derelict at this time. I'll let you know as I get a chance to try it out some more. |
|
Back to top |
|
|
mizai
Joined: 19 Nov 2007 Posts: 2
|
Posted: Sun Nov 25, 2007 10:13 am Post subject: |
|
|
I've found the problem: if you're using rebuild, remove -q and -rdynamic from export_dynamic in the [link] section of a profile. It seems that this was already posted here... |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
Squall
Joined: 22 Oct 2007 Posts: 24
|
Posted: Mon Nov 26, 2007 8:59 am Post subject: |
|
|
This makes it a patch destined for the dsss project then? |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Mon Nov 26, 2007 8:12 pm Post subject: |
|
|
I doubt Gregor would change the default rebuild configuration, since the config files can be edited by hand. There's really nothing to patch. I assume this problem doesn't crop up very often and could be related to the nature of Derelict. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
JarrettBillingsley
Joined: 20 Jun 2006 Posts: 457 Location: Pennsylvania!
|
Posted: Mon Dec 03, 2007 2:28 pm Post subject: |
|
|
Yay it works! |
|
Back to top |
|
|
|