[Mono-dev] /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
Thu May 23 16:28:33 UTC 2013


Thanks! I assumed I was moving to mono 3 by moving to the master branch on
git (I'm building from git). Is this not correct? Or am I missing some
configuration step? This issue is actually in the master branch (the
mono-2-10-9 branch builds just fine), which I assume is where the latest
development for mono 3.0 is being done.

Thanks,
Jeremy


On Thu, May 23, 2013 at 11:29 AM, Rodrigo Kumpera <kumpera at gmail.com> wrote:

> mini.c should not have this. All files in mini should no longer depends on
> either defines.
>
> But please move to mono 3.0 as 2.10 is not longer been actively maintained.
>
>
> On Thu, May 23, 2013 at 11:01 AM, Jeremy Bell <bell.jeremy at gmail.com>wrote:
>
>> 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:
>>
>> main.c:
>> #include <config.h>
>> #include "mini.h"
>> #ifndef HOST_WIN32
>> #include "buildver.h"
>> #endif
>>
>>
>> branch master:
>> #include <config.h>
>> #include "mini.h"
>> #ifndef HOST_WIN32
>> #ifdef HAVE_SGEN_GC
>> #include "buildver-sgen.h"
>> #else
>> #include "buildver.h"
>> #endif
>> #endif
>>
>> This makes main.c impossible to compile when buildver-sgen.h is generated
>> and not buildver.h. First of all, HAVE_SGEN_GC is never defined for files
>> in /mini as far as I can tell, so main.c always attempts to include
>> buildver.h, which does not exist when buildver-sgen.h is generated instead.
>>
>> 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
>>
>>
>> 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
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130523/a7e1b759/attachment-0001.html>


More information about the Mono-devel-list mailing list