Thread overview | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
April 30, 2015 Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
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 X86 dmd idgen.d make: dmd: Command not found posix.mak:320: recipe for target 'idgen' failed make: *** [idgen] Error 127 Thanks! |
April 30, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to flamencofantasy | 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/dmd/src]# make -f posix.mak MODEL=64
>
> no cpu specified, assuming X86
> dmd idgen.d
> make: dmd: Command not found
> posix.mak:320: recipe for target 'idgen' failed
> make: *** [idgen] Error 127
dmd git HEAD requires a host D compiler to build dmd because it's moving files from C++ to D, ie the compiler is becoming self-hosted. This is a problem for new platforms like SmartOS, as dmd doesn't really support cross-compiling yet. However, you can roll back to the last release branch, 2.067, and try 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.
|
April 30, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | 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). The main issue was that binutils >= 2.20 were required otherwise the compiled application did not run.
Of course, ldc runs on Solaris, too.
Regards,
Kai
|
May 01, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | > 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 compiler to build dmd {snip} Would it work to first build GDC or LDC ? (I can build GDC on my PowerMac without having a D compiler already) |
May 01, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jens Bauer | The last version in c++ should build.
On May 1, 2015, at 3:58 PM, Jens Bauer via Digitalmars-d <digitalmars-d@puremagic.com> 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}
>
>>> 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 compiler to build dmd
> {snip}
>
> Would it work to first build GDC or LDC ?
> (I can build GDC on my PowerMac without having a D compiler already)
|
May 02, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jens Bauer | 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 it's been tested, so probably not.
|
May 02, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to flamencofantasy | "flamencofantasy" wrote in message news:zhcduibirwprgbzqkpvy@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 this error; > [~/d/dmd/src]# make -f posix.mak MODEL=64 > > no cpu specified, assuming X86 > dmd idgen.d > make: dmd: Command not found > posix.mak:320: recipe for target 'idgen' failed > make: *** [idgen] Error 127 > > Thanks! The last release (2.067) is the last one that can be build without a host D compiler. If you build 2.067 first, you should be able to use it to then build master. |
May 02, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy Attachments:
| 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:zhcduibirwprgbzqkpvy@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 this error;
>> [~/d/dmd/src]# make -f posix.mak MODEL=64
>>
>> no cpu specified, assuming X86
>> dmd idgen.d
>> make: dmd: Command not found
>> posix.mak:320: recipe for target 'idgen' failed
>> make: *** [idgen] Error 127
>>
>> Thanks!
>>
>
> The last release (2.067) is the last one that can be build without a host D compiler. If you build 2.067 first, you should be able to use it to then build master.
>
|
May 03, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to flamencofantasy | 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/dmd/src]# make -f posix.mak MODEL=64
>
> no cpu specified, assuming X86
> dmd idgen.d
> make: dmd: Command not found
> posix.mak:320: recipe for target 'idgen' failed
> make: *** [idgen] Error 127
I spent a couple hours and installed SmartOS in a VM, my first time ever messing with SmartOS though I've run and developed for Solaris before, to see what the status of building dmd is. While it was a pain getting SmartOS configured, I was finally able to build dmd 2.067 and druntime without a problem, using gcc 4.7 (the clang from pkgin tried to use some linker config that wouldn't work to link even basic test C++ files). Phobos now keeps failing to build on me, but only because I'm low on disk space and it keeps running out of swap.
However, linking a small sample file against druntime alone fails, some issue with the deh_beg/deh_end sections:
gcc sieve.o ./lib/libdruntime-solaris64.a -o sieve -m64 -lpthread -lm
ld: fatal: symbol '_deh_beg' in file sieve.o: section [15].deh_beg: size 0: symbol (address 0, size 0x4) lies outside of containing section
ld: fatal: symbol '_deh_end' in file sieve.o: section [17].deh_end: size 0: symbol (address 0, size 0x4) lies outside of containing section
ld: fatal: file processing errors. No output written to sieve
collect2: error: ld returned 1 exit status
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.
|
May 03, 2015 Re: Building DMD on SmartOS | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | 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 of that linker issue. Jason, it appears that you are familiar with the peculiar ELF linking issues: https://www.illumos.org/issues/308 I'm uninterested in digging into these ELF binary issues, so it's all yours, if you want it. I can verify any fix you come up with in this zone that's eating up a ton of disk space on my SSD. |
Copyright © 1999-2021 by the D Language Foundation