Closed ghost closed 4 years ago
I tried to build via the make build I'm seeing the same myself, and I have no idea what's going on. It worked in the past so it's something that has changed in rdmd
. But I also haven't used the make build of Volta in a long while, instead using the battery tool.
./battery config \
path_to_volta \
path_to_watt
./battery build
@Wallbraker Will you fix this? Or this is an issue with rdmd
?
@Wallbraker Full log, looks like nasm failed to do something:
BOOTRDMD .battery/x86_64-osx/volted
CLANG .battery/x86_64-osx/rt/src/core/c/errno.c.o
NASM .battery/x86_64-osx/rt/src/vrt/gc/save_regs.asm.o
NASM .battery/x86_64-osx/rt/src/vrt/os/eh.asm.o
nasm: fatal: unrecognised output format `macho64' - use -hf for a list
type `nasm -h' for help
error: command '/usr/bin/nasm' aborted with non-zero retval 1
nasm: fatal: unrecognised output format `macho64' - use -hf for a list
type `nasm -h' for help
nasm -hf:
valid output formats for -f are (`*' denotes default):
* bin flat-form binary files (e.g. DOS .COM, .SYS)
aout Linux a.out object files
aoutb NetBSD/FreeBSD a.out object files
coff COFF (i386) object files (e.g. DJGPP for DOS)
elf ELF32 (i386) object files (e.g. Linux)
as86 Linux as86 (bin86 version 0.3) object files
obj MS-DOS 16-bit/32-bit OMF object files
win32 Microsoft Win32 (i386) object files
rdf Relocatable Dynamic Object File Format v2.0
ieee IEEE-695 (LADsoft variant) object file format
macho NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X object files
You should to change macho64
to macho
But if replace to macho
you'll got this error:
BOOTRDMD .battery/x86_64-osx/volted
CLANG .battery/x86_64-osx/rt/src/core/c/errno.c.o
NASM .battery/x86_64-osx/rt/src/vrt/gc/save_regs.asm.o
NASM .battery/x86_64-osx/rt/src/vrt/os/eh.asm.o
rt/src/vrt/gc/save_regs.asm:35: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:36: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:42: error: symbol `rsp' undefined
rt/src/vrt/gc/save_regs.asm:46: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:47: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:48: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:49: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:50: error: symbol `rbp' undefined
rt/src/vrt/gc/save_regs.asm:68: error: symbol `rsi' undefined
rt/src/vrt/gc/save_regs.asm:71: error: symbol `rsp' undefined
rt/src/vrt/gc/save_regs.asm:72: error: symbol `rbp' undefined
error: command '/usr/bin/nasm' aborted with non-zero retval 1
Those are not symbols those are registers, have nasm
changed the syntax?
@Wallbraker Looks like someone should update Volt to make it work again.
What version of nasm do you have?
$ nasm -v
NASM version 2.13.03 compiled on Feb 8 2018
valid output formats for -f are (`*' denotes default):
* bin flat-form binary files (e.g. DOS .COM, .SYS)
ith Intel hex
srec Motorola S-records
aout Linux a.out object files
aoutb NetBSD/FreeBSD a.out object files
coff COFF (i386) object files (e.g. DJGPP for DOS)
elf32 ELF32 (i386) object files (e.g. Linux)
elf64 ELF64 (x86_64) object files (e.g. Linux)
elfx32 ELFX32 (x86_64) object files (e.g. Linux)
as86 Linux as86 (bin86 version 0.3) object files
obj MS-DOS 16-bit/32-bit OMF object files
win32 Microsoft Win32 (i386) object files
win64 Microsoft Win64 (x86-64) object files
rdf Relocatable Dynamic Object File Format v2.0
ieee IEEE-695 (LADsoft variant) object file format
macho32 NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X (i386) object files
macho64 NeXTstep/OpenStep/Rhapsody/Darwin/MacOS X (x86_64) object files
dbg Trace of all info passed to output stage
elf ELF (short name for ELF32)
macho MACHO (short name for MACHO32)
win WIN (short name for WIN32)
@Wallbraker
I have fixed this, but now this error:
BOOTRDMD .battery/x86_64-osx/volted
CLANG .battery/x86_64-osx/rt/src/core/c/errno.c.o
NASM .battery/x86_64-osx/rt/src/vrt/gc/save_regs.asm.o
NASM .battery/x86_64-osx/rt/src/vrt/os/eh.asm.o
VOLTA .battery/x86_64-osx/volta.lib.bc
VOLTA .battery/x86_64-osx/volta.dsupport.bc
VOLTA .battery/x86_64-osx/volta.rt.bc
VOLTA .battery/x86_64-osx/watt.http.bc
VOLTA .battery/x86_64-osx/watt.json.bc
VOLTA .battery/x86_64-osx/watt.markdown.bc
VOLTA .battery/x86_64-osx/watt.toml.bc
VOLTA .battery/x86_64-osx/watt.bc
VOLTA .battery/x86_64-osx/volta.bc
CLANG .battery/x86_64-osx/volta.dsupport.o
CLANG .battery/x86_64-osx/watt.http.o
CLANG .battery/x86_64-osx/watt.json.o
CLANG .battery/x86_64-osx/watt.toml.o
CLANG .battery/x86_64-osx/watt.o
CLANG .battery/x86_64-osx/volta.rt.o
CLANG .battery/x86_64-osx/watt.markdown.o
CLANG .battery/x86_64-osx/volta.lib.o
CLANG .battery/x86_64-osx/volta.o
CLANG volta-master
ld.lld: error: unknown argument '-dynamic', did you mean '-Bdynamic'
ld.lld: error: unknown argument '-arch'
ld.lld: error: unknown emulation: acosx_version_min
ld.lld: error: unable to find library -lto_library
ld.lld: error: /usr/local/Cellar/llvm/10.0.1_1/lib/libLTO.dylib: unknown file type
ld.lld: error: cannot open x86_64: No such file or directory
ld.lld: error: cannot open 10.9.0: No such file or directory
ld.lld: error: .battery/x86_64-osx/volta.o: unknown file type
ld.lld: error: unable to find library -lm
ld.lld: error: unable to find library -lz
ld.lld: error: unable to find library -lcurses
ld.lld: error: unable to find library -lxml2
ld.lld: error: .battery/x86_64-osx/volta.lib.o: unknown file type
ld.lld: error: .battery/x86_64-osx/watt.o: unknown file type
ld.lld: error: .battery/x86_64-osx/volta.dsupport.o: unknown file type
ld.lld: error: .battery/x86_64-osx/rt/src/core/c/errno.c.o: unknown file type
ld.lld: error: .battery/x86_64-osx/rt/src/vrt/gc/save_regs.asm.o: unknown file type
ld.lld: error: .battery/x86_64-osx/rt/src/vrt/os/eh.asm.o: unknown file type
ld.lld: error: .battery/x86_64-osx/volta.rt.o: unknown file type
ld.lld: error: unable to find library -lSystem
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/local/opt/llvm/bin/clang' aborted with non-zero retval 1
OS Details:
clang version 10.0.1
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
@(#)PROGRAM:ld PROJECT:ld64-253.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: Apple LLVM 7.0.2 (clang-700.1.81)
NOTE: I like Volt syntax and want to try it, but it looks like Volt not supported on macOS and I'll never could try it :(
@Wallbraker Done! It works if replace ld.lld
with ld64.lld
. You should to change it in battery.
@bhelyer @Wallbraker @Dav1dde @noname22 @perfaram
Trying to compile it for an hour, sorry for calling:
macOS:
Linux:
Linker error.