FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tango temporary unsupported?

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
stealthnsk



Joined: 09 May 2007
Posts: 5
Location: Russia, Novosibirsk

PostPosted: Wed May 09, 2007 10:10 am    Post subject: Tango temporary unsupported? Reply with quote

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 Sad
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed May 09, 2007 10:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
stealthnsk



Joined: 09 May 2007
Posts: 5
Location: Russia, Novosibirsk

PostPosted: Wed May 09, 2007 10:56 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed May 09, 2007 11:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
stealthnsk



Joined: 09 May 2007
Posts: 5
Location: Russia, Novosibirsk

PostPosted: Wed May 09, 2007 11:39 am    Post subject: Reply with quote

Thank you. I'll try.
Back to top
View user's profile Send private message
stealthnsk



Joined: 09 May 2007
Posts: 5
Location: Russia, Novosibirsk

PostPosted: Wed May 09, 2007 11:54 am    Post subject: Reply with quote

Thanks a lot! Rebuild works great.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed May 09, 2007 11:57 am    Post subject: Reply with quote

Good to hear.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Wed Jul 04, 2007 8:16 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Jul 04, 2007 7:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Thu Jul 05, 2007 1:16 am    Post subject: Reply with quote

Well, this guy wanted it, and I spent a few minutes on it, so why not? Smile
Back to top
View user's profile Send private message
Zweistein



Joined: 21 Mar 2007
Posts: 19

PostPosted: Thu Jul 05, 2007 2:37 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu Jul 05, 2007 5:25 am    Post subject: Reply with quote

OK, OK Smile

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
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Fri Jul 06, 2007 1:53 am    Post subject: Reply with quote

aldacron wrote:
OK, OK Smile

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
View user's profile Send private message Send e-mail
Zweistein



Joined: 21 Mar 2007
Posts: 19

PostPosted: Fri Jul 06, 2007 6:36 am    Post subject: Reply with quote

wondrful! Thanks so much!
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Fri Jul 06, 2007 10:39 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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