Cygwin/NT Build Support

I am currently getting the kernel to build on cygwin. So far I have managed to get a good portion of the project to build manually. There are a few environment variables I have to inspect further. I’m not sure if any of u guys would find this useful, but I think it might be a cool addition to build platforms if it can be successfully pulled it off. That is if it hasnt been done already.

Can someone, who builds on linux or even cygwin for this matter, please print out these environment settings:

BOCHS_DEBUG_HACK        ?= ${bochs_debug} ;
INCLUDE_GPL_ADDONS      ?= ${include_gpl_addons} ;

I just want to verify they are correct under cygwin.

Don’t have the answer sorry. However good luck with this, I tried to research the requirments for this. I got as far as installing cygwin, and the required tools and so on. I was hoping to get it integrated into Visual Studio, like SkyOS does. Sadly not had much time to do much with it. Looking forward to it, feel free to share any early setup’s. :wink:

BOCHS_DEBUG_HACK changes something to do with how the debug output is spewed out on Bochs

INCLUDE_GPL_ADDONS currently just turns on/off the build of the AC3 decoder, as its the sole GPL addon so far, but this may in future include some hardware drivers which are under the GPL.

Is there any updates regarding this to be able to compile under a windows environment? Is the environmental variables sorted out?

Wow, ancient thread.

I’ll give you my update from my last attempts:

GCC 2.95.3 cross compiler seems to build fine
Most haiku objects build fine using the cross compiler

Haiku build “helper” tools for the host platform tend to choke using the cygwin compiler/linker (GCC 3.4.4 IIRC). This includes stuff like rc, setattr, makebootable, fs_shell, etc.

Many of these are required in order to create the image and populate it with the binaries. Many of them link to <build> and <build> (not sure if that’s currently the name of those build-specific targets or not).

Last time I tried it, the problem appeared to be with the linker - it simply failed with no error. The binary never shows up, and no information is provided to help you track it down. I tried various cc/linker flags to see if I could resolve it, but was not successful.

Several others have tried and failed as well - so most of us have simply given up and installed Linux (or BeOS R5) in order to build Haiku. Eventually it won’t matter when Haiku will be installable from a CD and self-hosting anyway.

I still have some diffs to the configure script and some of the compatibility headers, but there’s no reason to commit them until someone proves that it actually works.

I wonder is it possible to fetch Haiku sources via SVN for Windows to a ntfs partition? Windows does not support some characters in filenames. Also windows does not support low and upper case character recognition in filenames (ABC.txt = abc.txt). I had problems when I tryed to store freebsd distfiles sources on fat32 partition. Can I have such problems with Haiku sources?

If you use a cygwin managed-mount directory cygwin will keep track of the case-sensitivity for you.

Haiku sources are case-sensitive, and if you don’t use a cygwin managed-mount you will definitely run into problems where String.h and string.h are treated the same when searching the headers, etc.

I guess You have development environment under CYGWIN. If so, can you please give me instructions HOWTO do it.

I am using CYGWIN (latest), full install.

I am interested in testing the code for BOOT and KERNEL part.
For my interest I would like to build sys/BOOT and sys/KERNEL part of the HAIKU and create tests for boot sequence in kernel load sequence!

In addition I am to be participating in development process.



I haven’t tried to build Haiku in Cygwin in a LONG time… but I’m guessing the same issues probably still exist.

In other words: Don’t waste your time. Install Linux, build Haiku from there - be happy.

If you really want to prove that it’s possible to build Haiku from Cygwin - I could certainly send you the list of packages (and versions) that I used in my last attempt - as well as some minor patches to the Haiku code to allow it to compile with Cygwin’s headers.

The problem appeared to be a broken linker in Cygwin which simply failed with no error. From what I’ve read - Cygwin’s tools are known to have various funny problems - including a broken linker.

In the end, the few of us who were somewhat interested in building Haiku under Cygwin simply gave up due to disinterest, impatience, frustration, or all of the above.

Perhaps I feel a little hungry for all of the above (to feel rage again … on mission impossible and feel frustrated about software that runs on WIN environment)

In all seriousness, I can try. Why not ? … if you can post me the LOGS from your last attempt & patch for HAIKU code.
Will play with stuff, one day max … and if no luck, will with speed of a light switch to LINUX (reboot to DEBIAN, my native development environment).



Here’s some quick instructions on which packages to install (may be outdated):

Here’s the output from cygcheck:

Here’s a diff of the source files (from an old revision r21227 it appears - I believe Stefano made the most recent tweaks here):

Pretty simple really :slight_smile: - there was a bunch of stuff that had to be changed but in an attempt to make FreeBSD and OS X build haiku - most of those were fixed already.

If you’d like to work in Windows, this works pretty well (at least here on a A64 3200, 1GB ram):

  1. Install linux in a virtual machine (i used Ubuntu server, no need for gui), minimum 4GB in disk size and 512MB ram.
  2. Setup your build environment:
  3. Install samba on the linux vm so you can explore/modify files from windows and use your prefered editor/tools.
  4. Install ssh in linux, and Putty in windows so you can have a native terminal in windows.
  5. Optional: you can setup an ftp server in linux to transfer files from/to haiku.

The experience is really not that bad, and has it’s advantages. It can be quite comfortable when you’re accustomed to code in windows :slight_smile:
If you have a recent multicore cpu and a good amount of ram, this should be pretty efficient!


Maybe it’s worth to try again, since cygwin has seen some updates since the last time I tried.

The latest diffs I made are described in this post: