23 May 2013 17:01
/mono/mini/main.c build error: depends on HAVE_SGEN_GC define, making it impossible to compile for sgen
Jeremy Bell <bell.jeremy <at> gmail.com>
2013-05-23 15:01:24 GMT
2013-05-23 15:01:24 GMT
At some point between branch mono-2-10-9 and branch master, a change was made to /mono/mini/main.c:
branch mono-2-10-9:#include <config.h>
#include "mini.h"
#ifndef HOST_WIN32
#include "buildver.h"
#endif
#include <config.h>
#include "mini.h"
#ifndef HOST_WIN32
#ifdef HAVE_SGEN_GC
#include "buildver-sgen.h"
#else
#include "buildver.h"
#endif
#endif
However, even if you explicitly define HAVE_SGEN_GC in CFLAGS, etc... then you will still get an error, in mini.h, because it believes it is an error to have either HAVE_SGEN_GC or HAVE_BOEHM_GC defined when mini.h is included, as /mini code should not have dependencies on the GC being used, so it says:
mini.h:
/*
* The mini code should not have any compile time dependencies on the GC being used, so the same object file from mini/
* can be linked into both mono and mono-sgen.
*/
#if defined(HAVE_BOEHM_GC) || defined(HAVE_SGEN_GC)
#error "The code in mini/ should not depend on these defines."
#endif
/*
* The mini code should not have any compile time dependencies on the GC being used, so the same object file from mini/
* can be linked into both mono and mono-sgen.
*/
#if defined(HAVE_BOEHM_GC) || defined(HAVE_SGEN_GC)
#error "The code in mini/ should not depend on these defines."
#endif
So, either way, main.c won't compile without modification. Is the error in /mono/mini/mini.h no longer valid? Or was the change to /mono/mini/main.c to depend on the HAVE_SGEN_GC define a regression?
Thanks,
Jeremy
Jeremy
_______________________________________________ Mono-devel-list mailing list Mono-devel-list <at> lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
The questions for mono-devel are rather:
* Is this behavior intentional?
* Is there a quick workaround to match mono's and ms.net's behavior?
Regards, David
RSS Feed