Building DMD on SmartOS

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Sun May 3 00:04:16 PDT 2015


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.


More information about the Digitalmars-d mailing list