Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to compile #23

Closed
xen0bit opened this issue Jan 30, 2021 · 3 comments
Closed

Failing to compile #23

xen0bit opened this issue Jan 30, 2021 · 3 comments

Comments

@xen0bit
Copy link

xen0bit commented Jan 30, 2021

remy@DESKTOP-O6A3FTL:/mnt/c/Users/Matt/halfix$ node makefile.js emscripten release
[
  '-lSDL',
  '-lSDLmain',
  '-lm',
  '-lz',
  '-s',
  'NO_FILESYSTEM=1',
  '-s',
  'TOTAL_MEMORY=256MB',
  '',
  '-s',
  'WASM=0'
]
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/pc.c -c -o build/objs/94-pc-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/util.c -c -o build/objs/94-util-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/state.c -c -o build/objs/94-state-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/io.c -c -o build/objs/94-io-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/display.c -c -o build/objs/94-display-1b228.o -Iincludeemcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/drive.c -c -o build/objs/94-drive-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/emscripten/emscripten.c -c -o build/objs/14h-emscripten-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/ini.c -c -o build/objs/94-ini-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/host/net-none.c -c -o build/objs/mt-net-none-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/access.c -c -o build/objs/jj-access-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/trace.c -c -o build/objs/jj-trace-1b228.o -Iincludeemcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/seg.c -c -o build/objs/jj-seg-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/cpu.c -c -o build/objs/jj-cpu-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/mmu.c -c -o build/objs/jj-mmu-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/ctrlflow.c -c -o build/objs/u8-ctrlflow-1b228.o -Iinclude
src/emscripten/emscripten.c:29:5: error: expected expression
    EM_ASM_({
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/smc.c -c -o build/objs/jj-smc-1b228.o -Iinclude
    ^
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/decoder.c -c -o build/objs/jj-decoder-1b228.o -Iinclude
/usr/share/emscripten/system/include/emscripten/emscripten.h:97:71:emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/eflags.c -c -o build/objs/jj-eflags-1b228.o -Iinclude
 noteemcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/prot.c -c -o build/objs/jj-prot-1b228.o -Iinclude
: expanded emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/opcodes.c -c -o build/objs/jj-opcodes-1b228.o -Iinclude
from macro 'EM_ASM_'
#define EM_ASM_(code, ...) emscripten_asm_const_int(#code, __VA_ARGS__)
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/arith.c -c -o build/objs/u8-arith-1b228.o -Iinclude
                                                                      ^
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/io.c -c -o build/objs/u8-io-1b228.o -Iinclude
1 error generatedemcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/string.c -c -o build/objs/u8-string-1b228.o -Iinclude
.
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/stack.c -c -o build/objs/u8-stack-1b228.o -Iinclude
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/misc.c -c -o build/objs/u8-misc-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/bit.c -c -o build/objs/u8-bit-1b228.o -Iincludeemcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/softfloat.c -c -o build/objs/jj-softfloat-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/fpu.c -c -o build/objs/jj-fpu-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/cpu/ops/simd.c -c -o build/objs/u8-simd-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/dma.c -c -o build/objs/xx-dma-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/cmos.c -c -o build/objs/xx-cmos-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/pit.c -c -o build/objs/xx-pit-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/pic.c -c -o build/objs/xx-pic-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/kbd.c -c -o build/objs/xx-kbd-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/vga.c -c -o build/objs/xx-vga-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/ide.c -c -o build/objs/xx-ide-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/pci.c -c -o build/objs/xx-pci-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/apic.c -c -o build/objs/xx-apic-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/ioapic.c -c -o build/objs/xx-ioapic-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/fdc.c -c -o build/objs/xx-fdc-1b228.o -Iinclude
emcc -Wall -Wextra -Werror -std=gnu99 -DEMSCRIPTEN_BUILD -O3 src/hardware/acpi.c -c -o build/objs/xx-acpi-1b228.o -Iinclude
Failed to compile: src/emscripten/emscripten.c
40/41 compiled successfully!
src/emscripten/emscripten.c

Any help would be greatly appreciated. Anything as simple as "it's on my end" or "it's on your end"

Thanks

@nepx
Copy link
Owner

nepx commented Jan 31, 2021 via email

@xen0bit
Copy link
Author

xen0bit commented Feb 3, 2021

An update on this, I was able to successfully compile and it was entirely on my side.
apt install emscripten is not what is needed.

Following the install directions on https://emscripten.org/docs/getting_started/downloads.html which correctly adds everything to PATH was key.

Got a different compile error, but that was because I needed to run:
node makefile.js clean

Then node makefile.js emscripten release worked just fine.

@xen0bit xen0bit closed this as completed Feb 3, 2021
@nepx
Copy link
Owner

nepx commented Feb 4, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants