Bug 31441 - --with-gc=none configure option broken
Summary: --with-gc=none configure option broken
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: 4.0.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-06-27 22:49 UTC by Tyler
Modified: 2015-07-10 15:43 UTC (History)
4 users (show)

Tags: GC --with-gc=none
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 31441 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Tyler 2015-06-27 22:49:43 UTC
I cannot disable Garbage Collection with the following argument on either Autogen.sh or Configure files: "--with-gc=none" and it would still output:

"sgen and Included Boehm GC with typed GC and parallel mark" even if I want to disable GC. And when I go further to disable both Boehm and Sgen GC with these arguments:

"./autogen.sh --with-gc=none --with-sgen=no --disable-boehm" still output the same.

After trying those, I went into Configure file to remove the options for GC except for none argument and changed "xnone)" to "xnone|*)", it was able to create the configuration files with GC set to none. However when executing the make command, it failed, because it cannot find the Boehm header file (Why does this happen when I explicitly state that Boehm is disabled?) and you can see the output here:

main.c:5:28: fatal error: buildver-boehm.h: No such file or directory
 #include "buildver-boehm.h"

After that error, I just "make clean" it and since I was also bootstrapping compilers into several copies of Mono, I just simply copy the headers of buildver-boehm.h over which contains only the build date and that it. When I tried it again, it returns a weird error:

"mono/mono/mini/main.c:91: undefined reference to `mono_main'"

I checked the headers, the mini.h does have 'mono_main' defined and this whole things have left me confused.

While I get that Garbage Collection is a critical part of C# in several projects and should always remain to be the default, but there are avenues of development that can be done in C# WITHOUT Garbage Collections or any of the overheads especially in making high performance code (it is NOT impossible to keep memory allocation/deallocation in check either.)

I'd like to see this fixed by allowing developers remove GC from Mono when desired.

Please and thank you.