[Mono-devel-list] Trouble building Mono 1.0.2 on Solaris 7

Trevor Dennis tdennis at trevordennis.com
Mon Oct 25 17:34:14 EDT 2004


I'm running into some trouble trying to build Mono 1.0.2 on a Solaris 7 
system.  It appears that some patches were applied in the last few 
months that are making use of a mmap parameter, MAP_ANON or 
MAP_ANONYMOUS.  Apparently Solaris 7 and below do not have this 
capability (Or I am unaware of a patch that adds them).

Here is the output from make.

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../mono 
-I../../libgc/include -threads -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include -DGC_SOLARIS_THREADS 
-DNO_UNALIGNED_ACCESS -g -O2 -fno-strict-aliasing -g -Wall -Wunused 
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes 
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual 
-Wcast-align -Wwrite-strings -Wno-char-subscripts -c mono-codeman.c -MT 
mono-codeman.lo -MD -MP -MF .deps/mono-codeman.TPlo  -fPIC -DPIC -o 
mono-codeman.c: In function `new_codechunk':
mono-codeman.c:177: error: `MAP_ANON' undeclared (first use in this 
mono-codeman.c:177: error: (Each undeclared identifier is reported only once
mono-codeman.c:177: error: for each function it appears in.)
make: *** [mono-codeman.lo] Error 1

A quick search shows that it is used in these locations.

 > find . -name '*.c'`             <
./mono/utils/mono-codeman.c:#ifndef MAP_ANONYMOUS
./mono/utils/mono-codeman.c:#define MAP_ANONYMOUS MAP_ANON
./mono/utils/mono-codeman.c:    ptr = mmap (0, chunk_size, 
./libgc/os_dep.c:#ifdef USE_MMAP_ANON
./libgc/os_dep.c:# if defined(MAP_ANONYMOUS)
./libgc/os_dep.c:#   define OPT_MAP_ANON MAP_ANONYMOUS
./libgc/os_dep.c:#   define OPT_MAP_ANON MAP_ANON
./libgc/os_dep.c:# define OPT_MAP_ANON 0
./libgc/os_dep.c:#   ifndef USE_MMAP_ANON
./libgc/os_dep.c:                 GC_MMAP_FLAGS | OPT_MAP_ANON, zero_fd, 
0/* offset */);
./libgc/os_dep.c:                     MAP_PRIVATE | MAP_FIXED | 

Is there an option to configure to get the build to revert back to the 
older malloc implementation?  I went with the defaults that configure 
chose.  I also tried --disable-shared-handles but that does not help.  
I've also tried mono-1.1.1 and it gets the same errors (on line 203 though).

Is this fixable or is Solaris 7 not going to be supported going forward? 



More information about the Mono-devel-list mailing list