View previous topic :: View next topic |
Author |
Message |
stealthnsk
Joined: 09 May 2007 Posts: 5 Location: Russia, Novosibirsk
|
Posted: Wed May 09, 2007 10:10 am Post subject: Tango temporary unsupported? |
|
|
I've just downloaded the Derelict trunk and "buildme.d" file asserts "Tango support for the build script is currently incomplete."
As I understand, recent changes doesn't work with Tango and, probably, the support will be added later. Is there any timeframe for this?
P.S. I would offer my help, but I'm really a newby in D |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed May 09, 2007 10:50 am Post subject: |
|
|
Derelict supports Tango fine. The build script has problems, though. When you use Tango, it is recommended to compile your programs with a build tool like Bud or Rebuild. You can pass one source module to either of these tools and they will automatically compile and link every module you import. So you don't need to build the Derelict libraries beforehand. This is the way I recommend everyone us Derelict anyway, even when not using Tango. It's just so much easier and avoids some common problems that crop up from time to time.
But the real reason I have that assert in the build script is because I have never been successful at running any D module with DMD's -run option when using Tango. The buildme.d has support for Tango implemented, but I've been unable to even test it because of the linker errors I get. This is a long-standing issue to which there is not yet a resolution.
If you want to try it for yourself, just open up buildme.d, comment out the static assert on line 37, and run it. I just tried it again, using DMD on Windows with the latest Tango release candidate, and got several errors as always. It may work with GDC, or even with DMD on Linux, but I've never tried. On Windows at least, it doesn't. So if it does work for you, then by all means use it. But until it works consistently on all platforms and compilers, I won't be removing the assert from the script in the trunk. It's not a priority either, as I consider the build script a convenience. Use Bud or Rebuild and all should be fine. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
stealthnsk
Joined: 09 May 2007 Posts: 5 Location: Russia, Novosibirsk
|
Posted: Wed May 09, 2007 10:56 am Post subject: |
|
|
Hmmm...
In fact I was trying to compile the library to solve another problem. I got the following error compiling simple application with BUD:
Error 42: Symbol Undefined _D8derelict6opengl2gl10DerelictGL4loadFAaZv
OS: XP
Core Lib: Tango
I've googled for it and it's suggested to compile Derelict. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed May 09, 2007 11:26 am Post subject: |
|
|
I was going to tell you to try compiling buildme.d and see if that works for you. To test, I tried compiling it with Bud and it failed. So then I tried with Rebuild, and it succeeded. Unfortunately, I see now that I didn't actually finish implementing Tango support as I had thought. So even though the compile succeeds, the executable is useless.
I have a few of suggestions. One, try using Rebuild instead of Bud and see if that works for you. Rebuild usually succeeds where Bud fails. Two, use Phobos instead of Tango. Tango is a great library, well-designed, but there are still a lot of wrinkles to work around.
A third option is to, when compiling your application, toy around with some command line arguments to see if you can get Bud to work for you. For example, try passing -op. This usually isn't necessary on Windows, but considering the way Bud behaves with Tango, who knows what will help. You can also pass along -v for verbose DMD output and -V for verbose Bud output. These might give you some clues to what's going on.
If you insist on using Tango, probably the path of least resistance is the first suggestion. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
stealthnsk
Joined: 09 May 2007 Posts: 5 Location: Russia, Novosibirsk
|
Posted: Wed May 09, 2007 11:39 am Post subject: |
|
|
Thank you. I'll try. |
|
Back to top |
|
|
stealthnsk
Joined: 09 May 2007 Posts: 5 Location: Russia, Novosibirsk
|
Posted: Wed May 09, 2007 11:54 am Post subject: |
|
|
Thanks a lot! Rebuild works great. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Wed Jul 04, 2007 8:16 am Post subject: |
|
|
I have implemented the last bits of the buildme script for Tango, and afaics it works on Linux. I will attach my patch to a ticket when I've had it tested on Windows by a bloke.
Some caveats:
I use rebuild to build buildme, but using rebuild -exec seems to fail for some reason.
The buildme executable requires bud.
Another tidbit: DerelictODE isn't ported to Tango. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed Jul 04, 2007 7:14 pm Post subject: |
|
|
larsivi wrote: | I have implemented the last bits of the buildme script for Tango, and afaics it works on Linux. I will attach my patch to a ticket when I've had it tested on Windows by a bloke.
Some caveats:
I use rebuild to build buildme, but using rebuild -exec seems to fail for some reason.
The buildme executable requires bud.
|
Thanks, Lars, but... The idea of needing to compile the build script just bothers me. It's one extra step that shouldn't be required. But that's just me, I suppose. As far as requiring Bud to execute, that's easy to rectify. It won't be too much effort to add support for Rebuild. I'll get around to it eventually.
Quote: | Another tidbit: DerelictODE isn't ported to Tango. |
Thanks. I'll look into it. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
larsivi Site Admin
Joined: 27 Mar 2004 Posts: 453 Location: Trondheim, Norway
|
Posted: Thu Jul 05, 2007 1:16 am Post subject: |
|
|
Well, this guy wanted it, and I spent a few minutes on it, so why not? |
|
Back to top |
|
|
Zweistein
Joined: 21 Mar 2007 Posts: 19
|
Posted: Thu Jul 05, 2007 2:37 am Post subject: |
|
|
I think its not Problem to compile it. Why not? Trough the fact that some IDEs like Code::Blocks just run with DMD, because they use a 2 Step building (Compiling, Linking), i needed that LIbrarys builded for Tango... Else i could not use Tango/Derelict and Code::BLocks together!
So i would like if you add the changes from larsivi or add the changes you want. BEcause then, i can create a Movie Tutorial on how to use Tango together with Derelict on Code Blocks.
bye |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu Jul 05, 2007 5:25 am Post subject: |
|
|
OK, OK
Unfortunately, the problem with the delete command (mentioned in the ticket) is a blocker. I took the @ off to see if that made a difference, but it didn't. Also, since I have some Linux tools on my DOS box command line, I tried it with rm and it worked fine. So now to figure out why Process doesn't like del. Interestingly enough, del works fine when deleting libraries (i.e. buildme cleanlib).
One more issue is that Stdout.stream wouldn't compile. I kept getting the message that there was no such property. I guess this is something in the Tango trunk but not in the last release? _________________ 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: Fri Jul 06, 2007 1:53 am Post subject: |
|
|
aldacron wrote: | OK, OK
Unfortunately, the problem with the delete command (mentioned in the ticket) is a blocker. I took the @ off to see if that made a difference, but it didn't. Also, since I have some Linux tools on my DOS box command line, I tried it with rm and it worked fine. So now to figure out why Process doesn't like del. Interestingly enough, del works fine when deleting libraries (i.e. buildme cleanlib). |
As it turns out, del actually wasn't working fine when deleting libraries. It just wasn't giving me any errors. Anyway, I figured out the problem. 'del' is not a binary. It's a command which is built-in to cmd.exe. On Windows, 'system(blah)' just echoes blah to the console and the console does the right thing. But Tango's Process fails since it goes through the Win32 API, which expects an executable to be present for the new process to launch. That's what it looks like is happening, anyway. In the script, changing delCmd from '@del' to 'cmd /c del' works in both cases.
I've fixed an issue with DerelictILUT that was also causing it to fail to compile with Tango and I've started working on the DerelictODE issue. I've got to step away from the computer again right now, though. When I get back in a few hours, I'll wrap up DerelictODE, get the docs updated, and commit it all to the trunk. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
Zweistein
Joined: 21 Mar 2007 Posts: 19
|
Posted: Fri Jul 06, 2007 6:36 am Post subject: |
|
|
wondrful! Thanks so much! |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri Jul 06, 2007 10:39 am Post subject: |
|
|
In the trunk: larsivi's patch (modified), Tango fixes for DerelictILUT and DerelictODE, and updated build documentation. I also modified the Wiki a bit to reflect the new build script update. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|