[Mono-list] Mono on FreeBSD
Andrey Nepomnyaschih
A.Nepomnyaschih@chartpilot.ru
Tue, 23 Sep 2003 11:31:02 +0400
Hello,
I've been trying to build mono 0.26 on FreeBSD 5.1-R without a success.
Following the documentation on how to build mono from sources at
http://www.go-mono.com:8080. Issuing a 'make' after ./configure outputs
the following:
"Makefile", line 503: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1
When I remove dnl from the beginning of the 503th line the make
proceeds, but fails with
socket-io.c: In function
`ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal':
socket-io.c:1513: `SOL_IPV6' undeclared (first use in this function)
socket-io.c:1513: (Each undeclared identifier is reported only once
socket-io.c:1513: for each function it appears in.)
socket-io.c:1532: `SOL_IP' undeclared (first use in this function)
Which I belive had been already discussed in the following thread:
http://www.mail-archive.com/mono-list@lists.ximian.com/msg03146.html
Well following that thread I've applied both patches Gonzalo Paniagua
Javier and Paolo Molaro submitted:
--- mono/io-layer/threads.c.orig Fri Jul 4 22:45:33 2003
+++ mono/io-layer/threads.c Tue Sep 23 11:02:48 2003
@@ -238,7 +238,7 @@
* I'm leaving it as 2M until I'm told differently.)
*/
pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, 1024*1024*2);
+ pthread_attr_setstacksize(&attr, 1024*1024);
ret=_wapi_timed_thread_create(&thread_private_handle->thread,
&attr,
create, start, thread_exit, param,
--- mono/metadata/socket-io.c.orig Tue Jul 29 20:58:31 2003
+++ mono/metadata/socket-io.c Tue Sep 23 10:45:22 2003
@@ -1465,6 +1465,30 @@
int system_level;
int system_name;
int ret;
+#ifdef AF_INET6
+ int sol_ip;
+ int sol_ipv6;
+
+#ifdef HAVE_SOL_IPV6
+ sol_ipv6 = SOL_IPV6;
+#else
+ {
+ struct protoent *pent;
+ pent = getprotobyname ("ipv6");
+ sol_ipv6 = (pent != NULL) ? pent->p_proto : 41;
+ }
+#endif
+
+#ifdef HAVE_SOL_IP
+ sol_ip = SOL_IP;
+#else
+ {
+ struct protoent *pent;
+ pent = getprotobyname ("ip");
+ sol_ip = (pent != NULL) ? pent->p_proto : 0;
+ }
+#endif
+#endif /* AF_INET6 */
MONO_ARCH_SAVE_REGS;
@@ -1510,7 +1534,7 @@
MonoObject *address = NULL;
#ifdef AF_INET6
- if(system_level == SOL_IPV6) {
+ if(system_level == sol_ipv6) {
struct ipv6_mreq mreq6;
/*
@@ -1529,7 +1553,7 @@
ret = setsockopt (sock, system_level,
system_name, &mreq6,
sizeof (mreq6));
- } else if(system_level == SOL_IP)
+ } else if(system_level == sol_ip)
#endif /* AF_INET6 */
{
#ifdef HAVE_STRUCT_IP_MREQN
The building now succeeds but, the mcs hangs (can be read in the
thread).
Paolo mentioned that there were some tips for FreeBSD users, for which
he hasn't got reply, can someone point me to them, or help me with
making mono work?
Have a good time,
Andrey Nepomnyaschih