[htdig] compile error - alloca is undefined

Jill Gemmill (JGemmill@uab.edu)
Wed, 12 May 1999 09:19:13 -0500

Here's the error message:

CC -o htfuzzy -L../htlib -L../htcommon -L../db/dist -L/usr/lib Endings.o Endings
DB.o Exact.o Fuzzy.o Metaphone.o Soundex.o SuffixEntry.o Synonym.o htfuzzy.o
Substring.o Prefix.o ../htcommon/libcommon.a ../htlib/libht.a ../db/dist/libdb
.a -lnsl -lsocket
Undefined first referenced
 symbol in file
alloca ../htlib/libht.a(regex.o)
ld: fatal: Symbol referencing errors. No output written to htfuzzy
*** Error code 1

A quick scan through regex.c shows the following:
        alloca is defined for AIX (doesn't happen: this is solaris 2.5.1)
        furthur down: "Should we use malloc or alloca? If REGEX_MALLOC is not defined,
   use `alloca' instead of `malloc'"
                REGEX_MALLOC is obviously not defined, since we drop into the "else" section

# ifndef alloca

/* Make alloca work the best possible way. */
# ifdef __GNUC__
# define alloca __builtin_alloca
# else /* not __GNUC__ */
# include <alloca.h>
# endif /* HAVE_ALLOCA_H */
# endif /* not __GNUC__ */

there is no alloca.h to be found anywhere in this distribution. I believe we
use Sun's compilers rather than gnu.

Any suggestions on what to do here? (please reply to me directly as well as to
list). thanks.

      Jill Gemmill

To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Wed May 12 1999 - 07:29:30 PDT