View previous topic :: View next topic |
Author |
Message |
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
michael
Joined: 23 Aug 2006 Posts: 13
|
Posted: Fri Oct 31, 2008 10:51 am Post subject: |
|
|
Hey.
I updated my GDC and Tango to the newest available versions. Then I also wanted to update my derelict, but I cannot compile it.
When it comes to the macinit directory, I get hundrets or thousands of errors, all like ('dsss net install derelict' gave same errors):
Code: | derelict/sdl/macinit/runtime.d:308: Error: identifier 'string' is not defined
derelict/sdl/macinit/runtime.d:308: Error: string is used as a type
derelict/sdl/macinit/runtime.d:308: Error: cannot have parameter of type void |
I use...
OS X: 10.5
GDC: gdc-trunk-r229-mac-10.5.dmg, DSSS included
Tango: 0.99.7
I tried compiling small tango apps directly with gdc and via DSSS, both work.
Help anyone? |
|
Back to top |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Fri Oct 31, 2008 2:24 pm Post subject: |
|
|
That looks strange, string is an alias to char[] in derelict.sdl.macinit.string so it should be available . I just tried with "dsss net install derelict" and it worked for me. The only problem I get is "ranlib: file: libDerelictSDL.a(derelict.sdl.macinit.string.o) has no symbols" but it works anyway. |
|
Back to top |
|
|
michael
Joined: 23 Aug 2006 Posts: 13
|
Posted: Fri Oct 31, 2008 4:13 pm Post subject: |
|
|
Hello doob,
in the file string.d I removed the version(Tango) stuff around the alias of string, so that it definitely gets aliased.
What I then get when compiling is:
Code: | Error: std.compat.string at /usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/d/4.0.1/std/compat.di:5 conflicts with derelict.sdl.macinit.string.string at derelict/sdl/macinit/string.d:53 |
But this compat.di doesn't actually exist.
Does this help you? |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Nov 01, 2008 5:40 am Post subject: |
|
|
doob wrote: | That looks strange, string is an alias to char[] in derelict.sdl.macinit.string so it should be available . I just tried with "dsss net install derelict" and it worked for me. The only problem I get is "ranlib: file: libDerelictSDL.a(derelict.sdl.macinit.string.o) has no symbols" but it works anyway. |
Did you do this just for D2 compatibility? If so, it doesn't really need to be there. Derelict isn't D2 compatible anyway. Derelict 2 will be, but at that point will only support SDL 1.3+, which won't require the Mac stuff anyway. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Nov 01, 2008 5:50 am Post subject: |
|
|
michael wrote: | Hello doob,
in the file string.d I removed the version(Tango) stuff around the alias of string, so that it definitely gets aliased.
What I then get when compiling is:
Code: | Error: std.compat.string at /usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/d/4.0.1/std/compat.di:5 conflicts with derelict.sdl.macinit.string.string at derelict/sdl/macinit/string.d:53 |
|
Based on this, it looks to me like either Tango or DSSS is improperly configured. Otherwise, the alias in the version(Tango) block would have been picked up and you wouldn't be getting the errors about compat.di when removing it.
Quote: |
But this compat.di doesn't actually exist. |
If /usr/include/d/4.0.1/std/compat.di didn't exist, you wouldn't be seeing this error. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Sat Nov 01, 2008 8:26 am Post subject: |
|
|
aldacron wrote: | doob wrote: | That looks strange, string is an alias to char[] in derelict.sdl.macinit.string so it should be available . I just tried with "dsss net install derelict" and it worked for me. The only problem I get is "ranlib: file: libDerelictSDL.a(derelict.sdl.macinit.string.o) has no symbols" but it works anyway. |
Did you do this just for D2 compatibility? If so, it doesn't really need to be there. Derelict isn't D2 compatible anyway. Derelict 2 will be, but at that point will only support SDL 1.3+, which won't require the Mac stuff anyway. |
No I just like to use "string" instead of "char[]", easier to type. But there is code for D2 compatibility for tango (the mixins) so I guess that code doesn't need to be there.
About the mac stuff do you know how they fixed this or do you have any link or something to a page about it? |
|
Back to top |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Sat Nov 01, 2008 8:37 am Post subject: |
|
|
michael wrote: | Hello doob,
in the file string.d I removed the version(Tango) stuff around the alias of string, so that it definitely gets aliased.
What I then get when compiling is:
Code: | Error: std.compat.string at /usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/d/4.0.1/std/compat.di:5 conflicts with derelict.sdl.macinit.string.string at derelict/sdl/macinit/string.d:53 |
But this compat.di doesn't actually exist.
Does this help you? |
You could try this code to see if the Tango version is set properly:
Code: | module main;
import tango.io.Stdout;
void main ()
{
version (Tango)
Stdout("Tango").newline;
else
Stdout("not tango").newline;
} |
std.compat is part of tangobos
Are you using the tango rebuild profile? Open /private/etc/rebuild/default (if think it's located in /private/etc) and change profile to gdc-posix-tango. Or build with dsss build -dc=gdc-posix-tango. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sun Nov 02, 2008 1:43 am Post subject: |
|
|
doob wrote: | About the mac stuff do you know how they fixed this or do you have any link or something to a page about it? |
One of the goals of 1.3 was to do away with SDL_main completely. Ryan Gordon posted an overview of planned features/changes a year or two ago. From it:
Quote: |
SDL_main:
- No longer required on any platform. Now it does what it was intended
for: hiding differences in main/WinMain/etc. Initialization details
are being moved into SDL_Init() where they belong. This makes it easier
to have SDL as a plugin, or use a non-SDL path without it hijacking your
mainline just to function. This is really useful for scripting languages,
since, say, a Python program might want to use SDL without linking SDL
directly to python.exe and replacing its main() function. |
_________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
michael
Joined: 23 Aug 2006 Posts: 13
|
Posted: Sun Nov 02, 2008 4:06 pm Post subject: |
|
|
aldacron wrote: | michael wrote: |
But this compat.di doesn't actually exist. |
If /usr/include/d/4.0.1/std/compat.di didn't exist, you wouldn't be seeing this error. |
That's what I would guess, too, but anyway: Code: | falke:~ michael$ ls /usr/include/d/4.0.1/std/compat.di
ls: /usr/include/d/4.0.1/std/compat.di: No such file or directory |
doob wrote: | You could try this code to see if the Tango version is set properly:
Code: | module main;
import tango.io.Stdout;
void main ()
{
version (Tango)
Stdout("Tango").newline;
else
Stdout("not tango").newline;
} |
std.compat is part of tangobos
Are you using the tango rebuild profile? Open /private/etc/rebuild/default (if think it's located in /private/etc) and change profile to gdc-posix-tango. Or build with dsss build -dc=gdc-posix-tango. |
Maybe something is messed up here.
Your example programm really printed "not Tango" after "rebuild main.d".
Then I looked for /private/etc/rebuild/ which exists, and in the file default the profile was gdc-posix, so the wrong one.
I changed it to gdc-posix-tango, but anyway it's still "not Tango".
The file gdc-posix-tango definitely includes the '-version Tango' option as compile flag, and I also tried adding it to the file gdc-posix -- doesn't change anything.
I also wrote some stuff like "foobar" into the file /private/etc/rebuild/default but rebuild doesn't complain.
Looks to me, as if rebuild doesn't use these files. In my home dir I couldn't find configuration files for rebuild.
Do you know a tool for OS X which shows which files an application opened while running? (rebuild exists too fast for the OS X Activity Monitor)
Or another idea maybe? |
|
Back to top |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Mon Nov 03, 2008 5:31 am Post subject: |
|
|
You can always add -version=Tango to the command line, "dsss build -version=Tango". And you can do a "locate rebuild" to see if rebuild is located somewhere else but I'm pretty sure it should be in "/private/etc/rebuild". BTW if you use dsss 0.78 change to 0.75, 0.78 can't build libraries. I think I'm running out of ideas. |
|
Back to top |
|
|
michael
Joined: 23 Aug 2006 Posts: 13
|
Posted: Mon Nov 03, 2008 5:58 am Post subject: |
|
|
Hello doob,
'locate rebuild' helped me. It showed that there are also config files in /usr/bin/rebuild.conf/, and those are the ones that rebuild really uses .
A weird place for putting config files I think, but whatever, it's working now.
Thanks alot for your help! |
|
Back to top |
|
|
doob
Joined: 06 Jan 2007 Posts: 367
|
Posted: Mon Nov 03, 2008 7:59 am Post subject: |
|
|
Weird, I don't have a /usr/bin/rebuild.conf file. I'm using dsss 0.75 downloaded from the dsss website.
Good to hear that the problem is solved, so derelict builds now? |
|
Back to top |
|
|
michael
Joined: 23 Aug 2006 Posts: 13
|
Posted: Mon Nov 03, 2008 8:58 am Post subject: |
|
|
Yup, derelict builds now.
I have dsss 0.75, too. But I cannot remember that I installed it on my own, maybe it came with the GDC or Tango installer or I just forgot.
And /usr/bin/rebuild.conf is not a file but a directory including all the other config files of rebuild. |
|
Back to top |
|
|
michael
Joined: 23 Aug 2006 Posts: 13
|
Posted: Thu Nov 13, 2008 1:25 pm Post subject: |
|
|
Hello, it's me again.
I got a problem again. Like I wrote I was able to compile derelict, but I didn't have the time to test it actually.
Today I tested it, but when I start the applications I compiled they crash.
Sample code:
Code: | module sdltest;
import tango.io.Stdout;
import derelict.sdl.sdl;
void main()
{
DerelictSDL.load();
if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
Stdout("error: SDL_Init").newline;
return;
}
}
|
App compiles without errors, when I start I get stuff like:
Quote: | 2008-11-13 20:14:59.270 sdltest[4729:10b] *** _NSAutoreleaseNoPool(): Object 0x1206e0 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x94715adf 0x946221f2 0x93c3a9e9 0x950558b8 0x95054239 0x950646d6 0x93c96e17 0x93c9501d 0x93c94d62 0x93c94711 0x93c94250 0x93c9224c 0x33945a 0x32ce5b 0x331e30 0x331e67 0x22af 0x1e33d 0x1dfc9 0x1e386 0x1dfc9 0x1e469 0x1dc00 0x2236)
2008-11-13 20:14:59.271 sdltest[4729:10b] *** _NSAutoreleaseNoPool(): Object 0x120b60 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x94715adf 0x946221f2 0x93c3aa21 0x950558b8 0x95054239 0x950646d6 0x93c96e17 0x93c9501d 0x93c94d62 0x93c94711 0x93c94250 0x93c9224c 0x33945a 0x32ce5b 0x331e30 0x331e67 0x22af 0x1e33d 0x1dfc9 0x1e386 0x1dfc9 0x1e469 0x1dc00 0x2236)
2008-11-13 20:14:59.272 sdltest[4729:10b] *** _NSAutoreleaseNoPool(): Object 0x1211c0 of class NSCFNumber autoreleased with no pool in place - just leaking
Stack: (0x94715adf 0x946221f2 0x93c3aa5b 0x950558b8 0x95054239 0x950646d6 0x93c96e17 0x93c9501d 0x93c94d62 0x93c94711 0x93c94250 0x93c9224c 0x33945a 0x32ce5b 0x331e30 0x331e67 0x22af 0x1e33d 0x1dfc9 0x1e386 0x1dfc9 0x1e469 0x1dc00 0x2236)
|
Any idea why? |
|
Back to top |
|
|
|