[Mono-bugs] [Bug 542303] New: compiling mono on Snow Leopard fails in mono-sigcontext.h (svn 142581)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 25 14:22:09 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=542303


           Summary: compiling mono on Snow Leopard fails in
                    mono-sigcontext.h (svn 142581)
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: uniqueness.template at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_1; en-us)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9

I am attempting to build mono from SVN on Mac OS 10.6 Snow Leopard (due to
unrelated problems with the current Mono Framework binaries for 10.5 Leopard
not working correctly on Snow Leopard). After correctly setting up my build
environment to build mono as an i386 binary (mono's x86_64 support is still
lacking), the build fails in mono/utils/mono-sigcontext.h.


Reproducible: Always

Steps to Reproduce:
I've set up my build environment as follows:
1) Installed MonoFramework-2.4.2.3_4.macos10.novell.x86.dmg
2) Installed MacPorts
3) Installed dependancies as universal i386/x86_64 binaries:
sudo port install libiconv gettext glib2 zlib pkgconfig +universal
4) Retrieved the latest SVN sources for "mono" and "mcs":
svn co svn://anonsvn.mono-project.com/source/trunk/mono
svn co svn://anonsvn.mono-project.com/source/trunk/mcs

5) The rest of my Terminal commands before the build fails:
cd mono
/autogen.sh CFLAGS="-m32"
make
Actual Results:  
Compiler output:

In file included from ../../mono/utils/mono-sigcontext.h:9,
                 from mini-x86.h:5,
                 from mini-arch.h:5,
                 from mini.h:33,
                 from genmdesc.c:9:
/usr/include/ucontext.h:42:2: error: #error ucontext routines are deprecated,
and require _XOPEN_SOURCE to be defined
make[3]: *** [genmdesc-genmdesc.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Apple has deprecated ucontext.h which contains the old X/Open context
manipulation functions: getcontext, makecontext, setcontext, and swapcontext.
Apple has moved all other ucontext structures and defines formally found in
ucontext.h to sys/ucontext.h.

I successfully compiled mono on Snow Leopard after I modified the following in
mono/utils/sigcontext.h:

===BEFORE===
#if defined(__FreeBSD__) || defined(__APPLE__)
#include <ucontext.h>
#endif
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#endif
===END BEFORE===

===AFTER===
if defined(__FreeBSD__)
#include <ucontext.h>
#endif

#if defined(__APPLE__)
#include <sys/ucontext.h>
#include <AvailabilityMacros.h>
#endif
===END AFTER===

This would most likely break compilation on 10.5 Leopard, so it's probably not
the best solution.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list