www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Compile Tango for DMD2 - Any instructions how to do it?

reply TheDGuy <a.b gmail.com> writes:
Hi,

i am wondering if there are any instructions how to build tango 
with dmd2 on windows? I mean, if i take a look at this: 
http://dsource.org/projects/tango/wiki/WindowsInstall

"Automated Build and Install
This section is out of date.

Is there an installer at all?

Manually Build and Install
This is recommended for end users who are installing into an 
existing compiler, and for developers who wish to work on Tango 
itself.

This section is out of date.

???"

Doesn't look like this website is actually up to date?

I tried this:
https://github.com/SiegeLord/Tango-D2

But if i run:

bob.exe -vu .

i get:

"core.exception.AssertError .\build\src\bob.d(491): 
FileFilter.exclude: Path does not exist: tango/sys/win32"

even though the path is in the same directory. Do i have to add 
an environment variable or something? If so, how should i name it 
so the compiler finds it?

Greets
May 17 2016
next sibling parent reply TheDGuy <a.b gmail.com> writes:
Okay i now got a step further. If i type:
bob -vu C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port

a huge list of files comes down such as:

dmd -c -IC:\Users\Standardbenutzer\Downloads\Tango-D2-d2port 
-release -ofngo-core-Array-release.obj 
C:/Users/Standardbenutzer/Downloads/Tango-D2-d2port/tango/core/Array.d

But at the end i get this:

object.Exception .\build\src\bob.d(632): Process exited normally 
with return code 1
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(31): Error: undefined identifier 'uid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(31): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(43): Error: undefined identifier 'uid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(43): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(44): Error: undefined identifier 'pid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(48): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(49): Error: undefined identifier 'uid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(50): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(51): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(56): Error: undefined identifier 'pid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(57): Error: undefined identifier 'pid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(58): Error: undefined identifier 'pid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(59): Error: undefined identifier 'uid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(66): Error: undefined identifier 'ssize_t', did you mean alias
'size_t'?
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(67): Error: undefined identifier 'ssize_t', did you mean alias
'size_t'?
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(69): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(70): Error: undefined identifier 'uid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(71): Error: undefined identifier 'gid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(72): Error: undefined identifier 'pid_t'
C:\Users\Standardbenutzer\Downloads\Tango-D2-d2port\tango\stdc
posix\unistd.d(72): Error: undefined identifier 'pid_t'

If i take a look in the uninstd.d file it looks like the author 
already imported a file for these datatypes (line 14):
public import tango.stdc.posix.sys.types; // for size_t, ssize_t, 
uid_t, gid_t, off_t, pid_t, useconds_t

but it looks like it is still producing errors - why is that?
May 17 2016
parent reply TheDGuy <a.b gmail.com> writes:
Okay i now have several ".obj" files in 
"Tango-D2-d2port\build\bin\win32" but how can i merge them to a 
library?
Anyone here who knows that?
May 17 2016
parent reply Mike Parker <aldacron gmail.com> writes:
On Tuesday, 17 May 2016 at 21:49:28 UTC, TheDGuy wrote:
 Okay i now have several ".obj" files in 
 "Tango-D2-d2port\build\bin\win32" but how can i merge them to a 
 library?
 Anyone here who knows that?
Seigelord's port to D2 has a dub.json file, so you should be able to do this: cd Tango-D2-d2port dub build That should get your library.
May 17 2016
parent reply TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 03:15:25 UTC, Mike Parker wrote:
 That should get your library.
Thanks for your answer. I tried that on my windows console and i got the error that the command 'dub' can't be found. If i try: 'dub.json build' it just opens the dub.json file in my default .json program. The only reason i want to use Tango is that i would like to read and send data from/to a serial COM port and i don't want to mess around with importing C libraries.
May 18 2016
next sibling parent reply John Colvin <john.loughran.colvin gmail.com> writes:
On Wednesday, 18 May 2016 at 12:24:06 UTC, TheDGuy wrote:
 On Wednesday, 18 May 2016 at 03:15:25 UTC, Mike Parker wrote:
 That should get your library.
Thanks for your answer. I tried that on my windows console and i got the error that the command 'dub' can't be found.
http://code.dlang.org/download
May 18 2016
parent reply TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 12:25:47 UTC, John Colvin wrote:
 http://code.dlang.org/download
Okay, now i get this: Performing "debug" build using dmd for x86. tango ~master: building configuration "static"... tango\sys\win32\WsaSock.d(31,14): Warning: instead of C-style syntax, use D-style syntax 'char[WSADESCRIPTION_LEN + 1] szDescription' tango\sys\win32\WsaSock.d(32,14): Warning: instead of C-style syntax, use D-style syntax 'char[WSASYS_STATUS_LEN + 1] szSystemStatus' tango\stdc\posix\unistd.d(31,9): Error: undefined identifier 'uid_t' tango\stdc\posix\unistd.d(31,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(43,9): Error: undefined identifier 'uid_t' tango\stdc\posix\unistd.d(43,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(44,9): Error: undefined identifier 'pid_t' tango\stdc\posix\unistd.d(48,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(49,9): Error: undefined identifier 'uid_t' tango\stdc\posix\unistd.d(50,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(51,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(56,9): Error: undefined identifier 'pid_t' tango\stdc\posix\unistd.d(57,9): Error: undefined identifier 'pid_t' tango\stdc\posix\unistd.d(58,9): Error: undefined identifier 'pid_t' tango\stdc\posix\unistd.d(59,9): Error: undefined identifier 'uid_t' tango\stdc\posix\unistd.d(66,9): Error: undefined identifier 'ssize_t', did you mean alias 'size_t'? tango\stdc\posix\unistd.d(67,9): Error: undefined identifier 'ssize_t', did you mean alias 'size_t'? tango\stdc\posix\unistd.d(69,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(70,9): Error: undefined identifier 'uid_t' tango\stdc\posix\unistd.d(71,9): Error: undefined identifier 'gid_t' tango\stdc\posix\unistd.d(72,9): Error: undefined identifier 'pid_t' tango\stdc\posix\unistd.d(72,9): Error: undefined identifier 'pid_t' dmd failed with exit code 1.
May 18 2016
parent reply Jacob Carlborg <doob me.com> writes:
On 2016-05-18 14:32, TheDGuy wrote:

 Okay, now i get this:

 Performing "debug" build using dmd for x86.
 tango ~master: building configuration "static"...
 tango\sys\win32\WsaSock.d(31,14): Warning: instead of C-style syntax,
 use D-style syntax 'char[WSADESCRIPTION_LEN + 1] szDescription'
 tango\sys\win32\WsaSock.d(32,14): Warning: instead of C-style syntax,
 use D-style syntax 'char[WSASYS_STATUS_LEN + 1] szSystemStatus'
 tango\stdc\posix\unistd.d(31,9): Error: undefined identifier 'uid_t'
 dmd failed with exit code 1.
Everything in tango/stdc/posix should be ignored when compiling on Windows. Seems like this line isn't working [1], fore some reason. I think that the developers that are using Tango are mostly using Linux or Posix. [1] https://github.com/SiegeLord/Tango-D2/blob/d2port/dub.json#L32 -- /Jacob Carlborg
May 18 2016
next sibling parent reply TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 14:19:48 UTC, Jacob Carlborg wrote:
 Everything in tango/stdc/posix should be ignored when compiling 
 on Windows. Seems like this line isn't working [1], fore some 
 reason.
So what should i do? Delete the file?
May 18 2016
parent Jacob Carlborg <doob me.com> writes:
On 2016-05-18 16:44, TheDGuy wrote:

 So what should i do? Delete the file?
No, but try adding "version(Posix):" on top of the file. But there will be a lot of files to modify. -- /Jacob Carlborg
May 18 2016
prev sibling parent reply TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 14:19:48 UTC, Jacob Carlborg wrote:
 [1] 
 https://github.com/SiegeLord/Tango-D2/blob/d2port/dub.json#L32
How can i get that line working?
May 18 2016
next sibling parent reply Seb <seb wilzba.ch> writes:
On Wednesday, 18 May 2016 at 14:59:52 UTC, TheDGuy wrote:
 On Wednesday, 18 May 2016 at 14:19:48 UTC, Jacob Carlborg wrote:
 [1] 
 https://github.com/SiegeLord/Tango-D2/blob/d2port/dub.json#L32
How can i get that line working?
May I ask why you need to get tango working? It has been deprecated a long time ago and phobos (the standard library) or alternatively other packages on dub have a look of features :)
May 18 2016
next sibling parent TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 16:13:35 UTC, Seb wrote:
 On Wednesday, 18 May 2016 at 14:59:52 UTC, TheDGuy wrote:
 On Wednesday, 18 May 2016 at 14:19:48 UTC, Jacob Carlborg 
 wrote:
 [1] 
 https://github.com/SiegeLord/Tango-D2/blob/d2port/dub.json#L32
How can i get that line working?
May I ask why you need to get tango working? It has been deprecated a long time ago and phobos (the standard library) or alternatively other packages on dub have a look of features :)
Because the only result google gave me when i searched for "dlang serial read" was tango. If there is another library out there i don't know about and which can do serial communication as well i am looking forward to it.
May 18 2016
prev sibling next sibling parent reply TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 16:13:35 UTC, Seb wrote:
 May I ask why you need to get tango working? It has been 
 deprecated a long time ago and phobos (the standard library) or 
 alternatively other packages on dub have a look of features :)
Okay, it looks like 'onyx' is a library which handles serial communication in D. So tried to create a new project with DUB and add onyx as dependency but there are still some errors: http://pastebin.com/4eRBt6XX Any idea what i do wrong?
May 18 2016
parent reply Edwin van Leeuwen <edder tkwsping.nl> writes:
On Wednesday, 18 May 2016 at 16:37:48 UTC, TheDGuy wrote:
 On Wednesday, 18 May 2016 at 16:13:35 UTC, Seb wrote:
 May I ask why you need to get tango working? It has been 
 deprecated a long time ago and phobos (the standard library) 
 or alternatively other packages on dub have a look of features 
 :)
Okay, it looks like 'onyx' is a library which handles serial communication in D. So tried to create a new project with DUB and add onyx as dependency but there are still some errors: http://pastebin.com/4eRBt6XX Any idea what i do wrong?
The onyx README seems to suggest it only works for POSIX. Did you try serial-port by any chance: http://code.dlang.org/packages/serial-port That does mention Windows as supported. It is quite old though, the latest github activity is from a year ago.
May 18 2016
next sibling parent reply TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 19:49:04 UTC, Edwin van Leeuwen 
wrote:
 The onyx README seems to suggest it only works for POSIX. Did 
 you try serial-port by any chance:
 http://code.dlang.org/packages/serial-port

 That does mention Windows as supported. It is quite old though, 
 the latest github activity is from a year ago.
Thanks a lot for your answer. I built serial-port successfully with Dub but the only thing i got is a 'test.exe' and a 'test.obj' file. I don't see any library files even though: C:\Users\Standardbenutzer\Downloads\DUB>dub build Fetching serial-port 1.1.0 (getting selected version)... Placing serial-port 1.1.0 to C:\Users\Standardbenutzer\AppData\Roaming\dub\packages\... Performing "debug" build using dmd for x86. serial-port 1.1.0: building configuration "library"... test ~master: building configuration "application"... Linking... C:\Users\Standardbenutzer\Downloads\DUB>cd .dub C:\Users\Standardbenutzer\Downloads\DUB\.dub>cd build
May 18 2016
parent TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 20:41:13 UTC, TheDGuy wrote:
 C:\Users\Standardbenutzer\Downloads\DUB>dub build
 Fetching serial-port 1.1.0 (getting selected version)...
 Placing serial-port 1.1.0 to 
 C:\Users\Standardbenutzer\AppData\Roaming\dub\packages\...
 Performing "debug" build using dmd for x86.
 serial-port 1.1.0: building configuration "library"...
 test ~master: building configuration "application"...
 Linking...

 C:\Users\Standardbenutzer\Downloads\DUB>cd .dub

 C:\Users\Standardbenutzer\Downloads\DUB\.dub>cd build
Oh i am sorry, i see the link now where it was placed.
May 18 2016
prev sibling parent TheDGuy <a.b gmail.com> writes:
On Wednesday, 18 May 2016 at 19:49:04 UTC, Edwin van Leeuwen 
wrote:
 That does mention Windows as supported. It is quite old though, 
 the latest github activity is from a year ago.
Got it working, thanks a lot!
May 18 2016
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2016-05-18 18:13, Seb wrote:

 May I ask why you need to get tango working? It has been deprecated a
 long time ago and phobos (the standard library) or alternatively other
 packages on dub have a look of features :)
May I ask why you say it's deprecated? I use it in several projects and it works perfectly fine. I also have a project that works on Windows which uses Tango, although it's been a while since I compiled that on Windows. -- /Jacob Carlborg
May 18 2016
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2016-05-18 16:59, TheDGuy wrote:

 How can i get that line working?
I don't know, maybe a bug in Dub. Perhaps try a different version of Dub. -- /Jacob Carlborg
May 18 2016
prev sibling parent TheDGuy <a.b gmail.com> writes:
Oh it looks like Dub is a program i have to install ^^
May 18 2016
prev sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Tuesday, 17 May 2016 at 17:40:40 UTC, TheDGuy wrote:

 Manually Build and Install
 This is recommended for end users who are installing into an 
 existing compiler, and for developers who wish to work on Tango 
 itself.

 This section is out of date.

 ???"
All of dsource.org is outdated. It's a long dead site, maintained now only in read-only mode because it still has some stuff worth keeping around.
May 17 2016
parent Era Scarecrow <rtcvb32 yahoo.com> writes:
On Wednesday, 18 May 2016 at 03:13:18 UTC, Mike Parker wrote:
 All of dsource.org is outdated. It's a long dead site, 
 maintained now only in read-only mode because it still has some 
 stuff worth keeping around.
I remember trying to read through an in-depth manual to how to use Tango, and I felt it had an over-emphasis on templates without having/showing simple examples of how to use the libraries (or users not wanting to use templates). It eventually made me drop from trying to use any of the Tango library. Much like the Java documentation where I recall similar issues (but with java with some of the libraries I wanted to use, it was referencing abstract classes). Although it's been several years since I looked much into either of those very closely, and I can't recall exact examples to show what I mean.
May 17 2016