Building DMD on OpenBSD

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 17 05:53:42 PDT 2017


On Sunday, July 16, 2017 19:00:32 Anonymous via Digitalmars-d wrote:
> I did some googling (well, duckduckgoing) and found a few posts
> on this forum indicating that this could work. So I gave it a try
> and followed https://wiki.dlang.org/Building_under_Posix
> The build failed because src/posix.mak in the dmd repo was trying
> to download
> http://downloads.dlang.org/releases/2.x/2.072.2/dmd.2.072.2.openbsd.tar.xz
> which doesn't exist. What do I do now?
>
> OTOH it's a good thing that the build failed. When I saw
> http:// instead of https:// in the console output I went to check
> what the makefile was doing and - wait for it - it was trying to
> download an executable from the internet and run it. I
> couldn't believe my eyes. I mean, you sure can use an
> unencrypted channel but then you need some kind of cryptographic
> signature to verify the downloaded file. I tried the above with
> 2.074.1 (the latest stable) but the trunk version has this too.

I'm pretty sure that druntime would need to be updated before you'd get much
of anywhere with OpenBSD. dmd _might_ work as-is, depending on what's
missing in druntime, but all of the various bindings would need to be
updated. grepping druntime, it does look like there are a number of version
blocks checking OpenBSD, but nowhere near as many as FreeBSD or linux. So,
to have the same level of functionality, I'd expect that more places would
need to be doing else version(OpenBSD) and doing the right thing for
OpenBSD, but I don't know how many would be required to get off the ground
so to speak. Clearly, someone put in some time and effort towards getting
OpenBSD working, but I have no idea how close they got. Most of the missing
bindings would probably be pretty close to what's in the FreeBSD version
blocks though. Most of the time, the tedium with getting the system bindings
set up for a new POSIX system is going over each section and making sure
that when it's created, the bindings match the new system. They're generally
_very_ close but slightly different - which is why they aren't just put
under version(Posix) and left at that.

- Jonathan M Davis



More information about the Digitalmars-d mailing list