Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote: [...] Hi, I checked it out. There is only a dmd.conf. I've included it below. [...] Strange, I have exactly the same copy of dmd.conf, and I didn't see a problem. I copy-n-pasted your code into the same filename, etc.. What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is incompatible with older versions of libc6? T Hi, I was wondering why D doesn't just install everthing in one directory (ie; /opt/dlang) and look at an environment variable (ie; DLANG_ROOT) to source everything. It seems like it would make things a lot simpler. Then the package could be located anywhere and multiple versions could be used safely. Quite a few other languages have used this approach successfully. Anyway, just a thought. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote: [...] Hi, I checked it out. There is only a dmd.conf. I've included it below. [...] Strange, I have exactly the same copy of dmd.conf, and I didn't see a problem. I copy-n-pasted your code into the same filename, etc.. What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is incompatible with older versions of libc6? T Hi, I was wondering why D doesn't just install everthing in one directory (ie; /opt/dlang) and look at an environment variable (ie; DLANG_ROOT) to source everything. It seems like it would make things a lot simpler. Then the package could be located anywhere and multiple versions could be used safely. Quite a few other languages have used this approach successfully. Anyway, just a thought. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 06:20:52 UTC, Ali Çehreli wrote: On 10/14/2012 11:09 PM, Gerry Weaver wrote: I was wondering why D doesn't just install everthing in one directory (ie; /opt/dlang) The .zip version works that way. (At least it used to.) Just unzip in any directory: http://dlang.org/download.html and look at an environment variable (ie; DLANG_ROOT) to source everything. You don't even need to do that. The binary detects where it is started from and finds the modules and libraries relative to its path. Ali Hi, I removed the dmd package and downloaded the .zip. I checked for any files that were left behind when the package was removed and they are gone. I then ran dmd from the zip package, but I get the same result. It would seem that dmd does not work on this particular distribution. Thanks, -G Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 06:47:06 UTC, Jonathan M Davis wrote: On Sunday, October 14, 2012 23:40:41 H. S. Teoh wrote: Funny, as soon as I said that, I manage to reproduce the same error messages (though I can't say if it's exactly the problem you're seeing) by compiling a file that doesn't define main(). In this case, I had a hello.d with main() renamed to Main(): Yes. The error message that he's getting is essentially the one that you get when you don't define main, which is weird, because he _is_ defining main. But I don't know if it's exactly the same or not. A detailed comparison of the error messages that he's seeing and those that you get from not defining main on a machine that works would be required to see whether it's exactly the same message or not. I'm surprised that you didn't recognize the errors immediately. I guess that you haven't missed main very often (I'm used to it primarily from forgetting main when throwing together quick test scripts). But I'm totally stumped as to why he'd be getting them, since he does appear to be declaring main correctly. - Jonathan M Davis Hi, I decided to install the same distribution in a vm. This time instead of installing the .deb package, I went with the zip. Everything seems to be working! I can compile a non-trivial example just fine. I guess I'll definitely be using the zip from now on. Anyway, I also tried the zip version on Mac and Windoze. They both built the same code successfully. This is great! I can finally try out all of those great language features I've been reading about. Thanks to everyone for pushing me down the rabbit hole far enough this time to get some payback ;-) It's on now! Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 07:12:03 UTC, Iain Buclaw wrote: On 15 October 2012 04:10, Gerry Weaver ger...@compvia.com wrote: Hello All, I have been looking at D off and on for several years. Initially I worked through a very painful experience to get D compiling on Linux. After that experience, I concluded that I should wait for it to become more mature. Since then, I do a very simple test. I install the latest package and try to build Hello World. I figure that if Hello World builds successfully, I will continue further. I have just downloaded the latest .deb package and installed it on Ubuntu 12.04 32bit. Once again it fails this incredibly simple test. I've read many discussions about how/why, has/hasn't, will/won't D hit the mainstream in programming languages. I think this situation may offer at least one data point. I'm struggling to think of any other language (and I use several) that won't build code out of the box. D seems to have a lot of potential, but this needs to be fixed. I am not asking for help on this. I honestly don't care what the solution is. I just wanted the D developers to know why at least one developer is not using the language. I sincerely hope that the situation will improve. I'm looking forward to programming in D. Thanks for your time, -G Here is the code: import std.stdio; void main() { writeln(Hello, world!); } Here is the command: dmd hello.d Here is the output: /usr/lib/i386-linux-gnu/libphobos2.a(dmain2_459_1a5.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv': src/rt/dmain2.d:(.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to `_Dmain' /usr/lib/i386-linux-gnu/libphobos2.a(thread_18f_1b8.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_19f_6e4.o): In function `thread_attachThis': src/core/thread.d:(.text.thread_attachThis+0xb7): undefined reference to `_tlsstart' src/core/thread.d:(.text.thread_attachThis+0xbc): undefined reference to `_tlsend' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17d_1b8.o): In function `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17e_1b8.o): In function `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(deh2_43b_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable': src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x4): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xc): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x13): undefined reference to `_deh_end' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x36): undefined reference to `_deh_end' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17a_713.o): In function `thread_entryPoint': src/core/thread.d:(.text.thread_entryPoint+0x64): undefined reference to `_tlsend' src/core/thread.d:(.text.thread_entryPoint+0x6a): undefined reference to `_tlsstart' collect2: ld returned 1 exit status --- errorlevel 1 Try and paste the output of the following: dmd -c hello.d objdump -d hello.o Regards Hi, Here you go. hello.o: file format elf32-i386 Disassembly of section .text: .text: 0: b8 10 00 00 00 mov$0x10,%eax 5: b9 00 00 00 00 mov$0x0,%ecx a: 8b 11 mov(%ecx),%edx c: 89 10 mov%edx,(%eax) e: 89 01 mov%eax,(%ecx) 10: c3 ret Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 07:12:03 UTC, Iain Buclaw wrote: On 15 October 2012 04:10, Gerry Weaver ger...@compvia.com wrote: Hello All, I have been looking at D off and on for several years. Initially I worked through a very painful experience to get D compiling on Linux. After that experience, I concluded that I should wait for it to become more mature. Since then, I do a very simple test. I install the latest package and try to build Hello World. I figure that if Hello World builds successfully, I will continue further. I have just downloaded the latest .deb package and installed it on Ubuntu 12.04 32bit. Once again it fails this incredibly simple test. I've read many discussions about how/why, has/hasn't, will/won't D hit the mainstream in programming languages. I think this situation may offer at least one data point. I'm struggling to think of any other language (and I use several) that won't build code out of the box. D seems to have a lot of potential, but this needs to be fixed. I am not asking for help on this. I honestly don't care what the solution is. I just wanted the D developers to know why at least one developer is not using the language. I sincerely hope that the situation will improve. I'm looking forward to programming in D. Thanks for your time, -G Here is the code: import std.stdio; void main() { writeln(Hello, world!); } Here is the command: dmd hello.d Here is the output: /usr/lib/i386-linux-gnu/libphobos2.a(dmain2_459_1a5.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv': src/rt/dmain2.d:(.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to `_Dmain' /usr/lib/i386-linux-gnu/libphobos2.a(thread_18f_1b8.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_19f_6e4.o): In function `thread_attachThis': src/core/thread.d:(.text.thread_attachThis+0xb7): undefined reference to `_tlsstart' src/core/thread.d:(.text.thread_attachThis+0xbc): undefined reference to `_tlsend' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17d_1b8.o): In function `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17e_1b8.o): In function `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(deh2_43b_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable': src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x4): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xc): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x13): undefined reference to `_deh_end' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x36): undefined reference to `_deh_end' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17a_713.o): In function `thread_entryPoint': src/core/thread.d:(.text.thread_entryPoint+0x64): undefined reference to `_tlsend' src/core/thread.d:(.text.thread_entryPoint+0x6a): undefined reference to `_tlsstart' collect2: ld returned 1 exit status --- errorlevel 1 Try and paste the output of the following: dmd -c hello.d objdump -d hello.o Regards Hi, Here you go. hello.o: file format elf32-i386 Disassembly of section .text: .text: 0: b8 10 00 00 00 mov$0x10,%eax 5: b9 00 00 00 00 mov$0x0,%ecx a: 8b 11 mov(%ecx),%edx c: 89 10 mov%edx,(%eax) e: 89 01 mov%eax,(%ecx) 10: c3 ret Thanks, -G
Important packages
Hello All, Thanks again for helping me get going with D! I been looking around a little and noticed that there are packages for CMake, Qt, and there is vibe.d. If I would have realized the existence of these earlier, D would have been much higher on my list of things to check out in depth. Someone should make mention of these on the main D language web page. Some type of a package showcase with code snippets etc. They represent the possibility to build end to end cross-platform solutions with a great build tool to boot. I had no idea things had progressed this far. It makes a BIG difference. I would think this would go a long way to convince the casual browser to dig deeper. I was just thinking how interesting it would have been, if Google had decided to dedicate their considerable resources to D, instead of rolling their own language. Then again, it looks like D is ready for some serious development. When I think about the latest C++ abomination, the timing couldn't be better. I'm going to be dedicating some time to get up to speed. Many thanks to those that put in the hard work to get D to this point. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 17:36:10 UTC, Ali Çehreli wrote: On 10/15/2012 06:22 AM, Iain Buclaw wrote: On 15 October 2012 08:23, Gerry Weaverger...@compvia.com wrote: Disassembly of section .text: .text: 0: b8 10 00 00 00 mov$0x10,%eax 5: b9 00 00 00 00 mov$0x0,%ecx a: 8b 11 mov(%ecx),%edx c: 89 10 mov%edx,(%eax) e: 89 01 mov%eax,(%ecx) 10: c3 ret Thanks, -G That looks to me as if hello.d is an empty file. That is the most plausible reason so far: The OP has an empty file in the current directory but the hello.d that is being edited in Emacs is elsewhere. :) Ali Hi, I have been looking into this. I'm afraid it isn't that simple. I just created the file with vi in the same directory I was trying to compile it in. I can cat it etc., so I know the text is there. I have even reproduced the issue on a different partition etc.. I'm starting to think that some other package that is installed on this particular system may be the source of the problem. I can't reproduce the issue on another install of the same OS, version, etc.. I went ahead and installed the .deb package on the new system and it still works. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 18:03:10 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 07:51:59PM +0200, Gerry Weaver wrote: On Monday, 15 October 2012 at 17:36:10 UTC, Ali Çehreli wrote: [...] That is the most plausible reason so far: The OP has an empty file in the current directory but the hello.d that is being edited in Emacs is elsewhere. :) Ali Hi, I have been looking into this. I'm afraid it isn't that simple. I just created the file with vi in the same directory I was trying to compile it in. I can cat it etc., so I know the text is there. I have even reproduced the issue on a different partition etc.. I'm starting to think that some other package that is installed on this particular system may be the source of the problem. I can't reproduce the issue on another install of the same OS, version, etc.. I went ahead and installed the .deb package on the new system and it still works. [...] Yeah, it seems to be a very system-specific problem. I'd like to get to bottom of it if I could, as it piques my curiosity (plus it would be nice to prevent somebody else from running into the same problem in the future), but then I don't really want to waste your time hunting down an obscure problem if you already have a working dmd by some other means. T Hi, It just occurred to me that I've seen this type of file issue before. If memory serves, it was related to the attempt to load a 64bit lib on a 32bit system. It was an odd problem, because it didn't fail in the way one would expect. The process in that case was reading garbage from memory. I don't get how it could be reading nothing though. Anyway, I'm going to look into this possibility. I found some notes that I made during that time and it does have a similar feel to it. I'll let y'all know what I find. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 18:46:22 UTC, Gerry Weaver wrote: On Monday, 15 October 2012 at 18:03:10 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 07:51:59PM +0200, Gerry Weaver wrote: On Monday, 15 October 2012 at 17:36:10 UTC, Ali Çehreli wrote: [...] That is the most plausible reason so far: The OP has an empty file in the current directory but the hello.d that is being edited in Emacs is elsewhere. :) Ali Hi, I have been looking into this. I'm afraid it isn't that simple. I just created the file with vi in the same directory I was trying to compile it in. I can cat it etc., so I know the text is there. I have even reproduced the issue on a different partition etc.. I'm starting to think that some other package that is installed on this particular system may be the source of the problem. I can't reproduce the issue on another install of the same OS, version, etc.. I went ahead and installed the .deb package on the new system and it still works. [...] Yeah, it seems to be a very system-specific problem. I'd like to get to bottom of it if I could, as it piques my curiosity (plus it would be nice to prevent somebody else from running into the same problem in the future), but then I don't really want to waste your time hunting down an obscure problem if you already have a working dmd by some other means. T Hi, It just occurred to me that I've seen this type of file issue before. If memory serves, it was related to the attempt to load a 64bit lib on a 32bit system. It was an odd problem, because it didn't fail in the way one would expect. The process in that case was reading garbage from memory. I don't get how it could be reading nothing though. Anyway, I'm going to look into this possibility. I found some notes that I made during that time and it does have a similar feel to it. I'll let y'all know what I find. Thanks, -G Hmm.. It doesn't seem likely that these problems are related. The issue I remembered involved a series of program errors that started with the improper handling of a dlopen. It is almost impossible that dmd could be reproducing this situation. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote: [...] It just occurred to me that I've seen this type of file issue before. If memory serves, it was related to the attempt to load a 64bit lib on a 32bit system. It was an odd problem, because it didn't fail in the way one would expect. The process in that case was reading garbage from memory. I don't get how it could be reading nothing though. Anyway, I'm going to look into this possibility. I found some notes that I made during that time and it does have a similar feel to it. I'll let y'all know what I find. [...] Now, that does sound like it could be the source of the problem. If dmd was reading garbage from the file, if there just happens to be, say, a binary 0 at the beginning (or whatever it is that causes dmd to think it has reached EOF), then it would just stop and produce an empty object file. So the linker will fail to find the symbols that dmd emits when it encounters main(). T Hi, When running dmd, none of the read (and friends) syscalls happen as far as the kernel is concerned. This would lend some credibility to the lib theory. However, it's quite odd that results are the same for each time dmd is executed. I would expect a random result or even a segfault/abort on different runs. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 20:19:22 UTC, Gerry Weaver wrote: On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote: [...] It just occurred to me that I've seen this type of file issue before. If memory serves, it was related to the attempt to load a 64bit lib on a 32bit system. It was an odd problem, because it didn't fail in the way one would expect. The process in that case was reading garbage from memory. I don't get how it could be reading nothing though. Anyway, I'm going to look into this possibility. I found some notes that I made during that time and it does have a similar feel to it. I'll let y'all know what I find. [...] Now, that does sound like it could be the source of the problem. If dmd was reading garbage from the file, if there just happens to be, say, a binary 0 at the beginning (or whatever it is that causes dmd to think it has reached EOF), then it would just stop and produce an empty object file. So the linker will fail to find the symbols that dmd emits when it encounters main(). T Hi, When running dmd, none of the read (and friends) syscalls happen as far as the kernel is concerned. This would lend some credibility to the lib theory. However, it's quite odd that results are the same for each time dmd is executed. I would expect a random result or even a segfault/abort on different runs. Thanks, -G Hi, I think I have satisfied myself that this is probably a fluke. We have captured enough in this thread that there will be a good starting point should the issue ever come up again. It may sound odd, but I'm actually glad it happened. It helped me realize an issue with a system that would probably have manifested itself in some other frustrating and embarrassing way later on ;-) Thanks everyone, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 20:45:39 UTC, Gerry Weaver wrote: On Monday, 15 October 2012 at 20:19:22 UTC, Gerry Weaver wrote: On Monday, 15 October 2012 at 19:38:24 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 08:46:21PM +0200, Gerry Weaver wrote: [...] It just occurred to me that I've seen this type of file issue before. If memory serves, it was related to the attempt to load a 64bit lib on a 32bit system. It was an odd problem, because it didn't fail in the way one would expect. The process in that case was reading garbage from memory. I don't get how it could be reading nothing though. Anyway, I'm going to look into this possibility. I found some notes that I made during that time and it does have a similar feel to it. I'll let y'all know what I find. [...] Now, that does sound like it could be the source of the problem. If dmd was reading garbage from the file, if there just happens to be, say, a binary 0 at the beginning (or whatever it is that causes dmd to think it has reached EOF), then it would just stop and produce an empty object file. So the linker will fail to find the symbols that dmd emits when it encounters main(). T Hi, When running dmd, none of the read (and friends) syscalls happen as far as the kernel is concerned. This would lend some credibility to the lib theory. However, it's quite odd that results are the same for each time dmd is executed. I would expect a random result or even a segfault/abort on different runs. Thanks, -G Hi, I think I have satisfied myself that this is probably a fluke. We have captured enough in this thread that there will be a good starting point should the issue ever come up again. It may sound odd, but I'm actually glad it happened. It helped me realize an issue with a system that would probably have manifested itself in some other frustrating and embarrassing way later on ;-) Thanks everyone, -G Hi, Sorry, I neglected to mention something. I did a test with a zero length file and compared the output to the problem case. The output was, in fact, identical. Would it be difficult to do a simple test for zero length files and output a message like error: zero length/empty file filename? The output in this case is fairly misleading. Thanks, -G
D seems interesting, but...
Hello All, I have been looking at D off and on for several years. Initially I worked through a very painful experience to get D compiling on Linux. After that experience, I concluded that I should wait for it to become more mature. Since then, I do a very simple test. I install the latest package and try to build Hello World. I figure that if Hello World builds successfully, I will continue further. I have just downloaded the latest .deb package and installed it on Ubuntu 12.04 32bit. Once again it fails this incredibly simple test. I've read many discussions about how/why, has/hasn't, will/won't D hit the mainstream in programming languages. I think this situation may offer at least one data point. I'm struggling to think of any other language (and I use several) that won't build code out of the box. D seems to have a lot of potential, but this needs to be fixed. I am not asking for help on this. I honestly don't care what the solution is. I just wanted the D developers to know why at least one developer is not using the language. I sincerely hope that the situation will improve. I'm looking forward to programming in D. Thanks for your time, -G Here is the code: import std.stdio; void main() { writeln(Hello, world!); } Here is the command: dmd hello.d Here is the output: /usr/lib/i386-linux-gnu/libphobos2.a(dmain2_459_1a5.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv': src/rt/dmain2.d:(.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to `_Dmain' /usr/lib/i386-linux-gnu/libphobos2.a(thread_18f_1b8.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_19f_6e4.o): In function `thread_attachThis': src/core/thread.d:(.text.thread_attachThis+0xb7): undefined reference to `_tlsstart' src/core/thread.d:(.text.thread_attachThis+0xbc): undefined reference to `_tlsend' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17d_1b8.o): In function `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17e_1b8.o): In function `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(deh2_43b_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable': src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x4): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xc): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x13): undefined reference to `_deh_end' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x36): undefined reference to `_deh_end' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17a_713.o): In function `thread_entryPoint': src/core/thread.d:(.text.thread_entryPoint+0x64): undefined reference to `_tlsend' src/core/thread.d:(.text.thread_entryPoint+0x6a): undefined reference to `_tlsstart' collect2: ld returned 1 exit status --- errorlevel 1
Re: D seems interesting, but...
On Monday, 15 October 2012 at 04:20:04 UTC, Alex Rønne Petersen wrote: On 15-10-2012 05:10, Gerry Weaver wrote: Hello All, I have been looking at D off and on for several years. Initially I worked through a very painful experience to get D compiling on Linux. After that experience, I concluded that I should wait for it to become more mature. Since then, I do a very simple test. I install the latest package and try to build Hello World. I figure that if Hello World builds successfully, I will continue further. I have just downloaded the latest .deb package and installed it on Ubuntu 12.04 32bit. Once again it fails this incredibly simple test. I've read many discussions about how/why, has/hasn't, will/won't D hit the mainstream in programming languages. I think this situation may offer at least one data point. I'm struggling to think of any other language (and I use several) that won't build code out of the box. D seems to have a lot of potential, but this needs to be fixed. I am not asking for help on this. I honestly don't care what the solution is. I just wanted the D developers to know why at least one developer is not using the language. I sincerely hope that the situation will improve. I'm looking forward to programming in D. Thanks for your time, -G Here is the code: import std.stdio; void main() { writeln(Hello, world!); } Here is the command: dmd hello.d Here is the output: /usr/lib/i386-linux-gnu/libphobos2.a(dmain2_459_1a5.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv': src/rt/dmain2.d:(.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to `_Dmain' /usr/lib/i386-linux-gnu/libphobos2.a(thread_18f_1b8.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_19f_6e4.o): In function `thread_attachThis': src/core/thread.d:(.text.thread_attachThis+0xb7): undefined reference to `_tlsstart' src/core/thread.d:(.text.thread_attachThis+0xbc): undefined reference to `_tlsend' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17d_1b8.o): In function `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17e_1b8.o): In function `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(deh2_43b_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable': src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x4): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xc): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x13): undefined reference to `_deh_end' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x36): undefined reference to `_deh_end' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17a_713.o): In function `thread_entryPoint': src/core/thread.d:(.text.thread_entryPoint+0x64): undefined reference to `_tlsend' src/core/thread.d:(.text.thread_entryPoint+0x6a): undefined reference to `_tlsstart' collect2: ld returned 1 exit status --- errorlevel 1 I really don't know what to tell you, because: $ dmd -m32 test.d $ dmd -m64 test.d $ cat test.d import std.stdio; void main() { writeln(Hello, world!); } It Works For Me (TM). What package (URL please) did you install? Hi, I downloaded the package from dlang.org. The package was dmd_2.060-0_i386.deb. The install went fine. I have to admit that I was surprised there were issues this time around. Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 04:34:10 UTC, Alex Rønne Petersen wrote: On 15-10-2012 06:31, Gerry Weaver wrote: On Monday, 15 October 2012 at 04:20:04 UTC, Alex Rønne Petersen wrote: On 15-10-2012 05:10, Gerry Weaver wrote: Hello All, I have been looking at D off and on for several years. Initially I worked through a very painful experience to get D compiling on Linux. After that experience, I concluded that I should wait for it to become more mature. Since then, I do a very simple test. I install the latest package and try to build Hello World. I figure that if Hello World builds successfully, I will continue further. I have just downloaded the latest .deb package and installed it on Ubuntu 12.04 32bit. Once again it fails this incredibly simple test. I've read many discussions about how/why, has/hasn't, will/won't D hit the mainstream in programming languages. I think this situation may offer at least one data point. I'm struggling to think of any other language (and I use several) that won't build code out of the box. D seems to have a lot of potential, but this needs to be fixed. I am not asking for help on this. I honestly don't care what the solution is. I just wanted the D developers to know why at least one developer is not using the language. I sincerely hope that the situation will improve. I'm looking forward to programming in D. Thanks for your time, -G Here is the code: import std.stdio; void main() { writeln(Hello, world!); } Here is the command: dmd hello.d Here is the output: /usr/lib/i386-linux-gnu/libphobos2.a(dmain2_459_1a5.o): In function `_D2rt6dmain24mainUiPPaZi7runMainMFZv': src/rt/dmain2.d:(.text._D2rt6dmain24mainUiPPaZi7runMainMFZv+0x10): undefined reference to `_Dmain' /usr/lib/i386-linux-gnu/libphobos2.a(thread_18f_1b8.o): In function `_D4core6thread6Thread6__ctorMFZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFZC4core6thread6Thread+0x24): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_19f_6e4.o): In function `thread_attachThis': src/core/thread.d:(.text.thread_attachThis+0xb7): undefined reference to `_tlsstart' src/core/thread.d:(.text.thread_attachThis+0xbc): undefined reference to `_tlsend' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17d_1b8.o): In function `_D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFPFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17e_1b8.o): In function `_D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread': src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x1d): undefined reference to `_tlsend' src/core/thread.d:(.text._D4core6thread6Thread6__ctorMFDFZvkZC4core6thread6Thread+0x27): undefined reference to `_tlsstart' /usr/lib/i386-linux-gnu/libphobos2.a(deh2_43b_525.o): In function `_D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable': src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x4): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0xc): undefined reference to `_deh_beg' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x13): undefined reference to `_deh_end' src/rt/deh2.d:(.text._D2rt4deh213__eh_finddataFPvZPS2rt4deh29FuncTable+0x36): undefined reference to `_deh_end' /usr/lib/i386-linux-gnu/libphobos2.a(thread_17a_713.o): In function `thread_entryPoint': src/core/thread.d:(.text.thread_entryPoint+0x64): undefined reference to `_tlsend' src/core/thread.d:(.text.thread_entryPoint+0x6a): undefined reference to `_tlsstart' collect2: ld returned 1 exit status --- errorlevel 1 I really don't know what to tell you, because: $ dmd -m32 test.d $ dmd -m64 test.d $ cat test.d import std.stdio; void main() { writeln(Hello, world!); } It Works For Me (TM). What package (URL please) did you install? Hi, I downloaded the package from dlang.org. The package was dmd_2.060-0_i386.deb. The install went fine. I have to admit that I was surprised there were issues this time around. Thanks, -G Would you happen to have an i386 Ubuntu system I could SSH into and have a look or something? I'm on amd64 over here which works OK with the amd64 package on dlang.org. I suspect we generally have a relatively low 32-bit Linux user base these days... Hi, Unfortunately, I don't. This is a special dev system I setup for a customer project. They have several 32bit only apps that force the 32bit requirement. Actually, I would be using D on 64bit anyway. I just happened to be working on this particular system when I
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:05:17 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 06:45:16AM +0200, Gerry Weaver wrote: [...] Unfortunately, I don't. This is a special dev system I setup for a customer project. They have several 32bit only apps that force the 32bit requirement. Actually, I would be using D on 64bit anyway. I just happened to be working on this particular system when I decided to check out the latest D package. I will try the 64bit package. In the mean time, I would be more than happy to gather any information that would help. [...] Hmm. I just tested it on a 32-bit Debian system, using the package from the exact URL you gave, and I didn't see any problems. So I'm wondering if somehow dmd is picking up the wrong version of Phobos somehow, maybe a stale copy somewhere? Maybe a stale /etc/dmd.conf that pointed to the wrong version of the library? (Debian/Ubuntu packages generally do not overwrite modified configuration files upon installation -- so if there is an old dmd.conf there that has been modified in the past, it will have stayed unchanged when you installed the new dmd. Check if there's a file called /etc/dmd.conf.dpkg-new; if there is, rename it to /etc/dmd.conf and see if that fixes the problem.) T Hi, I checked it out. There is only a dmd.conf. I've included it below. ; ; dmd.conf file for dmd ; ; dmd will look for dmd.conf in the following sequence of directories: ; - current working directory ; - directory specified by the HOME environment variable ; - directory dmd resides in ; - /etc directory ; ; Names enclosed by %% are searched for in the existing environment and inserted ; ; The special name %@P% is replaced with the path to this file ; [Environment] DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib /i386-linux-gnu -L-L/usr/lib/x86_64-linux-gnu -L--no-warn-search-mismatch -L--ex port-dynamic Thanks, -G
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote: On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote: [...] Hi, I checked it out. There is only a dmd.conf. I've included it below. [...] Strange, I have exactly the same copy of dmd.conf, and I didn't see a problem. I copy-n-pasted your code into the same filename, etc.. What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is incompatible with older versions of libc6? T Hi, Here's what I've got. Package: libc6 Multi-Arch: same Priority: required Section: libs Installed-Size: 9125 Maintainer: Ubuntu Developers ubuntu-devel-disc...@lists.ubuntu.com Architecture: i386 Source: eglibc Version: 2.15-0ubuntu10.2 Replaces: belocs-locales-bin, libc6-i386 Provides: glibc-2.13-1, libc6-i686 Depends: libc-bin (= 2.15-0ubuntu10.2), libgcc1, tzdata Suggests: glibc-doc, debconf | debconf-2.0, locales Breaks: libhwloc0, liblouis0 ( 2.3.0-2), liblouisxml1 ( 2.4.0-2), nscd ( 2.15) Conflicts: belocs-locales-bin, libc6-i686, prelink ( 0.0.20090925), tzdata ( 2007k-1), tzdata-etch Filename: pool/main/e/eglibc/libc6_2.15-0ubuntu10_i386.deb Size: 3934936 MD5sum: 941333dcbfcc262636b89e6e387ebe18 Description: Embedded GNU C Library: Shared libraries Contains the standard libraries that are used by nearly all programs on the system. This package includes shared versions of the standard C library and the standard math library, as well as many others. Homepage: http://www.eglibc.org Original-Maintainer: GNU Libc Maintainers debian-gl...@lists.debian.org Thanks, -G