This week's VM build problem...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

This week's VM build problem...

Alan Grimes
Looking to update my workhorse VM with the current one, I sync'd my SVN
sources and did my usual routine. (with the SVN-provided configure
script), Here's the result.

bash-2.05b$ make
gawk -f /home/atg/source/trunk/platforms/unix/config/gnuify
/home/atg/source/trunk/src/vm/interp.c > gnu-interp.c.out
mv gnu-interp.c.out gnu-interp.c
gcc -g -O2 -fomit-frame-pointer -DLSB_FIRST=1  -DHAVE_CONFIG_H
-DSQUEAK_BUILTIN_PLUGIN -I/home/atg/source/trunk/bld
-I/home/atg/source/trunk/platforms/unix/vm
-I/home/atg/source/trunk/platforms/Cross/vm -I/home/
atg/source/trunk/platforms/Cross/vm
-I/home/atg/source/trunk/platforms/unix/vm
-I/home/atg/source/trunk/src/vm
-I/home/atg/source/trunk/platforms/Cross/plugins/FilePlugin
-I/home/atg/source/trunk/platforms/unix/p
lugins/B3DAcceleratorPlugin -I/home/atg/source/trunk/bld
-I/home/atg/source/trunk/platforms/unix/vm
-I/home/atg/source/trunk/platforms/Cross/vm   -c -o gnu-interp.o
gnu-interp.c
In file included from /home/atg/source/trunk/platforms/Cross/vm/sq.h:198,
                 from /home/atg/source/trunk/platforms/unix/vm/sqGnu.h:45,
                 from gnu-interp.c:8:
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:52:28:
sqMemoryAccess.h: No such file or directory
In file included from /home/atg/source/trunk/platforms/Cross/vm/sq.h:198,
                 from /home/atg/source/trunk/platforms/unix/vm/sqGnu.h:45,
                 from gnu-interp.c:8:
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:54: error:
parse error before "minHeapSize"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:55: error:
parse error before "sqGrowMemoryBy"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:55: error:
parse error before "oldLimit"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:55:
warning: data definition has no type or storage class
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:56: error:
parse error before "sqShrinkMemoryBy"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:56: error:
parse error before "oldLimit"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:56:
warning: data definition has no type or storage class
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:57: error:
parse error before "sqMemoryExtraBytesLeft"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:57: error:
parse error before "includingSwap"
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:57:
warning: data definition has no type or storage class
/home/atg/source/trunk/platforms/unix/vm/sqPlatformSpecific.h:67: error:
parse error before "sqInt"
make[1]: *** [gnu-interp.o] Error 1
make: *** [vm/vm.a] Error 2
bash-2.05b$

--

Someone forgot to check in sqMemoryAccess.h?

Reply | Threaded
Open this post in threaded view
|

Re: This week's VM build problem...

Ian Piumarta-3
On Mar 24, 2005, at 05:20, Alan Grimes wrote:

> Someone forgot to check in sqMemoryAccess.h?

I didn't think so, but here you go in case I did...

Ian

/* sqMemoryAccess.h -- memory accessors (and associated type
definitions)
  *
  * Author: [hidden email]
  *
  * Last edited: 2005-03-28 23:02:04 by piumarta on emilia.local
  */

/* Systematic use of the macros defined in this file within the
  * Interpreter, ObjectMemory and plugins will permit all four
  * combinations of 32/64-bit image and 32/64-bit host to compile and
  * run correctly.  (Code that uses explicit casts and/or integer
  * constants in arithmetic on object pointers will invariably fail in
  * at least one of the four possible combinations.)
  */

#ifndef __sqMemoryAccess_h
#define __sqMemoryAccess_h

#include "config.h"

#if defined(HAVE_INTERP_H)
# include "interp.h"
#else
# define SQ_VI_BYTES_PER_WORD 4 /* build a 32-bit VM */
# warning
# warning ***************************************************
# warning *
# warning * interp.h not found -- defaulting to a 32-bit VM
# warning *
# warning * update your image-side VM sources to the latest
# warning * version to avoid this message
# warning *
# warning ***************************************************
# warning
#endif

#if (SQ_VI_BYTES_PER_WORD == 4)
# define SQ_IMAGE32 1
#else
# define SQ_IMAGE64 1
#endif

#if (SIZEOF_VOID_P == 4)
# define SQ_HOST32 1
#elif (SIZEOF_VOID_P == 8)
# define SQ_HOST64 1
#else
# error host is neither 32- nor 64-bit?
#endif

#if defined(SQ_IMAGE32)
   typedef int sqInt;
   typedef unsigned int usqInt;
#elif defined(SQ_HOST64)
   typedef long sqInt;
   typedef unsigned long usqInt;
#else
# if (SIZEOF_LONG_LONG != 8)
#   error long long integers are not 64-bits wide?
# endif
   typedef long long sqInt;
   typedef unsigned long long usqInt;
#endif

#if defined(SQ_HOST64) && defined(SQ_IMAGE32)
   extern char *sqMemoryBase;
# define SQ_FAKE_MEMORY_OFFSET 16 // (1*1024*1024) /* nonzero to debug
addr xlation */
#else
# define sqMemoryBase ((char *)0)
#endif

static inline sqInt byteAtPointer(char *ptr) { return
(sqInt)(*((unsigned char *)ptr)); }
static inline sqInt byteAtPointerput(char *ptr, int val) { return
(sqInt)(*((unsigned char *)ptr)= (unsigned char)val); }
static inline sqInt shortAtPointer(char *ptr) { return
(sqInt)(*((short *)ptr)); }
static inline sqInt shortAtPointerput(char *ptr, int val) { return
(sqInt)(*((short *)ptr)= (short)val); }
static inline sqInt intAtPointer(char *ptr) { return
(sqInt)(*((unsigned int *)ptr)); }
static inline sqInt intAtPointerput(char *ptr, int val) { return
(sqInt)(*((unsigned int *)ptr)= (int)val); }
static inline sqInt longAtPointer(char *ptr) { return
(sqInt)(*((sqInt *)ptr)); }
static inline sqInt longAtPointerput(char *ptr, sqInt val) { return
(sqInt)(*((sqInt *)ptr)= (sqInt)val); }
static inline sqInt oopAtPointer(char *ptr) { return (sqInt)(*((sqInt
*)ptr)); }
static inline sqInt oopAtPointerput(char *ptr, sqInt val) { return
(sqInt)(*((sqInt *)ptr)= (sqInt)val); }

static inline char *pointerForOop(sqInt oop) { return sqMemoryBase +
oop; }
static inline sqInt oopForPointer(char *ptr) { return (sqInt)(ptr -
sqMemoryBase); }

static inline sqInt byteAt(sqInt oop) { return
byteAtPointer(pointerForOop(oop)); }
static inline sqInt byteAtput(sqInt oop, int val) { return
byteAtPointerput(pointerForOop(oop), val); }
static inline sqInt shortAt(sqInt oop) { return
shortAtPointer(pointerForOop(oop)); }
static inline sqInt shortAtput(sqInt oop, int val) { return
shortAtPointerput(pointerForOop(oop), val); }
static inline sqInt intAt(sqInt oop) { return
intAtPointer(pointerForOop(oop)); }
static inline sqInt intAtput(sqInt oop, int val) { return
intAtPointerput(pointerForOop(oop), val); }
static inline sqInt longAt(sqInt oop) { return
longAtPointer(pointerForOop(oop)); }
static inline sqInt longAtput(sqInt oop, sqInt val) { return
longAtPointerput(pointerForOop(oop), val); }
static inline sqInt oopAt(sqInt oop) { return
oopAtPointer(pointerForOop(oop)); }
static inline sqInt oopAtput(sqInt oop, sqInt val) { return
oopAtPointerput(pointerForOop(oop), val); }

#define long32At intAt
#define long32Atput intAtput

/* platform-dependent float conversion macros */
/* Note: Second argument must be a variable name, not an expression! */
/* Note: Floats in image are always in PowerPC word order; change
    these macros to swap words if necessary. This costs no extra and
    obviates sometimes having to word-swap floats when reading an image.
*/
#if defined(DOUBLE_WORD_ALIGNMENT) || defined(DOUBLE_WORD_ORDER)
/* this is to allow strict aliasing assumption in the optimizer */
typedef union { double d; int i[sizeof(double) / sizeof(int)]; }
_swapper;
# ifdef DOUBLE_WORD_ORDER
/* word-based copy with swapping for non-PowerPC order */
#   define storeFloatAtPointerfrom(intPointerToFloat, floatVarName) \
        *((int *)(intPointerToFloat) + 0) = ((_swapper
*)(&floatVarName))->i[1]; \
        *((int *)(intPointerToFloat) + 1) = ((_swapper
*)(&floatVarName))->i[0];
#   define fetchFloatAtPointerinto(intPointerToFloat, floatVarName) \
        ((_swapper *)(&floatVarName))->i[1] = *((int *)(intPointerToFloat) +
0); \
        ((_swapper *)(&floatVarName))->i[0] = *((int *)(intPointerToFloat) +
1);
# else /*!DOUBLE_WORD_ORDER*/
/* word-based copy for machines with alignment restrictions */
#   define storeFloatAtPointerfrom(intPointerToFloat, floatVarName) \
        *((int *)(intPointerToFloat) + 0) = ((_swapper
*)(&floatVarName))->i[0]; \
        *((int *)(intPointerToFloat) + 1) = ((_swapper
*)(&floatVarName))->i[1];
#   define fetchFloatAtPointerinto(intPointerToFloat, floatVarName) \
        ((_swapper *)(&floatVarName))->i[0] = *((int *)(intPointerToFloat) +
0); \
        ((_swapper *)(&floatVarName))->i[1] = *((int *)(intPointerToFloat) +
1);
# endif /*!DOUBLE_WORD_ORDER*/
#else /*!(DOUBLE_WORD_ORDER||DOUBLE_WORD_ALIGNMENT)*/
/* for machines that allow doubles to be on any word boundary */
# define storeFloatAtPointerfrom(i, floatVarName) \
        *((double *) (i)) = (floatVarName);
# define fetchFloatAtPointerinto(i, floatVarName) \
        (floatVarName) = *((double *) (i));
#endif

#define storeFloatAtfrom(i,
floatVarName) storeFloatAtPointerfrom(pointerForOop(i), floatVarName)
#define fetchFloatAtinto(i,
floatVarName) fetchFloatAtPointerinto(pointerForOop(i), floatVarName)


/* This doesn't belong here, but neither do 'self flag: ...'s belong in
the image. */

static void inline flag(char *ignored) {}


#endif /* __sqMemoryAccess_h */