<br><br><div class="gmail_quote">On Wed, Dec 8, 2010 at 12:30 AM, Aleksej Saushev <span dir="ltr"><<a href="mailto:asau@inbox.ru">asau@inbox.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hello!<br>
<br>
Types are inconsistent along the source, does Cog VM work on LP64 platforms?<br></blockquote><div><br></div><div>Please read unixbuild/HowToBuild:</div><div><br></div><div>3d. If you're building the VM on a 64-bit OS, you'll need a compiler which can</div>
<div>compile and link to 32-bit binaries. On most Linuxes the gcc-multilib package</div><div>provides the 32-bit compiler and the ia32-libs provides the 32-bit libraries.</div><div>You'll also have to add the -m32 switch to all gcc & g++ invocations. The</div>
<div>easiest way to do this is to add CC="gcc -m32" & CXX="g++ -m32" to the configure</div><div>script:</div><div> ../../platforms/unix/config/configure CC="gcc -m32" CXX="g++ -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread</div>
<div>To run a 32-bit VM on a 64-bit OS, you'll also need the 32-bit libraries</div><div>provided by the ia32-libs package.</div><div><br></div><div><br></div><div>According to Paul DeBruicker the following packages need to be installed to</div>
<div>compile in 32-bt mode on 64-bit ubuntu. YMMV.</div><div><br></div><div>lib32asound2-dev</div><div>libgl1-mesa-dev</div><div>libglu1-mesa-dev</div><div>build-essential</div><div>ia32-libs</div><div>gcc-multilib</div>
<div>g++multilib</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I need this to make it build on NetBSD/i386:<br>
<br>
--- platforms/unix/plugins/SoundPlugin/sqUnixSound.c.orig 2010-12-07 17:40:51.000000000 +0000<br>
+++ platforms/unix/plugins/SoundPlugin/sqUnixSound.c<br>
@@ -99,12 +99,12 @@ int snd_AvailableSpace(void)<br>
return snd->snd_AvailableSpace();<br>
}<br>
<br>
-int snd_InsertSamplesFromLeadTime(int frameCount, int srcBufPtr, int samplesOfLeadTime)<br>
+sqInt snd_InsertSamplesFromLeadTime(sqInt frameCount, void *srcBufPtr, sqInt samplesOfLeadTime)<br>
{<br>
return snd->snd_InsertSamplesFromLeadTime(frameCount, srcBufPtr, samplesOfLeadTime);<br>
}<br>
<br>
-int snd_PlaySamplesFromAtLength(int frameCount, int arrayIndex, int startIndex)<br>
+sqInt snd_PlaySamplesFromAtLength(sqInt frameCount, void *arrayIndex, sqInt startIndex)<br>
{<br>
return snd->snd_PlaySamplesFromAtLength(frameCount, arrayIndex, startIndex);<br>
}<br>
@@ -141,7 +141,7 @@ double snd_GetRecordingSampleRate(void)<br>
return snd->snd_GetRecordingSampleRate();<br>
}<br>
<br>
-int snd_RecordSamplesIntoAtLength(int buf, int startSliceIndex, int bufferSizeInBytes)<br>
+sqInt snd_RecordSamplesIntoAtLength(void *buf, sqInt startSliceIndex, sqInt bufferSizeInBytes)<br>
{<br>
return snd->snd_RecordSamplesIntoAtLength(buf, startSliceIndex, bufferSizeInBytes);<br>
}<br>
@@ -150,7 +150,7 @@ int snd_RecordSamplesIntoAtLength(int bu<br>
<br>
void snd_Volume(double *left, double *right) { snd->snd_Volume(left, right); }<br>
void snd_SetVolume(double left, double right) { snd->snd_SetVolume(left, right); }<br>
-int snd_SetRecordLevel(int level) { return snd->snd_SetRecordLevel(level); }<br>
+void snd_SetRecordLevel(sqInt level) { return snd->snd_SetRecordLevel(level); }<br>
int snd_GetSwitch(int id, int captureFlag, int channel) { return snd->snd_GetSwitch(id, captureFlag, channel); }<br>
int snd_SetSwitch(int id, int captureFlag, int parameter) { return snd->snd_SetSwitch(id, captureFlag, parameter); }<br>
int snd_SetDevice(int id, char *name) { return snd->snd_SetDevice(id, name); }<br>
--- src/vm/gcc3x-cointerp.c.orig 2010-12-07 18:00:09.000000000 +0000<br>
+++ src/vm/gcc3x-cointerp.c<br>
@@ -975,7 +975,7 @@ sqInt quickPrimitiveInstVarIndexFor(sqIn<br>
sqInt rawHeaderOf(sqInt methodPointer);<br>
void rawHeaderOfput(sqInt methodOop, void *cogMethod);<br>
sqInt readableFormat(sqInt imageVersion);<br>
-sqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, sqInt desiredHeapSize, squeakFileOffsetType imageOffset);<br>
+sqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset);<br>
sqInt remap(sqInt oop);<br>
static sqInt removeFirstLinkOfList(sqInt aList);<br>
EXPORT(sqInt) removeGCRoot(sqInt *varLoc);<br>
@@ -37959,7 +37959,7 @@ readableFormat(sqInt imageVersion) {<br>
*/<br>
<br>
sqInt<br>
-readImageFromFileHeapSizeStartingAt(sqImageFile f, sqInt desiredHeapSize, squeakFileOffsetType imageOffset) {<br>
+readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset) {<br>
DECL_MAYBE_SQ_GLOBAL_STRUCT<br>
sqInt anObject;<br>
sqInt aValue;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
HE CE3OH...<br>
</font></blockquote></div><br>