[Mono-list] Mono builds for Mac OS X

Jeffrey Stedfast fejj@ximian.com
19 Feb 2002 14:49:34 -0500


Awesome! I'm glad I was at least some help ;-)

One idea I just had whilst browsing the url was that you might be able
to use GNUPth (either 1.3.x or 1.4?) which is the GNU Portable Threads
library which is meant to build on a wide variety of systems (it uses
the POSIX thread API). I'm not sure you'll have luck building on OS X,
but it might be worth a shot.

http://www.gnu.org/software/pth/

As Paolo said, glib 1.3.14 might build a little easier and if not, you
might want to report build problems to the developers at
bugzilla.gnome.org so that they may fix them.

Anyways, have fun on your vacation!

Jeff

On Tue, 2002-02-19 at 08:37, Ryan Wilhm wrote:
> Thanks, Jeff! I pulled down a snapshot of Mono last night from CVS and
> managed to get it to build. Sort of. The major caveat is that, in addition
> to not supporting Pthread recursive mutexes, it also doesn't support
> read/write locks. I checked out Apple's developer site and found a bugfix
> request that details the functionality missing from the Pthread OpenGroup
> spec in OS X:
> 
> http://www.opensource.apple.com/bugs/X/Libraries/2686231.html
> 
> To get things to build in the interim, I just wrote stubs for the methods
> that io-layer/events.c calls. (So in other words, don't have much confidence
> that the build will work as expected... :) I'm going to be gone on vacation
> for a week starting tomorrow, but I'd be happy to give an implementation a
> shot when I get back next week.
> 
> Everything else was just build massaging... Off the top of my head:
> 
> - I set configure.in to target the ppc arch for powerpc-*-darwin*
> - For any problematic header dependencies, I just used #if(n)def
> __APPLE__/#endif to resolve
> - I did end up removing EDOTDOT and ENOMEDIUM
> - I ended up needing to manually compiling monoberg.c... I needed to add the
> -no-cpp-precomp and a library include flag that wasn't carried forward
> during Makefile generation
> - I also added the empty read/write lock stub file into the io-layer
> Makefile.am and Makefile.in files so I didn't have to hand crank the
> Makefile every time might need to reconfigure...
> 
> That's about it...
> 
> Thanks again for the help!
> Ryan
> 
> 
> On 2/18/02 3:46 PM, "Jeffrey Stedfast" <fejj@ximian.com> wrote:
> 
> > My fixes were committed to CVS (along with some fixes to my original
> > patches), so using the anoncvs server you should be able to get the
> > updated code. I've also had to fix a few other things that may or may
> > not have caused build problems on OSX that are also in CVS.
> > 
> > One thing that I still have to do on Solaris is to edit
> > mono/mono/wrapper/genwrapper.pl and remove the line with EDOTDOT and
> > ENOMEDIUM since Solaris doesn't have those. You may find that OSX lacks
> > some of these errno's too.
> > 
> > Lemme know how it goes!
> > 
> > Jeff
> > 
> > On Mon, 2002-02-18 at 09:53, Ryan Wilhm wrote:
> >> Cool. I started dinking with this over the weekend. I thought I'd share what
> >> I've found so far:
> >> 
> >> For pkg-config, I just downloaded and installed Fink.
> >> 
> >> For glib, I didn't see anything but the 1.2 dist in Fink out there for OS X,
> >> so I tried to compile the 1.3.13 source tarball. Here's what I did to make
> >> that work:
> >> 
> >> - I had to replace config.guess (It couldn't guess the OS type, I just
> >> copied the one in the mono-0.8 tarball over.)
> >> 
> >> - I set up CPPFLAGS with "-no-cpp-precomp" like you'd mentioned, and also
> >> added "-I/sw/include" dir to look for headers in the fink distro. Also set
> >> up LDFLAGS with "-L/sw/lib".
> >> 
> >> - In "glib/gdir.c", an additional include was needed for stdint.h.
> >> 
> >> - Libtool was generated to include "-undefined suppress" to suppress
> >> errors/warnings, which bombs in 10.1 now. I removed that.
> >> 
> >> That seemed to build everything up to the "tests" target, which built but
> >> didn't link due to some unresolved symbols in module (I think).
> >> 
> >> I didn't get much farther than that. I tried to kick off the mono build
> >> (from the 0.8 source tarball). It got up to the point where it wanted to
> >> find PTHREAD_MUTEX_RECURSIVE in pthread.h, which I've noticed that you'd
> >> posted a workaround for in an earlier thread for non-glibc systems. I was
> >> going to take a gander at that next. Was also going to go back and see if I
> >> can get the tests to compile for glib, to make sure it regresses okay.
> >> 
> >> Thanks,
> >> Ryan
> >> 
> >> 
> >> On 2/15/02 12:38 PM, "Jeffrey Stedfast" <fejj@ximian.com> wrote:
> >> 
> >>> I've been working on making mono more portable in order to help me port
> >>> to Sun/SPARC and I've now got it compiling. Also, Radek Doulik has
> >>> already successfully ported mono to LinuxPPC. This means that pretty
> >>> much all you should need to do is compile under OSX and it will probably
> >>> Mostly Just Work (tm) as far as I know at least.
> >>> 
> >>> Note: You need to specify -no-cpp-precomp in CPPFLAGS when compiling
> >>> just about anything UNIX-ish as opposed to Mac-ish. (Otherwise it uses
> >>> the hacked-up Apple version of cpp, which claims to be gcc, but doesn't
> >>> support all of the extensions.) -- Dan Winship
> >>> 
> >>> If you come accross any build problems, perhaps you can send a patch to
> >>> the list or else let someone know where the build gets stuck.
> >>> 
> >>> I do know that OSX doesn't support some POSIX functions, like strtok_r
> >>> and gethostbyname_r - but I don't think they are currently being used
> >>> within mono.
> >>> 
> >>> I guess what I'm saying is: give it a go, if it fails then at least
> >>> someone can report where it fails :-)
> >>> 
> >>> Jeff
> >>> 
> >>> On Fri, 2002-02-15 at 09:31, Ryan Wilhm wrote:
> >>>> Okay, so I did a little searching around the net and found interviews where
> >>>> Miguel says that a port to OS X is in the plan. I guess my question is: Is
> >>>> it actively being developed? Or is Linux the priority right now, with an OS
> >>>> X port forthcoming afterwards?
> >>>> 
> >>>> Thanks,
> >>>> Ryan
> >>>> 
> >>>> 
> >>>> On 2/14/02 12:15 PM, "Ryan Wilhm" <ryan_wilhm@yahoo.com> wrote:
> >>>> 
> >>>>> Out of curiosity, is there any effort underway to port to OS X? I know
> >>>>> that
> >>>>> MS is providing a port to FreeBSD, and it probably isn't much of a leap
> >>>>> from
> >>>>> there to port to OS X (assuming they want to), but it'd be nice to have an
> >>>>> open source implementation available to keep MS honest.
> >>>>> 
> >>>>> 
> >>>>> _______________________________________________
> >>>>> Mono-list maillist  -  Mono-list@ximian.com
> >>>>> http://lists.ximian.com/mailman/listinfo/mono-list
> >>>> 
> >>>> 
> >>>> _______________________________________________
> >>>> Mono-list maillist  -  Mono-list@ximian.com
> >>>> http://lists.ximian.com/mailman/listinfo/mono-list
> >> 
> >> 
> >> _______________________________________________
> >> Mono-list maillist  -  Mono-list@ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj@ximian.com  - www.ximian.com