List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 1 1999 10:55pm
Subject:Compile of mysql-3.22.23b fails on Unixware 7.X
View as plain text  
>>>>> "Orion" == Orion Poplawski <orion@stripped> writes:

Orion> I get the following compile error when compiling mysql-3.22.23b
Orion> on UnixWare 7.0.1 and 7.1.0 with the UDK (native) compiler:

Orion> CC -Kthread -DUNIXWARE_7 -DUNDEF_THREADS_HACK -I./../include -I../include     
> -I./.. -I.. -I..    -O   -DDBUG_OFF -D_FILE_OFFSET_BITS=64 -c mysql.cc
Orion> "mysql.cc", line 1231: error: identifier "alloca" is undefined
Orion>     num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
Orion>                      ^
Orion> I can work around it by undefining HAVE_ALLOCA for C++ in config.h
Orion> as follows:

Orion> /* Define if you have alloca, as a function or macro.  */
Orion> #ifndef __cplusplus
Orion> #define HAVE_ALLOCA 1
Orion> #endif

Orion> __cplusplus is the tag defined by the Unixware C++ compiler.

Orion> configure was run straight with no options.

Hi!

The problem is probably that the C compiler supports alloca, but the
C++ compiler doesn't.

You may also be able to fix this by configuring with:

CXXFLAGS=-DNO_CPLUSPLUS_ALLOCA ./configure ...

Regards,
Monty
Thread
Compile of mysql-3.22.23b fails on Unixware 7.XOrion Poplawski2 Jul
  • Compile of mysql-3.22.23b fails on Unixware 7.XMichael Widenius2 Jul
  • Re: Compile of mysql-3.22.23b fails on Unixware 7.X801) 250-O795 Work2 Jul