[plt-scheme] 205 build trouble

From: Anton van Straaten (anton at appsolutions.com)
Date: Thu Oct 2 14:55:10 EDT 2003

Geoffrey Knauth wrote:
> I just did a download and successful build on GNU/Linux (RedHat 9),
> kernel 2.4.20-18.9, gcc 3.2.2, g++ 3.2.2.
> cd test/plt/src
> ./configure --prefix=/usr/local/plt --enable-shared
> make
> I notice my line for compiling Pen+Brush.cc is different from yours.
> This worked:
> g++ -c -I/usr/X11R6/include -I/usr/X11R6/include
> -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include
> -I./../../mzscheme/gc -I./../../wxxt/src/AIAI-include
> -I./../../wxxt/src -I./../../mred/wxme/ -I./../../mzscheme/include/
> -DWX_USE_LIBPNG -DWX_USE_LIBJPEG -Dwx_xt -Wall -g -O2 -MMD -I.
> -I./XWidgets ./GDI-Classes/Pen+Brush.cc  -fPIC -DPIC -o
> GDI-Classes/.libs/Pen+Brush.o
> Maybe you need -DOPERATOR_NEW_ARRAY?  Looking at configure line 4375,
> that's where I picked it up.  Try GCC 3.2.2 and see if the problem goes
> away.

Thank you!  I set CXXFLAGS to -DOPERATOR_NEW_ARRAY, re-ran configure, and
the build worked.  I probably do need to upgrade GCC.

I took a look at why configure doesn't define this value on its own.  Its
little test C program at line 4343, compiled with gcc 3.2.1, seems to
completely ignore the inline 'new' definitions.  Instead of returning 1 or 2
from 'new', it returns valid pointers.  Naturally, the returned pointers
aren't equal, so the program returns zero.  I assume this makes it look as
though both the new and new[] definitions are being correctly used - as
opposed to just one of them, I guess.  In fact, neither definition is used.
I haven't tried to dig through what configure does with this result, but I'm
assuming that's the cause.

I checked that both MSVC6 and cygwin's GCC 3.2 return 1 & 2 from the
respective 'new' invocations, so it's just 3.2.1 (or my installation of it)
that has this behavior.  In all cases, I compiled the test program with no


Posted on the users mailing list.