[Gc] Newbie questions

Lloyd Sargent lloyd at s-squared-ranch.com
Thu Sep 24 09:11:11 PDT 2009

On Sep 24, 2009, at 10:05 AM, Ivan Maidanski wrote:

> Hi!
> Lloyd Sargent <lloyd at s-squared-ranch.com> wrote:
>> Hey folks, 30 year veteran here and the documentation is so  
>> confusing.
> 21, to be correct ;)
> I agree, the docs are not perfect (and outdated in some places).
>> 1) First, what IS the license for GC for Windows and Linux? MIT, BSD,
>> or GPL? If it is GPL I can't use it.
> The license is in doc/Readme. (Might be, it should be updated...  
> Hans knows better...)

The way I parsed it seems to indicate the BUILD is GPL and the CODE is  
MIT (which is a good thing for me).

I THINK it would be a good idea to separate these two into distinct  
paragraphs : a) it simplifies WHAT is MIT and WHAT is not and b) there  
is no misunderstanding that the CODE not the build falls under the MIT  

I read licenses (a lot unfortunately now people seem to be on this  
kick of modifying them - sigh) - heck I would be willing to give it a  

>> 2) Assuming that the license is unrestrictive, can you build GC for
>> Ming on 32 bit machine? If so, what is the recommended procedure. It
>> is alluded to, but never explained.
> Yes, both MinGW and mingw-w64 (32/64-bit) are supported.


>> 3) Trying to build 7.1 with Mingw and I get:
> It's better to use v7.2alpha2 (or, even, fetch the CVS version).

Thanks for the advice!

>> /bin/sh ./libtool --tag=CC --mode=link gcc -fexceptions -I
>> ...
>> .libs/alloc.o: In function `GC_stopped_mark':
>> C:/msys/1.0/home/lloyd/gc/alloc.c:474: undefined reference to
>> `_GC_stop_world'
>> C:/msys/1.0/home/lloyd/gc/alloc.c:501: undefined reference to
>> `_GC_start_world'
>> C:/msys/1.0/home/lloyd/gc/alloc.c:525: undefined reference to
>> `_GC_start_world'
>> .libs/alloc.o: In function `GC_collect_a_little':
>> (etc, etc)
>> 4) This was configured with the following:
>>  ./configure --enable-cplusplus --enable-threads=win32
>> using MSYS
> "configure" is outdated and needs to be regenerated from configure.ac.
> configure.ac works for Cygwin, but I don't know whether it's working  
> for MSYS.

Ah, I had wondered if this was the case. That would explain my errors.

> "Makefile" doesn't work for mingw too...

Yah, discovered this too (grin).

Has anyone thought about using CMake?  I have used it in a lot of  
projects and find it FAR simpler to create Makefile's for Linux and  

>> If this is NOT the correct way of doing things, would you please
>> elucidate?
> For now, I'd recommend you the following steps:
> - fetch today's CVS;
> - enter "bdwgc" dir;
> - type: gcc -fno-strict-aliasing -Wall -DALL_INTERIOR_POINTERS - 
> DNO_DEBUGGING -DNDEBUG -I.\include -I.\libatomic_ops-1.2\src -c *.c  
> *.cpp
> - type: ar crus libgc.a *.o
> If you need a debug version, replace "-O2 -DNO_DEBUGGING -DNDEBUG"  
> with "-g -DGC_ASSERTIONS".
> If you don't need a multi-threaded lib, remove "-DGC_THREADS - 
> DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -I.\libatomic_ops-1.2\src".
> A bit complicated for a beginner, but are there volunteers to update  
> the docs and build scripts?


Let me get my feet wet and I'll try to give y'all a hand!



More information about the Gc mailing list