Re: [fonc] Compiling COLA on x86_64

2013-10-21 Thread Simon Forman
On 10/20/2013 at 9:38 AM, Ian Piumarta i...@vpri.org wrote:

Simon,

Sorry for the slightly late fixes.  Please svn update your idst 
sources and then make clean in the top-level directory.

On 32-bit Linux make sure you have the packages libreadline-dev 
and execstack installed.
Then type make in the top-level directory.
This will build the st80 libraries for id, the idst compiler 'idc' 
and Jolt.

On 64-bit Linux make sure you have the packages lib32readline6-dev 
(or similar) and execstack installed.
Then type make TARGET=x86_32-pc-linux in the top-level directory.
This will build the st80 libraries for id, the idst compiler 'idc' 
and a 32-bit version of Jolt that can execute its own dynamic code 
on a 64-bit Linux system.

If your Linux does not install execstack in /usr/sbin you may have 
to tweak function/jolt-burg/Makefile in the obvious way.

The VPU version of Jolt is no longer built by default, so...
'cd' to function/jolt-burg and then type ./main.
At the prompt, typing 
(+ 3 4) should give you back a 7.

I've tested this on 32- and 64-bit versions of Linux Mint.

Hope that helps.

(We are certainly not alone in thinking the compiler should be 
part of many a language runtime system. :)

Regards,
Ian


Thank you so much Ian!  I installed lib32readline6-dev and execstack and the 
updated code compiled fine. :)  This is awesome.
Cheers,
~Simon

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-20 Thread Ian Piumarta
Simon,

Sorry for the slightly late fixes.  Please svn update your idst sources and 
then make clean in the top-level directory.

On 32-bit Linux make sure you have the packages libreadline-dev and execstack 
installed.
Then type make in the top-level directory.
This will build the st80 libraries for id, the idst compiler 'idc' and Jolt.

On 64-bit Linux make sure you have the packages lib32readline6-dev (or similar) 
and execstack installed.
Then type make TARGET=x86_32-pc-linux in the top-level directory.
This will build the st80 libraries for id, the idst compiler 'idc' and a 32-bit 
version of Jolt that can execute its own dynamic code on a 64-bit Linux system.

If your Linux does not install execstack in /usr/sbin you may have to tweak 
function/jolt-burg/Makefile in the obvious way.

The VPU version of Jolt is no longer built by default, so...
'cd' to function/jolt-burg and then type ./main.
At the prompt, typing 
(+ 3 4) should give you back a 7.

I've tested this on 32- and 64-bit versions of Linux Mint.

Hope that helps.

(We are certainly not alone in thinking the compiler should be part of many a 
language runtime system. :)

Regards,
Ian

On Oct 18, 2013, at 18:44 , Simon Forman wrote:

 On 10/12/2013 at 2:12 PM, Ian Piumarta i...@vpri.org wrote:
 
 I will set up a 64-bit Ubuntu VirtualBox and fix whatever is 
 broken.  If I haven't done this by midweek then please do feel 
 free to remind me.
 
 It will all have to run in 32 bits, though, since there is no 64-
 bit code generator for idst/jolt.  It should be possible to do 
 this within a 64-bit environment.
 
 No rush. I'm just tinkering. :)  I tried a couple of simple things but I 
 don't really know what I'm doing and none of it worked.  It's been a long 
 time since I've worked with C.
 
 From what I understand of how the COLA works I'm really blown away.  The VPU 
 alone is very impressive.  I'm beginning to think that anyone who isn't using 
 a COLA-style self-hosted system (with native code compilation!) is just 
 punishing themselves.

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-20 Thread Karl
On Sunday, October 20, 2013 09:37:54 AM Ian Piumarta wrote:
 On 64-bit Linux make sure you have the packages lib32readline6-dev (or 
 similar) 
and execstack installed.
 Then type make TARGET=x86_32-pc-linux in the top-level directory.
 This will build the st80 libraries for id, the idst compiler 'idc' and a 
 32-bit version of 
Jolt that can execute its own dynamic code on a 64-bit Linux system.
 
 If your Linux does not install execstack in /usr/sbin you may have to tweak 
function/jolt-burg/Makefile in the obvious way.
 
 The VPU version of Jolt is no longer built by default, so...
 'cd' to function/jolt-burg and then type ./main.
 At the prompt, typing 
 (+ 3 4) should give you back a 7.
 
 I've tested this on 32- and 64-bit versions of Linux Mint.
 
 Hope that helps.
 
 (We are certainly not alone in thinking the compiler should be part of many a 
language runtime system. :)
 
 Regards,
 Ian


Thanks for the fix.  It works on Fedora 19 using the readline-devel.i686 
package and 
changing the execstack path to /usr/bin/.

The wiki mentions a Git mirror at git://fig.org, but this has been unreachable 
over the 
last 24 hours.  When was the last time anyone used this mirror?


-Karl
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-18 Thread Simon Forman
On 10/12/2013 at 2:12 PM, Ian Piumarta i...@vpri.org wrote:

Simon,

Sorry for the late intervention.  The error is from a missing math 
library (-lm in the link command) which contains the sin() 
function.

I will set up a 64-bit Ubuntu VirtualBox and fix whatever is 
broken.  If I haven't done this by midweek then please do feel 
free to remind me.

It will all have to run in 32 bits, though, since there is no 64-
bit code generator for idst/jolt.  It should be possible to do 
this within a 64-bit environment.

FWIW, I believe all Intel (and AMD) descendants of 8086 implement 
I/D cache coherency in hardware and so iflush() is a no-op.  But 
the symlink is not quite the right approach anyway.  We'll do 
better by persuading the code that it is being compiled for x86.

Regards,
Ian



No rush. I'm just tinkering. :)  I tried a couple of simple things but I don't 
really know what I'm doing and none of it worked.  It's been a long time since 
I've worked with C.

From what I understand of how the COLA works I'm really blown away.  The VPU 
alone is very impressive.  I'm beginning to think that anyone who isn't using 
a COLA-style self-hosted system (with native code compilation!) is just 
punishing themselves.

Warm regards,
~Simon


On Oct 12, 2013, at 13:49 , Simon Forman wrote:

 On 10/10/2013 at 6:22 PM, John Carlson yottz...@gmail.com 
wrote:
 
 Or just copy the i386 file to name it's expecting.
 On Oct 10, 2013 8:18 PM, John Carlson yottz...@gmail.com 
wrote:
 
 Symlink might help
 
 I tried a symlink but that didn't get any further.  It asked me 
to please implement iflush() :D
 
 ./idc -g -k -I../objects -c CodeGenerator-local.st -o 
CodeGenerator-local.o
 In file included from asm-common.h:33:0,
 from asm-i386.h:37,
 from CodeGenerator-local.o.c:2218:
 asm-cache.h:143:3: error: #error : please implement iflush() for 
your architecture,
 asm-cache.h:144:3: error: #error : and EMAIL THE CODE to: 
ian.piuma...@inria.fr
 
 I wish I could. :)
 
 I created a 32-bit virtual machine and tried compiling and got 
the following error message (also attached in case it gets mangled 
by email):
 
 sforman@idst32:~/idst$ make
 /bin/sh -ec 'for dir in object function; do ( cd $dir; make ); 
done'
 make[1]: Entering directory `/home/sforman/idst/object'
 /bin/sh -ec '( cd st80; make IDC=../boot/idc -B../boot/ -O 
BIN=../stage1/ )'
 make[2]: Entering directory `/home/sforman/idst/object/st80'
 ../boot/idc -B../boot/ -O  -k -c _object.st -o 
../stage1/_object.o
 /home/sforman/idst/object/st80/../boot/st80.so: 
/home/sforman/idst/object/st80/../boot/st80.so: undefined symbol: 
sin
 
 import: st80.so: No such file or directory
 
 make[2]: *** [../stage1/_object.o] Error 1
 make[2]: Leaving directory `/home/sforman/idst/object/st80'
 make[1]: *** [stage1/st80.so] Error 2
 make[1]: Leaving directory `/home/sforman/idst/object'
 make: *** [all] Error 2
 
 
 
 I'm guessing the undefined symbol: sin is causing the failure 
to import st80.so..?
 
 
 Any advice would be welcome. :)
 
 -- 
 
 
 
 The history of mankind for the last four centuries is rather 
like that of
 an imprisoned sleeper, stirring clumsily and uneasily while the 
prison that
 restrains and shelters him catches fire, not waking but 
incorporating the
 crackling and warmth of the fire with ancient and incongruous 
dreams, than
 like that of a man consciously awake to danger and opportunity.
 --H. P. Wells, A Short History of the Worldmake-
error.text___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc

-- 
http://twitter.com/SimonForman
My blog: http://firequery.blogspot.com/
Also my blog: http://calroc.blogspot.com/



The history of mankind for the last four centuries is rather like that of
an imprisoned sleeper, stirring clumsily and uneasily while the prison that
restrains and shelters him catches fire, not waking but incorporating the
crackling and warmth of the fire with ancient and incongruous dreams, than
like that of a man consciously awake to danger and opportunity.
--H. P. Wells, A Short History of the World

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-12 Thread Simon Forman
On 10/10/2013 at 6:22 PM, John Carlson yottz...@gmail.com wrote:

Or just copy the i386 file to name it's expecting.
On Oct 10, 2013 8:18 PM, John Carlson yottz...@gmail.com wrote:

 Symlink might help

I tried a symlink but that didn't get any further.  It asked me to please 
implement iflush() :D

./idc -g -k -I../objects -c CodeGenerator-local.st -o CodeGenerator-local.o
In file included from asm-common.h:33:0,
 from asm-i386.h:37,
 from CodeGenerator-local.o.c:2218:
asm-cache.h:143:3: error: #error : please implement iflush() for your 
architecture,
asm-cache.h:144:3: error: #error : and EMAIL THE CODE to: ian.piuma...@inria.fr

I wish I could. :)

I created a 32-bit virtual machine and tried compiling and got the following 
error message (also attached in case it gets mangled by email):

sforman@idst32:~/idst$ make
/bin/sh -ec 'for dir in object function; do ( cd $dir; make ); done'
make[1]: Entering directory `/home/sforman/idst/object'
/bin/sh -ec '( cd st80; make IDC=../boot/idc -B../boot/ -O BIN=../stage1/ )'
make[2]: Entering directory `/home/sforman/idst/object/st80'
../boot/idc -B../boot/ -O  -k -c _object.st -o ../stage1/_object.o
/home/sforman/idst/object/st80/../boot/st80.so: 
/home/sforman/idst/object/st80/../boot/st80.so: undefined symbol: sin

import: st80.so: No such file or directory

make[2]: *** [../stage1/_object.o] Error 1
make[2]: Leaving directory `/home/sforman/idst/object/st80'
make[1]: *** [stage1/st80.so] Error 2
make[1]: Leaving directory `/home/sforman/idst/object'
make: *** [all] Error 2



I'm guessing the undefined symbol: sin is causing the failure to import 
st80.so..?


Any advice would be welcome. :)

-- 



The history of mankind for the last four centuries is rather like that of
an imprisoned sleeper, stirring clumsily and uneasily while the prison that
restrains and shelters him catches fire, not waking but incorporating the
crackling and warmth of the fire with ancient and incongruous dreams, than
like that of a man consciously awake to danger and opportunity.
--H. P. Wells, A Short History of the World

make-error.text
Description: Binary data
___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-12 Thread Ian Piumarta
Simon,

Sorry for the late intervention.  The error is from a missing math library (-lm 
in the link command) which contains the sin() function.

I will set up a 64-bit Ubuntu VirtualBox and fix whatever is broken.  If I 
haven't done this by midweek then please do feel free to remind me.

It will all have to run in 32 bits, though, since there is no 64-bit code 
generator for idst/jolt.  It should be possible to do this within a 64-bit 
environment.

FWIW, I believe all Intel (and AMD) descendants of 8086 implement I/D cache 
coherency in hardware and so iflush() is a no-op.  But the symlink is not quite 
the right approach anyway.  We'll do better by persuading the code that it is 
being compiled for x86.

Regards,
Ian

On Oct 12, 2013, at 13:49 , Simon Forman wrote:

 On 10/10/2013 at 6:22 PM, John Carlson yottz...@gmail.com wrote:
 
 Or just copy the i386 file to name it's expecting.
 On Oct 10, 2013 8:18 PM, John Carlson yottz...@gmail.com wrote:
 
 Symlink might help
 
 I tried a symlink but that didn't get any further.  It asked me to please 
 implement iflush() :D
 
 ./idc -g -k -I../objects -c CodeGenerator-local.st -o CodeGenerator-local.o
 In file included from asm-common.h:33:0,
 from asm-i386.h:37,
 from CodeGenerator-local.o.c:2218:
 asm-cache.h:143:3: error: #error : please implement iflush() for your 
 architecture,
 asm-cache.h:144:3: error: #error : and EMAIL THE CODE to: 
 ian.piuma...@inria.fr
 
 I wish I could. :)
 
 I created a 32-bit virtual machine and tried compiling and got the following 
 error message (also attached in case it gets mangled by email):
 
 sforman@idst32:~/idst$ make
 /bin/sh -ec 'for dir in object function; do ( cd $dir; make ); done'
 make[1]: Entering directory `/home/sforman/idst/object'
 /bin/sh -ec '( cd st80; make IDC=../boot/idc -B../boot/ -O BIN=../stage1/ 
 )'
 make[2]: Entering directory `/home/sforman/idst/object/st80'
 ../boot/idc -B../boot/ -O  -k -c _object.st -o ../stage1/_object.o
 /home/sforman/idst/object/st80/../boot/st80.so: 
 /home/sforman/idst/object/st80/../boot/st80.so: undefined symbol: sin
 
 import: st80.so: No such file or directory
 
 make[2]: *** [../stage1/_object.o] Error 1
 make[2]: Leaving directory `/home/sforman/idst/object/st80'
 make[1]: *** [stage1/st80.so] Error 2
 make[1]: Leaving directory `/home/sforman/idst/object'
 make: *** [all] Error 2
 
 
 
 I'm guessing the undefined symbol: sin is causing the failure to import 
 st80.so..?
 
 
 Any advice would be welcome. :)
 
 -- 
 
 
 
 The history of mankind for the last four centuries is rather like that of
 an imprisoned sleeper, stirring clumsily and uneasily while the prison that
 restrains and shelters him catches fire, not waking but incorporating the
 crackling and warmth of the fire with ancient and incongruous dreams, than
 like that of a man consciously awake to danger and opportunity.
 --H. P. Wells, A Short History of the 
 Worldmake-error.text___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


[fonc] Compiling COLA on x86_64

2013-10-10 Thread Simon Forman
I checked out COLA from http://piumarta.com/svn2/idst/trunk and tried compiling 
but I encountered an error.

cp -p CodeGenerator-x86_64.st CodeGenerator-local.st
cp: cannot stat `CodeGenerator-x86_64.st': No such file or directory

There are CodeGenerator-*.st files for arm, i386, and ppc.

Perhaps this is due to compiling on a 64-bit system (Ubuntu linux)?  Is there 
something simple I can do to the makefile to get it to work?  A define maybe?

Warm regards,
~Simon


-- 

The history of mankind for the last four centuries is rather like that of
an imprisoned sleeper, stirring clumsily and uneasily while the prison that
restrains and shelters him catches fire, not waking but incorporating the
crackling and warmth of the fire with ancient and incongruous dreams, than
like that of a man consciously awake to danger and opportunity.
--H. P. Wells, A Short History of the World

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-10 Thread John Carlson
Symlink might help
On Oct 10, 2013 8:15 PM, Simon Forman sfor...@hushmail.com wrote:

 I checked out COLA from http://piumarta.com/svn2/idst/trunk and tried
 compiling but I encountered an error.

 cp -p CodeGenerator-x86_64.st CodeGenerator-local.st
 cp: cannot stat `CodeGenerator-x86_64.st': No such file or directory

 There are CodeGenerator-*.st files for arm, i386, and ppc.

 Perhaps this is due to compiling on a 64-bit system (Ubuntu linux)?  Is
 there something simple I can do to the makefile to get it to work?  A
 define maybe?

 Warm regards,
 ~Simon


 --

 The history of mankind for the last four centuries is rather like that of
 an imprisoned sleeper, stirring clumsily and uneasily while the prison that
 restrains and shelters him catches fire, not waking but incorporating the
 crackling and warmth of the fire with ancient and incongruous dreams, than
 like that of a man consciously awake to danger and opportunity.
 --H. P. Wells, A Short History of the World

 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc

___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc


Re: [fonc] Compiling COLA on x86_64

2013-10-10 Thread John Carlson
Or just copy the i386 file to name it's expecting.
On Oct 10, 2013 8:18 PM, John Carlson yottz...@gmail.com wrote:

 Symlink might help
 On Oct 10, 2013 8:15 PM, Simon Forman sfor...@hushmail.com wrote:

 I checked out COLA from http://piumarta.com/svn2/idst/trunk and tried
 compiling but I encountered an error.

 cp -p CodeGenerator-x86_64.st CodeGenerator-local.st
 cp: cannot stat `CodeGenerator-x86_64.st': No such file or directory

 There are CodeGenerator-*.st files for arm, i386, and ppc.

 Perhaps this is due to compiling on a 64-bit system (Ubuntu linux)?  Is
 there something simple I can do to the makefile to get it to work?  A
 define maybe?

 Warm regards,
 ~Simon


 --

 The history of mankind for the last four centuries is rather like that of
 an imprisoned sleeper, stirring clumsily and uneasily while the prison
 that
 restrains and shelters him catches fire, not waking but incorporating the
 crackling and warmth of the fire with ancient and incongruous dreams, than
 like that of a man consciously awake to danger and opportunity.
 --H. P. Wells, A Short History of the World

 ___
 fonc mailing list
 fonc@vpri.org
 http://vpri.org/mailman/listinfo/fonc


___
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc