Building DMD on OpenBSD
Ryan
ryan at boggshome.net
Fri Dec 28 02:19:43 UTC 2018
On Friday, 28 December 2018 at 01:28:31 UTC, Seb wrote:
> On Wednesday, 26 December 2018 at 21:17:13 UTC, Ryan wrote:
>> On Tuesday, 18 July 2017 at 21:01:24 UTC, Anonymous wrote:
>>> On Tuesday, 18 July 2017 at 05:11:30 UTC, Kai Nacke wrote:
>>>> In master there is already some OpenBSD support. Some time
>>>> ago I worked on druntime support but I still need to finish
>>>> this. Mostly there is nothing magic here - just translating
>>>> the header files. The only non-obvious work is required for
>>>> the module/shared library stuff (in rt.sections). If there
>>>> is an OpenBSD expert around who can help here it would be
>>>> nice.
>>>
>>> Maybe talk to OpenBSD porters on their mailing list.
>>> I'll put my stuff on github as soon as I can.
>>
>> Sorry to drag up an old post but I am also interested in
>> getting dmd on openbsd as it is my OS for my main laptop at
>> home. Has there been any progress with this anywhere? If
>> not, I would like to give it a try. My experience with D is
>> currently limited but I have a decent understanding of the
>> OpenBSD build system (I am no expert but I have ported some
>> things to OpenBSD in the past).
>>
>> I did look around a bit but I could not find any (official)
>> instructions on how to build the bootstrap version to use to
>> build the latest version of dmd. Is it pretty much straight
>> forward or are there other considerations that I need to be
>> aware of?
>
> There's the dmd-cxx branch of DMD which was an attempt of
> back-porting Ian's GDC fixes to DMD. So essentially dmd-cxx is
> something like 2.076 (though without static foreach), but it
> doesn't pass the druntime nor Phobos testsuite (it might be
> enough to build DMD master).
>
> The last C++-only version of DMD is 2.068, but in the meantime
> a lot changed.
Hi Seb,
Thanks for the reply. My initial thought was to build two ports
for OpenBSD. One specifically to boot strap using version 2.068
and the other the actual port. golang is setup in a similar
fashion in OpenBSD ports today so I thought that structure would
work. Do you think it is possible to build the most recent
version of dmd using 2.068 as the boostrap? And what compiler
(and compiler version) should I use?
Also, i did some checking and I think that I can also use the
FreeBSD makefile as a starting point to get the bootstrapper
going since there are some similarities between the two systems.
Enough to see what it takes to build anyway.
>
> DragonflyBSD support for DMD and LDC has been added at the end
> of last year (see e.g. [1] or the respective GitHub PRs). I
> think the process should be relatively similar:
> - fixing/adding the bindings in druntime in LTS DMD or LDC,
> s.t. it can be compiled for DMD (you don't need Phobos to build
> DMD, though the build scripts might expect it as the testsuite
> partially requires it).
> - building the last LTS version
> - bootstrap yourself to master (you'll probably need to build
> sth. like 2.079 as an intermediate step)
> - build the latest master
I am expecting that I will need to do some patch work while
trying to port. My plan was to submit all of my patches during
this process as a pull request (or requests depending on the
patches) back to dlang for review and inclusion in future
releases. But, first thing is first....
>
> However, it might be possible to use LDC to cross-compile
> directly for OpenBSD and self yourself all this bootstrapping
> pain.
This could be a nice alternative, however LDC isn't in OpenBSD
ports today either. So either route I plan to take will require
bootstrapping work of some kind.
>
> Good luck and don't hesitate to ask for more help here, on IRC
> or GitHub.
>
> [1]:
> https://forum.dlang.org/post/elihnyflzlrtfavqyhth@forum.dlang.org
More information about the Digitalmars-d
mailing list