[Mono-list] mono on FreeBSD

Garrett Rooney rooneg@electricjellyfish.net
Tue, 14 May 2002 20:38:58 -0400

so it's been a while since i've done any mono stuff, but on a whim i
decided to try building the system on FreeBSD just to see if it
happened to build/work.

the first problem was that FreeBSD doesn't (at the moment) have a
libpthread, it's pthreads functions live in libc_r, so i had to add
that lib to the list of libs to search for pthreads.

once i got past that problem, i ran into a snag in
mono/io-layer/daemon-messages.c.  the MSG_NOSIGNAL flag to send and
recv doesn't seem to be implemented on FreeBSD.  if someone could fill
me in on exactly what it does, i might be able to look into finding
some alternative means of accomplishing the same end.

after shortcutting around the problem by simply replacing MSG_NOSIGNAL
with 0, i was able to get everything to build (with a lot of warnings
mind you... is that normal on linux?  i don't have a linux box around
to play with, so i can't check).

now i have a set of binaries, but i lack any libs or executables to
test it with.

are there any publicly available precompiled mono libs/executables i
could try this stuff out with?

anyway, here's the patch to configure.in to check in libc_r for
pthreads.  it will at least get the next person who tries this a bit
further along.


Index: configure.in
RCS file: /mono/mono/configure.in,v
retrieving revision 1.78
diff -u -r1.78 configure.in
--- configure.in	9 May 2002 15:33:59 -0000	1.78
+++ configure.in	15 May 2002 00:27:38 -0000
@@ -253,7 +253,7 @@
 	dnl *****************************
 	dnl *** Checks for libpthread ***
 	dnl *****************************
-	AC_SEARCH_LIBS(pthread_create, pthread, [
+	AC_SEARCH_LIBS(pthread_create, pthread c_r, [

garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski