[Mono-list] Re: mono on FreeBSD

Garrett Rooney rooneg@electricjellyfish.net
Wed, 15 May 2002 09:01:26 -0400


ok, i'm not on this list, but i saw a few responses to my post in the
archives, and i'll try to answer the questions raised.

first off, as someone pointed out to me off list, we really want to be
using -pthread, not -lc_r directly.  the problem is more complicated
though if we want to truely be portable about it.  check out what the
apr project uses for finding how to link against pthreads libs and
you'll see what i mean.  it's annoyingly complex.

http://cvs.apache.org/viewcvs.cgi/apr/build/apr_threads.m4?rev=1.5&content-type=text/vnd.viewcvs-markup

linking in libc_r on bsd will get things to compile, but you'll get
some warnings (i don't know if things will actually work correctly).
the warnings go away if you switch to using -pthread, but i don't have
time to generate an appropriate patch for that.  my autoconf-fu is
just not up to it, although someone who's motivated and knows what
they're doign could probably come up with a good solution by looking
at the apr stuff.  i'm hesitant to just stick -pthread in because then
we're stuck working on linux and bsd, but breaking most other places.
it would be best to do it correctly, as apr has.

as for an alternative to MSG_NOSIGNAL on BSD, i can't find one in the
man pages.  if you want to eliminate SIGPIPE only during those send
and recv's, that's easy enough, otherwise you can just use the catch
all solution and turn off SIGPIPE completely.  either way, the patch
is trivial.

(btw, if anyone else is trying to build on FreeBSD, you also have to
set CPPFLAGS to -I/usr/local/include so that it can pick up the iconv
headers.  just that, the pthreads stuff and the MSG_NOSIGNAL stuff and
it builds fine.)

i don't have time to look at the number of warnings, but i think 30 or
so was about what i saw.  i'll try downloading the precompiled
binaries from a tarball and see if anything actually works later on
tonight.

you guys have been doing fantastic work on this, it's amazing how far
you've progressed since i last ducked my head in and took a look.

-garrett

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