Re: Building DMD on SmartOS

2015-06-25 Thread Jason King via Digitalmars-d
It appears no syscall is generating EBADF. Does writeln call into libc's printf() function? That can return EBADF (bad file number) if the stream isn't enabled for writing. I didn't look too closely (work issues) at the D code, but I did notice the D libraries are trying to define the internal s

Re: Building DMD on SmartOS

2015-06-25 Thread flamencofantasy via Digitalmars-d
On Thursday, 25 June 2015 at 20:26:05 UTC, Jason King wrote: The first thing I would suggest running the program via truss and see if any calls to write() are returning EBADF.. If so, see what fd# is being passed (or if something is calling close() on fd1). On Thu, Jun 25, 2015 at 2:57 PM, fla

Re: Building DMD on SmartOS

2015-06-25 Thread Jason King via Digitalmars-d
The first thing I would suggest running the program via truss and see if any calls to write() are returning EBADF.. If so, see what fd# is being passed (or if something is calling close() on fd1). On Thu, Jun 25, 2015 at 2:57 PM, flamencofantasy via Digitalmars-d < digitalmars-d@puremagic.com> wro

Re: Building DMD on SmartOS

2015-06-25 Thread flamencofantasy via Digitalmars-d
On Sunday, 17 May 2015 at 19:36:54 UTC, Joakim wrote: On Tuesday, 5 May 2015 at 15:41:47 UTC, Joakim wrote: On Tuesday, 5 May 2015 at 05:42:33 UTC, Kai Nacke wrote: BTW: You can by-pass the Solaris ld by setting environment variable LD_ALTEXEC to the ld binary you want to use. Thanks for the

Re: Building DMD on SmartOS

2015-05-18 Thread Joakim via Digitalmars-d
On Tuesday, 5 May 2015 at 15:41:47 UTC, Joakim wrote: On Tuesday, 5 May 2015 at 05:42:33 UTC, Kai Nacke wrote: BTW: You can by-pass the Solaris ld by setting environment variable LD_ALTEXEC to the ld binary you want to use. Thanks for the tip: I set that to the binutils ld and got almost all

Re: Building DMD on SmartOS

2015-05-18 Thread Jason King via Digitalmars-d
The NaN and hex formatting are a matter of enabling C99 versions of *printf() functions. Normally the C compiler does this by linking in the appropriate /usr/lib/values-*.o file based on the desired compilation mode (ansi C, c89, c99, etc.) standards(5) goes into more detail on that. Passing 0 fo

Re: Building DMD on SmartOS

2015-05-05 Thread Joakim via Digitalmars-d
On Tuesday, 5 May 2015 at 05:42:33 UTC, Kai Nacke wrote: BTW: You can by-pass the Solaris ld by setting environment variable LD_ALTEXEC to the ld binary you want to use. Thanks for the tip: I set that to the binutils ld and got almost all of druntime's tests to pass with a 64-bit binary. I on

Re: Building DMD on SmartOS

2015-05-05 Thread Jason King via Digitalmars-d
It looks like std/file.d needs to be updated to not use the largefile definition on 64-bit mode. On Tue, May 5, 2015 at 9:18 AM, flamencofantasy via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > > > Thanks for the tip! > I pointed LD_ALTEXEC to the gnu ld like this; > LD_ALTEXEC=/opt/loca

Re: Building DMD on SmartOS

2015-05-05 Thread flamencofantasy via Digitalmars-d
Thanks for the tip! I pointed LD_ALTEXEC to the gnu ld like this; LD_ALTEXEC=/opt/local/x86_64-sun-solaris2.11/bin/ld Now I can compile and build and run a simple D program with no imports. I do get a link error but ld apparently auto corrects it; [root@smartmachine ~]# dmd hello.d /opt/loca

Re: Building DMD on SmartOS

2015-05-04 Thread Kai Nacke via Digitalmars-d
On Sunday, 3 May 2015 at 16:02:54 UTC, Joakim wrote: On Sunday, 3 May 2015 at 15:06:24 UTC, flamencofantasy wrote: Thanks everyone for spending the time on this! I followed the steps and I got to the same point, that is I have built DMD, druntime and phobos successfully but linking fails as p

Re: Building DMD on SmartOS

2015-05-03 Thread Jason King via Digitalmars-d
It's not broken, dmd is emitting an arguably invalid elf section. On Sun, May 3, 2015 at 12:34 PM, Joakim via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Sunday, 3 May 2015 at 16:02:54 UTC, Joakim wrote: > >> On Sunday, 3 May 2015 at 15:06:24 UTC, flamencofantasy wrote: >> >>> Thanks

Re: Building DMD on SmartOS

2015-05-03 Thread Joakim via Digitalmars-d
On Sunday, 3 May 2015 at 16:02:54 UTC, Joakim wrote: On Sunday, 3 May 2015 at 15:06:24 UTC, flamencofantasy wrote: Thanks everyone for spending the time on this! I followed the steps and I got to the same point, that is I have built DMD, druntime and phobos successfully but linking fails as p

Re: Building DMD on SmartOS

2015-05-03 Thread Jason King via Digitalmars-d
As I recall, the problem is the size of the segment (as created by DMD) is smaller sum of the sizes of the objects in it (which is by ld complains). You could try binutils, though usually the use of GNU ld on Illumos platforms is discouraged (as it tends to get lots of things wrong). You can use e

Re: Building DMD on SmartOS

2015-05-03 Thread Joakim via Digitalmars-d
On Sunday, 3 May 2015 at 15:06:24 UTC, flamencofantasy wrote: Thanks everyone for spending the time on this! I followed the steps and I got to the same point, that is I have built DMD, druntime and phobos successfully but linking fails as pointed out previously. My version of binutils is; bi

Re: Building DMD on SmartOS

2015-05-03 Thread flamencofantasy via Digitalmars-d
Thanks everyone for spending the time on this! I followed the steps and I got to the same point, that is I have built DMD, druntime and phobos successfully but linking fails as pointed out previously. My version of binutils is; binutils-2.24nb3;GNU binary utilities The latest version seems t

Re: Building DMD on SmartOS

2015-05-03 Thread Kai Nacke via Digitalmars-d
On Sunday, 3 May 2015 at 07:04:17 UTC, Joakim wrote: On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote: Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.o

Re: Building DMD on SmartOS

2015-05-03 Thread Joakim via Digitalmars-d
On Sunday, 3 May 2015 at 07:04:17 UTC, Joakim wrote: I'll finish building phobos and mess around a bit with fixing those sections. I'll let you know if I get it to work. Alright, increasing the RAM in my VM got phobos to build. However, linking sample files and the tests still fail because o

Re: Building DMD on SmartOS

2015-05-03 Thread Joakim via Digitalmars-d
On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote: Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.org/Building_DMD Unfortunately I get this error; [~/d

Re: Building DMD on SmartOS

2015-05-02 Thread Jason King via Digitalmars-d
Note that phobos hasn't been fully tested -- there's probably some fixes that'll need to happen in there. On Sat, May 2, 2015 at 1:14 AM, Daniel Murphy via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > "flamencofantasy" wrote in message > news:zhcduibirwprgbzqk...@forum.dlang.org... > >

Re: Building DMD on SmartOS

2015-05-01 Thread Daniel Murphy via Digitalmars-d
"flamencofantasy" wrote in message news:zhcduibirwprgbzqk...@forum.dlang.org... Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.org/Building_DMD Unfortunately I get t

Re: Building DMD on SmartOS

2015-05-01 Thread Joakim via Digitalmars-d
On Friday, 1 May 2015 at 20:58:57 UTC, Jens Bauer wrote: Would it work to first build GDC or LDC ? (I can build GDC on my PowerMac without having a D compiler already) If you can build either of those on a SmartOS host, why bother with dmd? I don't know if it would work, but I don't believe

Re: Building DMD on SmartOS

2015-05-01 Thread Jason King (Gmail) via Digitalmars-d
The last version in c++ should build. On May 1, 2015, at 3:58 PM, Jens Bauer via Digitalmars-d wrote: >>> On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote: >>> I would like to use D on SmartOS. > > SmartOS looks pretty interesting. [see docker.com] :) > {snip} > >>> Unfortun

Re: Building DMD on SmartOS

2015-05-01 Thread Jens Bauer via Digitalmars-d
On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote: I would like to use D on SmartOS. SmartOS looks pretty interesting. [see docker.com] :) {snip} Unfortunately I get this error; {snip} On Thursday, 30 April 2015 at 17:54:00 UTC, Joakim wrote: dmd git HEAD requires a host D

Re: Building DMD on SmartOS

2015-04-30 Thread Kai Nacke via Digitalmars-d
On Thursday, 30 April 2015 at 17:54:00 UTC, Joakim wrote: compiling that on SmartOS with just a C++ compiler. Of course, the Solaris support in dmd/druntime/phobos is not really tested, so you may need to fill in some gaps for SmartOS. I compiled dmd on OpenIndiana (Illumos based like SmartOS

Re: Building DMD on SmartOS

2015-04-30 Thread Joakim via Digitalmars-d
On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote: Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.org/Building_DMD Unfortunately I get this error; [~/d

Building DMD on SmartOS

2015-04-30 Thread flamencofantasy via Digitalmars-d
Hello, I would like to use D on SmartOS. Since there is no binary installer I tried to build DMD from source by following the instructions on this page; http://wiki.dlang.org/Building_DMD Unfortunately I get this error; [~/d/dmd/src]# make -f posix.mak MODEL=64 no cpu specified, assuming X8