<div dir="ltr">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 elfedit, or I think I have a patch that makes things happy around here somewhere I can try to dig up.<div><br></div><div>GDC should also probably work, though you'll need to apply the patches that everyone else does on any Solaris derived platforms (which for unknown reasons, the gcc folks have refused to accept for the past 10+ years).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 3, 2015 at 5:49 AM, Kai Nacke via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sunday, 3 May 2015 at 07:04:17 UTC, Joakim wrote:<br>
</span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thursday, 30 April 2015 at 17:39:02 UTC, flamencofantasy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I would like to use D on SmartOS.<br>
<br>
Since there is no binary installer I tried to build DMD from source by<br>
following the instructions on this page; <a href="http://wiki.dlang.org/Building_DMD" target="_blank">http://wiki.dlang.org/Building_DMD</a><br>
<br>
Unfortunately I get this error;<br>
[~/d/dmd/src]# make -f posix.mak MODEL=64<br>
<br>
no cpu specified, assuming X86<br>
dmd idgen.d<br>
make: dmd: Command not found<br>
posix.mak:320: recipe for target 'idgen' failed<br>
make: *** [idgen] Error 127<br>
</blockquote>
<br>
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.<br>
<br>
However, linking a small sample file against druntime alone fails, some issue with the deh_beg/deh_end sections:<br>
<br>
gcc sieve.o ./lib/libdruntime-solaris64.a -o sieve -m64 -lpthread -lm<br>
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<br>
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<br>
ld: fatal: file processing errors. No output written to sieve<br>
collect2: error: ld returned 1 exit status<br>
<br>
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.<br>
</blockquote>
<br></div></div>
I got the some error. You need a more recent binutils version.<br>
<br>
Regards,<br>
Kai<br>
</blockquote></div><br></div>