Menu

#63 IRIX compile error (GCC 3.4.0)

open
nobody
None
5
2005-11-15
2005-11-15
No

This was an attempt to compile Pixie 1.5.4 on a Silicon
Graphics O2 running IRIX 6.5.22 using the GCC 3.4.0
compiler (no MIPSPro). ./configure runs without error,
gmake was run and throws the following:

... <all is well until>...

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I.. -g -O2 -MT
delayed.lo -MD -MP -MF .deps/delayed.Tpo -c delayed.cpp
-DPIC -o .libs/delayed.o
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I.. -g -O2 -MT
delayed.lo -MD -MP -MF .deps/delayed.Tpo -c delayed.cpp
-o delayed.o >/dev/null 2>&1
if /bin/sh ../../libtool --mode=compile g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I.. -g -O2 -MT
depository.lo -MD -MP -MF ".deps/depository.Tpo" -c -o
depository.lo depository.cpp; \ then mv -f ".deps/depository.Tpo"
".deps/depository.Plo"; else rm -f
".deps/depository.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I.. -g -O2 -MT
depository.lo -MD -MP -MF .deps/depository.Tpo -c
depository.cpp -DPIC -o .libs/depository.o
depository.cpp: In member function `void
CDepository::lookup(float*, const float*, const float*)':
depository.cpp:68: error: `alloca' undeclared (first
use this function)
depository.cpp:68: error: (Each undeclared identifier
is reported only once for each function it appears in.)
gmake[3]: *** [depository.lo] Error 1
gmake[3]: Leaving directory
`/usr/people/simonv/Pixie/src/ri'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/people/simonv/Pixie/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/people/simonv/Pixie'
gmake: *** [all] Error 2

Previous versions gave the same result.

Discussion

  • George Harker

    George Harker - 2005-11-16

    Logged In: YES
    user_id=995400

    Unfortunately, Pixie needs alloca() to compile. I don't
    know if it's available on IRIX or not - normally it would be
    in "alloca.h". A quick google suggested that there may be
    issues with alloca on IRIX. If you can provide any more
    information about which header the function is provided in
    (if it is at all) and what defines are present to detect
    IRIX, then perhaps a fix can be put in the code.

    Sorry to not be more helpful

    George

     
  • Simon Vannarath

    Simon Vannarath - 2005-11-17

    Logged In: YES
    user_id=1376448

    There is an alloca() and it is in /usr/include/alloca.h.

    Unfortunately I'm no programmer but I'll help in any way I
    can. It would be interesting to have Pixie working on an SGI
    machine. Here is what alloca.h contains:

    /* --------------------------------------------------------- */
    /* | Copyright (c) 1986, 1989 MIPS Computer Systems, Inc. | */
    /* | All Rights Reserved. | */
    /* --------------------------------------------------------- */
    /* $Header:
    /hosts/bonnie.mti/depot/cmplrs.src/v7.2+/include/RCS/alloca.h,v
    7.9 1993/07/17 01:51:32 rdahl Exp $ */
    #ifndef __ALLOCA_H
    #define __ALLOCA_H

    #ifdef __cplusplus
    extern "C" {
    #endif

    /*
    ** Synopsis
    ** #include <alloca.h>
    ** void *alloca(unsigned int);
    **
    ** Description
    ** alloca() is a built-in routine which allocates space in the
    ** local stack frame.
    **
    ** alloca() is faster than malloc(3), but not as portable,
    since not all
    ** systems have an alloca() routine..
    **
    ** There is no library routine alloca(), only the compiler
    built-in
    ** accessed using this header. Consequently, one *must* use
    this
    ** header file to access alloca().
    **
    ** Library versions of alloca() (such routines use malloc()
    internally)
    ** are available (in source) at no charge from various
    sources on USENET
    ** and the Internet.
    **
    ** Unlike malloc(), one never needs to free(3) space
    allocated with
    ** alloca(). Indeed, one must *not* free() space allocated by
    ** alloca(). Space allocated by alloca() is automatically
    ** freed when the function returns.
    */

    void *alloca(unsigned int);
    #define alloca __builtin_alloca

    #ifdef __cplusplus
    }
    #endif

    #endif

    Simon

     

Log in to post a comment.