runtimejs / runtime

[not maintained] Lightweight JavaScript library operating system for the cloud
http://runtimejs.org
Apache License 2.0
1.93k stars 128 forks source link

fasm: command not found #20

Closed groundwater closed 10 years ago

groundwater commented 10 years ago

Not really sure how to download this. Found fast assembler I'm not really sure what to do next.

jacob-mbp:runtime jacob$ PATH=/Users/jacob/xcc/bin:$PATH scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
fasm src/ap_startup.asm src/ap_startup.asm_o >/dev/null
sh: fasm: command not found
fasm src/startup.asm src/startup.asm_o >/dev/null
sh: fasm: command not found
fasm src/kernel/x64/irq-vectors-x64.asm src/kernel/x64/irq-vectors-x64.asm_o >/dev/null
sh: fasm: command not found
scons: *** [src/ap_startup.asm_o] Error 127
[host] Build test/hostcc/test-host.host
scons: *** [src/startup.asm_o] Error 127
scons: *** [src/kernel/x64/irq-vectors-x64.asm_o] Error 127
scons: building terminated because of errors.
jacob-mbp:runtime jacob$ 
iefserge commented 10 years ago

Unfortunately, fasm is not supported on OSX officially AFAIK and outputs error

error:out of memory.

But there is a patch that fixes this bug on OSX.

Patch:

--- a/source/libc/system.inc    2011-07-24 00:42:00.000000000 +0200
+++ b/source/libc/system.inc    2011-09-21 23:03:12.000000000 +0200
@@ -91,7 +91,9 @@
    stos    byte [edi]
    or  al,al
    jnz copy_path
-   cmp edi,buffer+1000h
+   mov eax,buffer
+   add eax,1000h
+   cmp edi,eax
    ja  out_of_memory
    ret
 create:

Or you can download precompiled version here: https://github.com/runtimejs/toolchain-bin-linux/raw/master/fasm-osx.zip (from http://board.flatassembler.net/topic.php?p=144779#144779) Just put fasm binary into PATH.

It may be a good idea to switch to other assembler at some point because of this.

heapwolf commented 10 years ago

Adding to the wiki