www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD on Haiku?

reply "Isak Andersson" <IcePapih lavabit.com> writes:
Hello D-folks!

I was just wondering if it would be possible to make DMD build 
out of the box for Haiku (haiku-os.org) with the source from the 
official DMD repo. Haiku is pretty darn POSIX compliant so the 
actual porting isn't much of a problem. DMD has ran on Haiku 
before a while ago and shouldn't have any problem doing it now. 
 From what I hear from the Haiku community it was just to add a 
bunch of ifeq Haiku and stuff to make it build and run fine.

What I want though is to get these things in to the main source 
of DMD, applying patches and stuff like that is a pain, it is so 
much better to just be able to clone and build without problems. 
So what I wanted to ask is: would Digital Mars accept a pull 
request to make DMD build on Haiku to their main branch on 
Github? I just wanted to know for sure before I go ahead and fork 
DMD to do this.

Cheers!
Oct 29 2012
next sibling parent reply Brad Roberts <braddr slice-2.puremagic.com> writes:
On Mon, 29 Oct 2012, Isak Andersson wrote:

 Hello D-folks!
 
 I was just wondering if it would be possible to make DMD build out of the box
 for Haiku (haiku-os.org) with the source from the official DMD repo. Haiku is
 pretty darn POSIX compliant so the actual porting isn't much of a problem. DMD
 has ran on Haiku before a while ago and shouldn't have any problem doing it
 now. From what I hear from the Haiku community it was just to add a bunch of
 ifeq Haiku and stuff to make it build and run fine.
 
 What I want though is to get these things in to the main source of DMD,
 applying patches and stuff like that is a pain, it is so much better to just
 be able to clone and build without problems. So what I wanted to ask is: would
 Digital Mars accept a pull request to make DMD build on Haiku to their main
 branch on Github? I just wanted to know for sure before I go ahead and fork
 DMD to do this.
 
 Cheers!
Is someone in the haiku community willing to step up and keep it working? Contribute a box to run an auto-tester client? Unless the answers to both of the above are 'yes', then it's just about guaranteed to break again at some point. IMHO, every platform that wants to be supported should meet that bar.
Oct 29 2012
parent reply "Isak Andersson" <IcePapih lavabit.com> writes:
On Monday, 29 October 2012 at 22:57:41 UTC, Brad Roberts wrote:
 On Mon, 29 Oct 2012, Isak Andersson wrote:

 Hello D-folks!
 
 I was just wondering if it would be possible to make DMD build 
 out of the box
 for Haiku (haiku-os.org) with the source from the official DMD 
 repo. Haiku is
 pretty darn POSIX compliant so the actual porting isn't much 
 of a problem. DMD
 has ran on Haiku before a while ago and shouldn't have any 
 problem doing it
 now. From what I hear from the Haiku community it was just to 
 add a bunch of
 ifeq Haiku and stuff to make it build and run fine.
 
 What I want though is to get these things in to the main 
 source of DMD,
 applying patches and stuff like that is a pain, it is so much 
 better to just
 be able to clone and build without problems. So what I wanted 
 to ask is: would
 Digital Mars accept a pull request to make DMD build on Haiku 
 to their main
 branch on Github? I just wanted to know for sure before I go 
 ahead and fork
 DMD to do this.
 
 Cheers!
Is someone in the haiku community willing to step up and keep it working? Contribute a box to run an auto-tester client? Unless the answers to both of the above are 'yes', then it's just about guaranteed to break again at some point. IMHO, every platform that wants to be supported should meet that bar.
Well, I would say that I am pretty willing to do both those things. At least if I have the knowledge to do it! I'm not a 100% clear on what the second requirement means. Having a box running 24/7 that can run automated tests at any time? Or just running the tests occationally (like once or twice a week or so, or even just in time for every new DMD release)?
Oct 29 2012
parent reply Brad Roberts <braddr puremagic.com> writes:
On 10/29/2012 4:27 PM, Isak Andersson wrote:
 Well, I would say that I am pretty willing to do both those things. At least
if I have the knowledge to do it! I'm not a
 100% clear on what the second requirement means. Having a box running 24/7
that can run automated tests at any time? Or
 just running the tests occationally (like once or twice a week or so, or even
just in time for every new DMD release)?
building all the time, just on-checkin) is the preference, but there's room for less frequent to be acceptable. It's pretty easy to setup the tester and it's pretty low maintenance. I'd prefer to have access to the account that runs it (or easiest just let me run it) to be able to update the tester code periodically. Later, Brad
Oct 29 2012
parent "Isak Andersson" <IcePapih lavabit.com> writes:
On Tuesday, 30 October 2012 at 03:40:50 UTC, Brad Roberts wrote:
 On 10/29/2012 4:27 PM, Isak Andersson wrote:
 Well, I would say that I am pretty willing to do both those 
 things. At least if I have the knowledge to do it! I'm not a
 100% clear on what the second requirement means. Having a box 
 running 24/7 that can run automated tests at any time? Or
 just running the tests occationally (like once or twice a week 
 or so, or even just in time for every new DMD release)?
