View previous topic :: View next topic |
Author |
Message |
rti
Joined: 06 Feb 2007 Posts: 3
|
Posted: Tue Feb 06, 2007 8:28 pm Post subject: Build on Linux - derelict SDL and symbol already defined |
|
|
Hello.
I checked out the current svn (r19) and tried to compile the code on linux using bud. The first problem i ran into was in derelict/sdl/syswm.d.
I got the following error:
Code: | derelict/sdl/syswm.d:73: struct derelict.sdl.syswm.SDL_SysWMinfo conflicts with derelict.sdl.syswm.SDL_SysWMinfo at derelict/sdl/syswm.d:67
|
I changed:
Code: | version(linux)
{
struct SDL_SysWMmsg;
struct SDL_SysWMinfo;
}
version(Unix)
{
struct SDL_SysWMmsg;
struct SDL_SysWMinfo;
}
|
to:
Code: | version(linux)
{
struct SDL_SysWMmsg;
struct SDL_SysWMinfo;
}
// version(Unix)
// {
// struct SDL_SysWMmsg;
// struct SDL_SysWMinfo;
// }
|
This did the trick.
For the second problem i do not have a solution.
Code: | /tmp/ccUO20f8.s: Assembler messages:
/tmp/ccUO20f8.s:1015: Error: symbol `_D4yage6system6device6Device10getSupportFiZb1si' is already defined
/tmp/ccUO20f8.s:1021: Error: symbol `_D4yage6system6device6Device10getSupportFiZb1si' is already defined
|
Greping through the whole source gave me just one definition of getSupport(). So I am kinda lost here.
I am running: gdc (GCC) 4.0.3 (gdc 0.21, using dmd 1.00)
Any suggestions welcome
Bye, rti |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Feb 07, 2007 12:44 am Post subject: Re: Build on Linux - derelict SDL and symbol already defined |
|
|
rti wrote: | Hello.
I checked out the current svn (r19) and tried to compile the code on linux using bud. The first problem i ran into was in derelict/sdl/syswm.d.
I got the following error:
Code: | derelict/sdl/syswm.d:73: struct derelict.sdl.syswm.SDL_SysWMinfo conflicts with derelict.sdl.syswm.SDL_SysWMinfo at derelict/sdl/syswm.d:67
|
I changed:
Code: | version(linux)
{
struct SDL_SysWMmsg;
struct SDL_SysWMinfo;
}
version(Unix)
{
struct SDL_SysWMmsg;
struct SDL_SysWMinfo;
}
|
to:
Code: | version(linux)
{
struct SDL_SysWMmsg;
struct SDL_SysWMinfo;
}
// version(Unix)
// {
// struct SDL_SysWMmsg;
// struct SDL_SysWMinfo;
// }
|
This did the trick.
|
This because dmd defines version(linux) and Bud, seeing this also defines version(Unix). In other words, linux and Unix are the same things in Bud's eyes. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rti
Joined: 06 Feb 2007 Posts: 3
|
Posted: Wed Feb 07, 2007 7:11 am Post subject: |
|
|
Is there a way to combine those version statements? like:
Code: | version(linux || unix)
{
// foo
} |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Wed Feb 07, 2007 10:37 am Post subject: |
|
|
I'd never tried compiling yage via gdc, but I plan to make it work eventually. I'm not the best at resolving linking errors, and I don't know why gdc has trouble with that particular function. There's nothing that sets it apart from any of the others. Anyone else have ideas?
In the meantime, you should be able to use dmd on linux as a workaround. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Feb 07, 2007 2:03 pm Post subject: |
|
|
rti wrote: | Is there a way to combine those version statements? like:
Code: | version(linux || unix)
{
// foo
} |
|
Why would you want to? They are the same thing. It like coding ...
const int ZERO = 0;
if (foo == 0 || foo == ZERO) _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rti
Joined: 06 Feb 2007 Posts: 3
|
Posted: Thu Feb 08, 2007 5:38 am Post subject: |
|
|
Quote: | Why would you want to? They are the same thing. |
No, unix != linux.
Anyway. I think i will give dmd a try then.
Thanks for your answers. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Thu Feb 08, 2007 3:34 pm Post subject: |
|
|
You could also try removing that function and replace all calls to it with false, at the expense of better performance on higher end cards, but dmd`s probably the better option for now. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu Feb 08, 2007 7:09 pm Post subject: |
|
|
Actually, the DerelictSDL issue was fixed in Derelict a couple of weeks ago. Update to the latest trunk and all should be well. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Fri Feb 09, 2007 4:36 pm Post subject: |
|
|
Yage with the latest Derelict is now in the trunk. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Fri Feb 23, 2007 10:12 pm Post subject: |
|
|
I just tried building yage on windows via gdc and I also get the same linking error--it makes no sense. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
JoeCoder
Joined: 29 Oct 2005 Posts: 294
|
Posted: Tue Apr 10, 2007 6:35 pm Post subject: |
|
|
The gdc linking error was fixed in the latest commit. In Device.getSupport(), I was redeclaring a static variable with the same name multiple times inside different scopes. Dmd didn't have a problem with it but GDC did. I refactored and it worked. There's now some basic but buggy GDC support in buildme.d. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|