Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Extending C with GC? Date: Sun, 07 Aug 2016 16:12:30 -0700 Organization: None to speak of Lines: 95 Message-ID: References: <60b33d17-71b7-4ecf-a821-dc641e2673ba@googlegroups.com> <3aa70e31-6e2f-42df-9c52-60cd923ddb6e@googlegroups.com> <6c8ded05-9ca9-4bae-a603-00b526ac0a77@googlegroups.com> <39d45c61-964f-46e8-8f62-ee9611ee0d6d@googlegroups.com> <0fe11c04-9255-475b-a3b3-797d3119ec26@googlegroups.com> <4c5800c3-b867-4daf-acb3-1c3e0fd6d789@googlegroups.com> <87k2funj8k.fsf@bsb.me.uk> <68fcbc3e-2320-463d-8cfc-bff6f4d04138@googlegroups.com> <36309d12-d08e-4817-b2e5-7d9b974f0fc0@googlegroups.com> <87lh08n2s3.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="4731"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BGXckCYDkunaSXZM6WBjP" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:NTEFv2nAs27K/VvpSNcEwws5M8U= sha1:aU9VfC0Ze6xzn6uv/lH5F51NKMU= Xref: csiph.com comp.lang.c:91892 BartC writes: > On 07/08/2016 22:32, Keith Thompson wrote: >> BartC writes: >> [...] >>> In the case of GC, that's 500 files of which half are .c or .h files. >>> Which ones do I need to compile for a Windows version? I don't know. >>> This apparently classified information is only known to Make (and >>> possibly only after running ./configure to make the makefile! I've >>> absolutely no idea what's going on. If it doesn't work, I'm ****ed) >> >> By GC, do you mean Boehm's garbage collection package? If so, the >> included README.QUICK file contains instructions for building on >> Windows. But the current distribution contains only 105 *.h and *.c >> files, not 500. > > It's Boehm GC. It turns out there were two different versions one inside > the other (probably due to .tar/.gz files being fiddly to unpack under > Windows). I deleted one version, but probably the wrong one as I got > nowhere with the make files. I downloaded http://www.hboehm.info/gc/gc_source/gc-7.4.4.tar.gz It does not have "two different versions one inside the other". I have no idea how you concluded that there are 500 .h and .c files; there are only 105. If unpacking *.tar.gz files is difficult under Windows, that's a pity; I suggest you either do something about it or complain to someone can. > If I reinstall the other 7.2 version, I can get somewhere if I use MSVC. > > (It produces gctest.exe and gc.lib. I don't know what that means at the > minute, and I don't use MSVC. To be useful to me I need .dll files in > 32-bit and 64-bit versions, and with C interfaces. There was a lot of > mention of C++ which doesn't bode well. > > But completing the make means I can see what files are involved and I > can try a manual build. Then I might be in a position to produce build > instructions in plain English that will work with any C compiler.) > > What's interesting however is that this NMAKE didn't need 'configure' to > work. So why does Linux need it? And what exactly DOES it do? > Apparently, nothing important! 20,000 pointless lines just as I thought. Ah, so you *did* get it to build on Windows. What are you still complaining about? Boehm's GC apparently is written in a way that you can build it with "nmake", and it doesn't need the "configure" script. As far as I can tell, nmake is available only on Windows, so I need to use either "configure" or some substitute to build Boehm's GC from source on my Linux system. autoconf, which generate the "configure" script, is an elaborate system that's designed to work with a variety of different systems. The Unix ecosystem used to be as lot more varied than it is now. The initial release was in 1991, when it wasn't even possible to assume an ANSI C compiler and standard library. It has a *lot* of code that checks for things like the return types of standard library functions -- checks that are no longer needed if you can assume C89 or better. Is it time to simplify autoconf so it doesn't worry about all that old stuff? Maybe -- but it does it all automatically so the extra work it does doesn't bother me. Perhaps trimming it down isn't worth the effort. Perhaps there are still enough variations in the real world that it's still sometimes necessary. So to support building Boehm's GC on Linux, it uses the same autoconf mechanism that's used for hundreds of other software packages. Setting it up is fairly straightforward for the maintainer and trivial for the end user. It works. Users who need to install it from source can type one or two commands to configure and install it. There's no reason for them to care that "configure" is doing some extra work that might no longer be necessary. >>> The one for GMP is elusive. (There is probably a version bundled within >>> gcc - which is for gcc's own use. But so what, downloading the right gcc >>> bundle in order to extract a single file is also a hassle.) >> >> No, gcc doesn't include a bundled version of gmp. It depends on it >> already being installed. > > gcc/TDM for Windows includes libgmp-3.dll. That's nice. I just Googled it. It's called "tdm-gcc", and it's "A compiler suite for 32- and 64-bit Windows based on the GNU toolchain". It's not just gcc. (I trust I don't need to explain yet again what "gcc" is and what it isn't.) gcc itself still doesn't include a bundled version of gmp. tdm-gcc apparently includes bundled versions of gcc, gmp, and other packages. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"