(though not building all the time, just on-checkin) is the preference, but there's room for less frequent to be acceptable. It's pretty easy to setup the tester and it's pretty low maintenance. I'd prefer to have access to the account that runs it (or easiest just let me run it) to be able to update the tester code periodically. Later, Brad
Sure, what's your Email though? I can't seem to figure out where I can find it on this forum thing :P I suppose I could put some money down to build a cheap machine that can be running all the time. Haiku isn't multi user yet so you'd have full access via ssh (if Haiku supports that, at least it has the ssh command afaik, but that's for connecting).
Oct 30 2012
prev sibling next sibling parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 29-10-2012 23:36, Isak Andersson wrote:
 Hello D-folks!

 I was just wondering if it would be possible to make DMD build out of
 the box for Haiku (haiku-os.org) with the source from the official DMD
 repo. Haiku is pretty darn POSIX compliant so the actual porting isn't
 much of a problem. DMD has ran on Haiku before a while ago and shouldn't
 have any problem doing it now. From what I hear from the Haiku community
 it was just to add a bunch of ifeq Haiku and stuff to make it build and
 run fine.

 What I want though is to get these things in to the main source of DMD,
 applying patches and stuff like that is a pain, it is so much better to
 just be able to clone and build without problems. So what I wanted to
 ask is: would Digital Mars accept a pull request to make DMD build on
 Haiku to their main branch on Github? I just wanted to know for sure
 before I go ahead and fork DMD to do this.

 Cheers!
Do note that getting DMD, druntime, and phobos running on Haiku will take a lot of porting work. To name a few things: * All preprocessor #ifs in DMD for POSIX need to have Haiku added. * In all likelihood, DMD's port wrapper needs updating for Haiku. * druntime's POSIX headers all need to be updated for Haiku. * Any Haiku-specific header modules need to be added to druntime. * DMD, druntime, and phobos all need to be tested and debugged. * Probably other things I forgot. (This is all assuming Haiku is POSIX-compliant. If it isn't, it's going to be even more work, since most of druntime has two code paths: One for Windows and one for POSIX.) -- Alex Rønne Petersen alex lycus.org http://lycus.org
Oct 29 2012
next sibling parent Iain Buclaw <ibuclaw ubuntu.com> writes:
On 30 October 2012 05:41, Alex R=F8nne Petersen <alex lycus.org> wrote:
 On 29-10-2012 23:36, Isak Andersson wrote:
 Hello D-folks!

 I was just wondering if it would be possible to make DMD build out of
 the box for Haiku (haiku-os.org) with the source from the official DMD
 repo. Haiku is pretty darn POSIX compliant so the actual porting isn't
 much of a problem. DMD has ran on Haiku before a while ago and shouldn't
 have any problem doing it now. From what I hear from the Haiku community
 it was just to add a bunch of ifeq Haiku and stuff to make it build and
 run fine.

 What I want though is to get these things in to the main source of DMD,
 applying patches and stuff like that is a pain, it is so much better to
 just be able to clone and build without problems. So what I wanted to
 ask is: would Digital Mars accept a pull request to make DMD build on
 Haiku to their main branch on Github? I just wanted to know for sure
 before I go ahead and fork DMD to do this.

 Cheers!
Do note that getting DMD, druntime, and phobos running on Haiku will take=
a
 lot of porting work. To name a few things:

 * All preprocessor #ifs in DMD for POSIX need to have Haiku added.
 * In all likelihood, DMD's port wrapper needs updating for Haiku.
 * druntime's POSIX headers all need to be updated for Haiku.
 * Any Haiku-specific header modules need to be added to druntime.
 * DMD, druntime, and phobos all need to be tested and debugged.
 * Probably other things I forgot.

 (This is all assuming Haiku is POSIX-compliant. If it isn't, it's going t=
o
 be even more work, since most of druntime has two code paths: One for
 Windows and one for POSIX.)
Next, we'll be making dlang.org html, xhtml-strict, and haiku compliant... = :o) --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';
Oct 30 2012
prev sibling parent reply "Isak Andersson" <IcePapih lavabit.com> writes:
 Do note that getting DMD, druntime, and phobos running on Haiku 
 will take a lot of porting work. To name a few things:

 * All preprocessor #ifs in DMD for POSIX need to have Haiku 
 added.
 * In all likelihood, DMD's port wrapper needs updating for 
 Haiku.
 * druntime's POSIX headers all need to be updated for Haiku.
 * Any Haiku-specific header modules need to be added to 
 druntime.
 * DMD, druntime, and phobos all need to be tested and debugged.
 * Probably other things I forgot.

 (This is all assuming Haiku is POSIX-compliant. If it isn't, 
 it's going to be even more work, since most of druntime has two 
 code paths: One for Windows and one for POSIX.)
Yep, it seems like it has ran well after adding the pre-proccessor stuff. But of course it needs testing and all that. Haiku is very POSIX compliant although not 100%, but for most needs it is fine.
Oct 30 2012
parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Tuesday, 30 October 2012 at 12:11:41 UTC, Isak Andersson wrote:
 Do note that getting DMD, druntime, and phobos running on 
 Haiku will take a lot of porting work. To name a few things:

 * All preprocessor #ifs in DMD for POSIX need to have Haiku 
 added.
 * In all likelihood, DMD's port wrapper needs updating for 
 Haiku.
 * druntime's POSIX headers all need to be updated for Haiku.
 * Any Haiku-specific header modules need to be added to 
 druntime.
 * DMD, druntime, and phobos all need to be tested and debugged.
 * Probably other things I forgot.

 (This is all assuming Haiku is POSIX-compliant. If it isn't, 
 it's going to be even more work, since most of druntime has 
 two code paths: One for Windows and one for POSIX.)
Yep, it seems like it has ran well after adding the pre-proccessor stuff. But of course it needs testing and all that. Haiku is very POSIX compliant although not 100%, but for most needs it is fine.
Based on my experience POSIX compliance is like any standard. You end up getting lots of #ifdef for each POSIX system anyway. The only people that think POSIX is a standard without any issues, only know GNU/Linux. One thing missing from the list which costs a lot of effort, is code generation. Based on my toy Solaris experience with DMD, I think it is easier to use LDC or GDC for bringing D to other platforms. -- Paulo
Oct 30 2012
parent reply "Isak Andersson" <IcePapih lavabit.com> writes:
 Based on my experience POSIX compliance is like any standard.

 You end up getting lots of #ifdef for each POSIX system anyway. 
 The only people that think POSIX is a standard without any 
 issues, only know GNU/Linux.

 One thing missing from the list which costs a lot of effort, is 
 code generation.

 Based on my toy Solaris experience with DMD, I think it is 
 easier to use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os. The problem with using those is that most D libraries are built with DMD in mind, like Vibe.d. DMD is pretty much setting the standard for how D behaves.
Oct 30 2012
next sibling parent "Paulo Pinto" <pjmlp progtools.org> writes:
On Tuesday, 30 October 2012 at 13:46:22 UTC, Isak Andersson wrote:
 Based on my experience POSIX compliance is like any standard.

 You end up getting lots of #ifdef for each POSIX system 
 anyway. The only people that think POSIX is a standard without 
 any issues, only know GNU/Linux.

 One thing missing from the list which costs a lot of effort, 
 is code generation.

 Based on my toy Solaris experience with DMD, I think it is 
 easier to use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os. The problem with using those is that most D libraries are built with DMD in mind, like Vibe.d. DMD is pretty much setting the standard for how D behaves.
Yeah there are two main issues with POSIX: - versions, which means you never know how compliant a given system is - like C, the standard allows for implementation defined behaviors In the end #ifdef all the way, no different than using a non-POSIX system. -- Paulo
Oct 30 2012
prev sibling parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 30-10-2012 14:46, Isak Andersson wrote:
 Based on my experience POSIX compliance is like any standard.

 You end up getting lots of #ifdef for each POSIX system anyway. The
 only people that think POSIX is a standard without any issues, only
 know GNU/Linux.

 One thing missing from the list which costs a lot of effort, is code
 generation.

 Based on my toy Solaris experience with DMD, I think it is easier to
 use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os.
I direct you to the POSIX makefiles of DMD, druntime, and phobos. ;)
 The problem with using those is that most D libraries are built with DMD
 in mind, like Vibe.d. DMD is pretty much setting the standard for how D
 behaves.
-- Alex Rønne Petersen alex lycus.org http://lycus.org
Oct 30 2012
parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Tuesday, 30 October 2012 at 13:55:42 UTC, Alex Rønne Petersen 
wrote:
 On 30-10-2012 14:46, Isak Andersson wrote:
 Based on my experience POSIX compliance is like any standard.

 You end up getting lots of #ifdef for each POSIX system 
 anyway. The
 only people that think POSIX is a standard without any 
 issues, only
 know GNU/Linux.

 One thing missing from the list which costs a lot of effort, 
 is code
 generation.

 Based on my toy Solaris experience with DMD, I think it is 
 easier to
 use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os.
I direct you to the POSIX makefiles of DMD, druntime, and phobos. ;)
Which as far as I am aware only work on POSIX == Linux.
Oct 30 2012
parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 30-10-2012 19:35, Paulo Pinto wrote:
 On Tuesday, 30 October 2012 at 13:55:42 UTC, Alex Rønne Petersen wrote:
 On 30-10-2012 14:46, Isak Andersson wrote:
 Based on my experience POSIX compliance is like any standard.

 You end up getting lots of #ifdef for each POSIX system anyway. The
 only people that think POSIX is a standard without any issues, only
 know GNU/Linux.

 One thing missing from the list which costs a lot of effort, is code
 generation.

 Based on my toy Solaris experience with DMD, I think it is easier to
 use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os.
I direct you to the POSIX makefiles of DMD, druntime, and phobos. ;)
Which as far as I am aware only work on POSIX == Linux.
Er... they work on Linux, OS X, FreeBSD, OpenBSD, Solaris/SunOS. -- Alex Rønne Petersen alex lycus.org http://lycus.org
Oct 30 2012
parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Tuesday, 30 October 2012 at 18:53:23 UTC, Alex Rønne Petersen 
wrote:
 On 30-10-2012 19:35, Paulo Pinto wrote:
 On Tuesday, 30 October 2012 at 13:55:42 UTC, Alex Rønne 
 Petersen wrote:
 On 30-10-2012 14:46, Isak Andersson wrote:
 Based on my experience POSIX compliance is like any 
 standard.

 You end up getting lots of #ifdef for each POSIX system 
 anyway. The
 only people that think POSIX is a standard without any 
 issues, only
 know GNU/Linux.

 One thing missing from the list which costs a lot of 
 effort, is code
 generation.

 Based on my toy Solaris experience with DMD, I think it is 
 easier to
 use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os.
I direct you to the POSIX makefiles of DMD, druntime, and phobos. ;)
Which as far as I am aware only work on POSIX == Linux.
Er... they work on Linux, OS X, FreeBSD, OpenBSD, Solaris/SunOS.
Ok I was a bit stupid with my remark, sorry about that. Anyway, I remember when I tried my toy experiment with porting DMD for Solaris I had to do some patches. You would be surprised what commercial UNIX systems understand as POSIX vs what the standard says. Somehow I don't miss my days porting software among UNIX platforms. -- Paulo
Oct 30 2012
parent =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 30-10-2012 21:59, Paulo Pinto wrote:
 On Tuesday, 30 October 2012 at 18:53:23 UTC, Alex Rønne Petersen wrote:
 On 30-10-2012 19:35, Paulo Pinto wrote:
 On Tuesday, 30 October 2012 at 13:55:42 UTC, Alex Rønne Petersen wrote:
 On 30-10-2012 14:46, Isak Andersson wrote:
 Based on my experience POSIX compliance is like any standard.

 You end up getting lots of #ifdef for each POSIX system anyway. The
 only people that think POSIX is a standard without any issues, only
 know GNU/Linux.

 One thing missing from the list which costs a lot of effort, is code
 generation.

 Based on my toy Solaris experience with DMD, I think it is easier to
 use LDC or GDC for bringing D to other platforms.

 --
 Paulo
Yeah, it seems like POSIX kind of failed in the sense that you can't just have a simple posix makefile that works for any posix compliant os.
I direct you to the POSIX makefiles of DMD, druntime, and phobos. ;)
Which as far as I am aware only work on POSIX == Linux.
Er... they work on Linux, OS X, FreeBSD, OpenBSD, Solaris/SunOS.
Ok I was a bit stupid with my remark, sorry about that. Anyway, I remember when I tried my toy experiment with porting DMD for Solaris I had to do some patches. You would be surprised what commercial UNIX systems understand as POSIX vs what the standard says. Somehow I don't miss my days porting software among UNIX platforms. -- Paulo
All D toolchain makefiles should work fine on Solaris out of the box now - at least the latest version of the OS. -- Alex Rønne Petersen alex lycus.org http://lycus.org
Oct 31 2012
prev sibling parent "Isak Andersson" <IcePapih lavabit.com> writes:
Well, I was going to tackle the porting stuff about a week ago, 
but for some reason my computer refuses to boot Haiku, I think 
it's an ACPI thing, but I can't find any settings for it in my 
BIOS. Oh well, I guess it will have to wait a while. Or 
alternatively I could port it from virtualbox or something!

Anyways, eventually I'll get around to it somehow :)
Nov 16 2012