hikalium / wasabi

Toy web browser + OS in Rust = wasabi
MIT License
84 stars 2 forks source link

Replace `readlink -f` usage to make WasabiOS buildable on a clean build on macOS #15

Closed d0iasm closed 10 months ago

d0iasm commented 10 months ago

make run fails if you clone a new wasabi project. You should delete wasabi/ and clone a new project via git clone to reproduce this issue.

$ make run
...
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo install --target=x86_64-unknown-none --force --root  --path .
error: a value is required for '--root <DIR>' but none was supplied
hikalium commented 10 months ago

Hmm... I could not reproduce the issue on Crostini (Debian) with the following steps:

$ rm -rf wasabi/
$ git clone git@github.com:hikalium/wasabi.git
Cloning into 'wasabi'...
Enter passphrase for key '/home/hikalium/.ssh/id_ed25519': 
remote: Enumerating objects: 3827, done.
remote: Counting objects: 100% (284/284), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 3827 (delta 197), reused 226 (delta 170), pack-reused 3543
Receiving objects: 100% (3827/3827), 4.47 MiB | 3.52 MiB/s, done.
Resolving deltas: 100% (2618/2618), done.
$ cd wasabi/
$ ls
app      Cargo.lock  dbgutil  font     log       noli  practice   rust-toolchain.toml  third_party
builder  Cargo.toml  e2etest  LICENSE  Makefile  os    README.md  scripts
$ make run
export INIT="hello1" && \
        cd os && cargo \
          --config "target.'cfg(target_os = \"uefi\")'.runner = '/home/hikalium/repo/wasabi/scripts/launch_qemu.sh'" \
        run --release
   Compiling core v0.0.0 (/home/hikalium/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling proc-macro2 v1.0.69
   Compiling compiler_builtins v0.1.87
   Compiling unicode-ident v1.0.6
   Compiling libc v0.2.138
   Compiling quote v1.0.33
   Compiling syn v2.0.43
   Compiling font v0.1.0 (/home/hikalium/repo/wasabi/font)
   Compiling rustc-std-workspace-core v1.99.0 (/home/hikalium/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling cfg-if v1.0.0
   Compiling alloc v0.0.0 (/home/hikalium/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
   Compiling panic_abort v0.0.0 (/home/hikalium/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort)
   Compiling os v0.0.0 (/home/hikalium/repo/wasabi/os)
    Finished release [optimized] target(s) in 14.07s
     Running `/home/hikalium/repo/wasabi/scripts/launch_qemu.sh /home/hikalium/repo/wasabi/target/x86_64-unknown-uefi/release/os.efi`
+ PATH_TO_EFI=/home/hikalium/repo/wasabi/target/x86_64-unknown-uefi/release/os.efi
++ dirname /home/hikalium/repo/wasabi/scripts/launch_qemu.sh
+ cd /home/hikalium/repo/wasabi/scripts
+ cd ..
+ PATH_TO_EFI=/home/hikalium/repo/wasabi/target/x86_64-unknown-uefi/release/os.efi
+ make internal_launch_qemu
make[1]: Entering directory '/home/hikalium/repo/wasabi'
rm -r generated/bin
rm: cannot remove 'generated/bin': No such file or directory
make[1]: [Makefile:145: app] Error 1 (ignored)
# build all apps under app/ dir for dev
find app -mindepth 1 -maxdepth 1 -not -path '*/.*' | \
        xargs -I {} -n 1 -- bash -c 'make -C {} build || exit 255'
make[2]: Entering directory '/home/hikalium/repo/wasabi/app/hello0'
rustup target add x86_64-unknown-none
info: component 'rust-std' for target 'x86_64-unknown-none' is up to date
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo build --target=x86_64-unknown-none
   Compiling proc-macro2 v1.0.69
   Compiling unicode-ident v1.0.6
   Compiling quote v1.0.33
   Compiling syn v2.0.43
   Compiling font v0.1.0 (/home/hikalium/repo/wasabi/font)
   Compiling noli v0.1.0 (/home/hikalium/repo/wasabi/noli)
   Compiling hello0 v0.1.0 (/home/hikalium/repo/wasabi/app/hello0)
    Finished dev [unoptimized + debuginfo] target(s) in 2.94s
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo install --target=x86_64-unknown-none --force --root /home/hikalium/repo/wasabi/generated --path .
  Installing hello0 v0.1.0 (/home/hikalium/repo/wasabi/app/hello0)
    Updating crates.io index
  Downloaded proc-macro2 v1.0.72
  Downloaded 1 crate (45.3 KB) in 0.61s
   Compiling proc-macro2 v1.0.72
   Compiling unicode-ident v1.0.12
   Compiling quote v1.0.33
   Compiling syn v2.0.43
   Compiling font v0.1.0 (/home/hikalium/repo/wasabi/font)
   Compiling noli v0.1.0 (/home/hikalium/repo/wasabi/noli)
   Compiling hello0 v0.1.0 (/home/hikalium/repo/wasabi/app/hello0)
    Finished release [optimized] target(s) in 4.47s
  Installing /home/hikalium/repo/wasabi/generated/bin/hello0
   Installed package `hello0 v0.1.0 (/home/hikalium/repo/wasabi/app/hello0)` (executable `hello0`)
warning: be sure to add `/home/hikalium/repo/wasabi/generated/bin` to your PATH to be able to run the installed binaries
make[2]: Leaving directory '/home/hikalium/repo/wasabi/app/hello0'
make[2]: Entering directory '/home/hikalium/repo/wasabi/app/hello1'
rustup target add x86_64-unknown-none
info: component 'rust-std' for target 'x86_64-unknown-none' is up to date
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo build --target=x86_64-unknown-none
   Compiling hello1 v0.1.0 (/home/hikalium/repo/wasabi/app/hello1)
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo install --target=x86_64-unknown-none --force --root /home/hikalium/repo/wasabi/generated --path .
  Installing hello1 v0.1.0 (/home/hikalium/repo/wasabi/app/hello1)
    Updating crates.io index
   Compiling hello1 v0.1.0 (/home/hikalium/repo/wasabi/app/hello1)
    Finished release [optimized] target(s) in 0.15s
  Installing /home/hikalium/repo/wasabi/generated/bin/hello1
   Installed package `hello1 v0.1.0 (/home/hikalium/repo/wasabi/app/hello1)` (executable `hello1`)
warning: be sure to add `/home/hikalium/repo/wasabi/generated/bin` to your PATH to be able to run the installed binaries
make[2]: Leaving directory '/home/hikalium/repo/wasabi/app/hello1'
make[2]: Entering directory '/home/hikalium/repo/wasabi/app/loop'
rustup target add x86_64-unknown-none
info: component 'rust-std' for target 'x86_64-unknown-none' is up to date
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo build --target=x86_64-unknown-none
   Compiling loop v0.1.0 (/home/hikalium/repo/wasabi/app/loop)
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo install --target=x86_64-unknown-none --force --root /home/hikalium/repo/wasabi/generated --path .
  Installing loop v0.1.0 (/home/hikalium/repo/wasabi/app/loop)
    Updating crates.io index
   Compiling loop v0.1.0 (/home/hikalium/repo/wasabi/app/loop)
    Finished release [optimized] target(s) in 0.13s
  Installing /home/hikalium/repo/wasabi/generated/bin/loop
   Installed package `loop v0.1.0 (/home/hikalium/repo/wasabi/app/loop)` (executable `loop`)
warning: be sure to add `/home/hikalium/repo/wasabi/generated/bin` to your PATH to be able to run the installed binaries
make[2]: Leaving directory '/home/hikalium/repo/wasabi/app/loop'
make[2]: Entering directory '/home/hikalium/repo/wasabi/app/uname'
rustup target add x86_64-unknown-none
info: component 'rust-std' for target 'x86_64-unknown-none' is up to date
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo build --target=x86_64-unknown-none
   Compiling uname v0.1.0 (/home/hikalium/repo/wasabi/app/uname)
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo install --target=x86_64-unknown-none --force --root /home/hikalium/repo/wasabi/generated --path .
  Installing uname v0.1.0 (/home/hikalium/repo/wasabi/app/uname)
    Updating crates.io index
   Compiling uname v0.1.0 (/home/hikalium/repo/wasabi/app/uname)
    Finished release [optimized] target(s) in 0.13s
  Installing /home/hikalium/repo/wasabi/generated/bin/uname
BdsDxe: failed to load Boot0001 "UEFI QEMU DVD-ROM QM00005 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x2,0xFFFF,0x0): Not Found
BdsDxe: loading Boot0002 "UEFI QEMU HARDDISK QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
BdsDxe: starting Boot0002 "UEFI QEMU HARDDISK QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
WasabiOS COM1 Initialized
WasabiOS COM2 Initialized
kernel_stack: 0x000000003e120000
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: README.md, file_size: 2480}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: hello0, file_size: 912256}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: hello1, file_size: 912744}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: loop, file_size: 901144}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: uname, file_size: 912264}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: window0, file_size: 943552}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:04, attr: 0x20, file_name: window1, file_size: 1063200}
FILE: EfiFileInfo { create_time: 2024-01-01 02:32:06, attr: 0x20, file_name: NvVars, file_size: 11255}
RsdpStruct { signature: [82, 83, 68, 32, 80, 84, 82, 32], checksum: 22, oem_id: [66, 79, 67, 72, 83, 32], revision: 2, rsdt_address: 1069011060, length: 36, xsdt: 1069011176 }
ACPI tables in XSDT:
XSDT[0]: Header { signature: "FACP", length: 244 }
XSDT[1]: Header { signature: "APIC", length: 144 }
XSDT[2]: Header { signature: "HPET", length: 56 }
XSDT[3]: Header { signature: "MCFG", length: 60 }
XSDT[4]: Header { signature: "WAET", length: 40 }
XSDT[5]: Header { signature: "BGRT", length: 56 }
Got valid MCFG table @ 0x000000003fb77000
Got valid HPET table @ 0x000000003fb78000
Got valid FACP table @ 0x000000003fb7a000
fadt: 0x3fb7a000
Got valid DSDT table @ 0x000000003fb7b000
dsdt: 0x3fb7b000
dsdt: Dsdt { Header { signature: "DSDT", length: 8139 } }
CpuidRequest(EAX: 0x00000000, ECX:0x00000000) -> CpuidResponse(EAX: 0x0000000D, EBX:0x68747541, ECX:0x444D4163, EDX:0x69746E65)
cpuid(0, 0).vendor = AuthenticAMD
CpuidRequest(EAX: 0x00000001, ECX:0x00000000) -> CpuidResponse(EAX: 0x00000663, EBX:0x00000800, ECX:0x80002001, EDX:0x078BFBFD)
CpuidRequest(EAX: 0x80000000, ECX:0x00000000) -> CpuidResponse(EAX: 0x8000000A, EBX:0x68747541, ECX:0x444D4163, EDX:0x69746E65)
CpuidRequest(EAX: 0x80000007, ECX:0x00000000) -> CpuidResponse(EAX: 0x00000000, EBX:0x00000000, ECX:0x00000000, EDX:0x00000000)
CpuidRequest(EAX: 0x80000002, ECX:0x00000000) -> CpuidResponse(EAX: 0x554D4551, EBX:0x72695620, ECX:0x6C617574, EDX:0x55504320)
CpuidRequest(EAX: 0x80000003, ECX:0x00000000) -> CpuidResponse(EAX: 0x72657620, EBX:0x6E6F6973, ECX:0x352E3220, EDX:0x0000002B)
CpuidRequest(EAX: 0x80000004, ECX:0x00000000) -> CpuidResponse(EAX: 0x00000000, EBX:0x00000000, ECX:0x00000000, EDX:0x00000000)
cpu_brand_string = QEMU Virtual CPU version 2.5+
x2APIC ID: 0
MSR_IA32_APIC_BASE=0xFEE00900
LocalApicStatus { is_bsp: true, x2apic_mode_enable: false, apic_global_enable: true }
BOOT_INFO populated!
Memory map:
EfiMemoryDescriptor { phys: [0x000000000000-0x000000001000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x000000001000-0x0000000A0000), size: (     159 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x000000100000-0x000000800000), size: (    1792 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x000000800000-0x000000808000), size: (       8 pages), attr: 0xF, type: ACPI_MEMORY_NVS }
EfiMemoryDescriptor { phys: [0x000000808000-0x00000080B000), size: (       3 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00000080B000-0x00000080C000), size: (       1 pages), attr: 0xF, type: ACPI_MEMORY_NVS }
EfiMemoryDescriptor { phys: [0x00000080C000-0x000000810000), size: (       4 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x000000810000-0x000000900000), size: (     240 pages), attr: 0xF, type: ACPI_MEMORY_NVS }
EfiMemoryDescriptor { phys: [0x000000900000-0x000001500000), size: (    3072 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x000001500000-0x00003BF36000), size: (  240182 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003BF36000-0x00003BF56000), size: (      32 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003BF56000-0x00003DBBB000), size: (    7269 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003DBBB000-0x00003E220000), size: (    1637 pages), attr: 0xF, type: LOADER_DATA }
EfiMemoryDescriptor { phys: [0x00003E220000-0x00003E26F000), size: (      79 pages), attr: 0xF, type: LOADER_CODE }
EfiMemoryDescriptor { phys: [0x00003E26F000-0x00003E2B7000), size: (      72 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003E2B7000-0x00003E2B8000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003E2B8000-0x00003E2BB000), size: (       3 pages), attr: 0xF, type: LOADER_DATA }
EfiMemoryDescriptor { phys: [0x00003E2BB000-0x00003E4F6000), size: (     571 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003E4F6000-0x00003E4F7000), size: (       1 pages), attr: 0xF, type: LOADER_DATA }
EfiMemoryDescriptor { phys: [0x00003E4F7000-0x00003EADE000), size: (    1511 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EADE000-0x00003EB8A000), size: (     172 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EB8A000-0x00003EC19000), size: (     143 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC19000-0x00003EC3B000), size: (      34 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC3B000-0x00003EC41000), size: (       6 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC41000-0x00003EC48000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC48000-0x00003EC4A000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC4A000-0x00003EC62000), size: (      24 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC62000-0x00003EC64000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC64000-0x00003EC6C000), size: (       8 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC6C000-0x00003EC6D000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC6D000-0x00003EC7B000), size: (      14 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC7B000-0x00003EC7C000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC7C000-0x00003EC7F000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC7F000-0x00003EC86000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC86000-0x00003EC95000), size: (      15 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EC95000-0x00003EC97000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EC97000-0x00003ECAB000), size: (      20 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ECAB000-0x00003ECB2000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ECB2000-0x00003ECD5000), size: (      35 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ECD5000-0x00003ECD8000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ECD8000-0x00003ECDD000), size: (       5 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ECDD000-0x00003ECDF000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ECDF000-0x00003ECEF000), size: (      16 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ECEF000-0x00003ECF2000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ECF2000-0x00003ECF5000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ECF5000-0x00003ECF6000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ECF6000-0x00003ED02000), size: (      12 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ED02000-0x00003ED04000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ED04000-0x00003ED0A000), size: (       6 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ED0A000-0x00003ED0D000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ED0D000-0x00003ED12000), size: (       5 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ED12000-0x00003ED14000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ED14000-0x00003ED88000), size: (     116 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ED88000-0x00003ED8C000), size: (       4 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ED8C000-0x00003ED94000), size: (       8 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003ED94000-0x00003ED96000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003ED96000-0x00003EDA5000), size: (      15 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDA5000-0x00003EDA6000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDA6000-0x00003EDAC000), size: (       6 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDAC000-0x00003EDAE000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDAE000-0x00003EDB2000), size: (       4 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDB2000-0x00003EDB4000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDB4000-0x00003EDC6000), size: (      18 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDC6000-0x00003EDC8000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDC8000-0x00003EDC9000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDC9000-0x00003EDCA000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDCA000-0x00003EDD1000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDD1000-0x00003EDD8000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDD8000-0x00003EDDC000), size: (       4 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDDC000-0x00003EDE3000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDE3000-0x00003EDED000), size: (      10 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EDED000-0x00003EDEE000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003EDEE000-0x00003EE00000), size: (      18 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003EE00000-0x00003F000000), size: (     512 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F000000-0x00003F001000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F001000-0x00003F004000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F004000-0x00003F019000), size: (      21 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F019000-0x00003F01A000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F01A000-0x00003F022000), size: (       8 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F022000-0x00003F02A000), size: (       8 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F02A000-0x00003F0B4000), size: (     138 pages), attr: 0x800000000000000F, type: RUNTIME_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F0B4000-0x00003F4B4000), size: (    1024 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F4B4000-0x00003F523000), size: (     111 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F523000-0x00003F525000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F525000-0x00003F528000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F528000-0x00003F52B000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F52B000-0x00003F532000), size: (       7 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F532000-0x00003F536000), size: (       4 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F536000-0x00003F54C000), size: (      22 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F54C000-0x00003F54E000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F54E000-0x00003F551000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F551000-0x00003F552000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F552000-0x00003F55A000), size: (       8 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F55A000-0x00003F55D000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F55D000-0x00003F55E000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F55E000-0x00003F55F000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F55F000-0x00003F560000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F560000-0x00003F562000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F562000-0x00003F565000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F565000-0x00003F570000), size: (      11 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F570000-0x00003F57D000), size: (      13 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F57D000-0x00003F57E000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F57E000-0x00003F57F000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F57F000-0x00003F581000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F581000-0x00003F582000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F582000-0x00003F584000), size: (       2 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F584000-0x00003F58F000), size: (      11 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F58F000-0x00003F590000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F590000-0x00003F591000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F591000-0x00003F592000), size: (       1 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F592000-0x00003F59C000), size: (      10 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F59C000-0x00003F59F000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F59F000-0x00003F5A2000), size: (       3 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003F5A2000-0x00003F8EF000), size: (     845 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F8EF000-0x00003F9EF000), size: (     256 pages), attr: 0x800000000000000F, type: RUNTIME_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003F9EF000-0x00003FAEF000), size: (     256 pages), attr: 0x800000000000000F, type: RUNTIME_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003FAEF000-0x00003FB6F000), size: (     128 pages), attr: 0xF, type: RESERVED }
EfiMemoryDescriptor { phys: [0x00003FB6F000-0x00003FB7F000), size: (      16 pages), attr: 0xF, type: ACPI_RECLAIM_MEMORY }
EfiMemoryDescriptor { phys: [0x00003FB7F000-0x00003FBFF000), size: (     128 pages), attr: 0xF, type: ACPI_MEMORY_NVS }
EfiMemoryDescriptor { phys: [0x00003FBFF000-0x00003FE00000), size: (     513 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003FE00000-0x00003FE9A000), size: (     154 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003FE9A000-0x00003FEBA000), size: (      32 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003FEBA000-0x00003FED4000), size: (      26 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003FED4000-0x00003FEDD000), size: (       9 pages), attr: 0xF, type: BOOT_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003FEDD000-0x00003FEF4000), size: (      23 pages), attr: 0xF, type: BOOT_SERVICES_CODE }
EfiMemoryDescriptor { phys: [0x00003FEF4000-0x00003FF78000), size: (     132 pages), attr: 0x800000000000000F, type: RUNTIME_SERVICES_DATA }
EfiMemoryDescriptor { phys: [0x00003FF78000-0x000040000000), size: (     136 pages), attr: 0xF, type: ACPI_MEMORY_NVS }
EfiMemoryDescriptor { phys: [0x0000B0000000-0x0000C0000000), size: (   65536 pages), attr: 0x1, type: RESERVED }
Available memory:
EfiMemoryDescriptor { phys: [0x000000001000-0x0000000A0000), size: (     159 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x000000100000-0x000000800000), size: (    1792 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x000000808000-0x00000080B000), size: (       3 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00000080C000-0x000000810000), size: (       4 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x000001500000-0x00003BF36000), size: (  240182 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003BF56000-0x00003DBBB000), size: (    7269 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003E26F000-0x00003E2B7000), size: (      72 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
EfiMemoryDescriptor { phys: [0x00003FE00000-0x00003FE9A000), size: (     154 pages), attr: 0xF, type: CONVENTIONAL_MEMORY }
Allocator initialized. Total memory: 975 MiB
rsp on boot: 0x000000003FEB9740
rsp switched to: 0x000000003E21FDC8
Booting WasabiOS...
Wasabi OS booted. efi_main = 0x000000003e221ff0
TSS64 created @ 0x000000003fe05f60
Loading GDT @ 0x000000003FE05F00
Loading TSS ( selector = 0x30 )
Disabled legacy PIC
Loading IDT @ 0x000000003FE04EE0
Welcome to WasabiOS! efi_main = 0x000000003e221ff0
debug_info: write_cr3 = 0x000000003e23b7c0
PciDeviceDriverInstance{ name: XhciDriverInstance } driver is loaded for (bus: 0x00, device: 0x02, function: 0x0)
Rtl8139: eth_addr: 52:54:00:12:34:56
PciDeviceDriverInstance{ name: Rtl8139DriverInstance } driver is loaded for (bus: 0x00, device: 0x03, function: 0x0)
RefCell { value: {(bus: 0x00, device: 0x02, function: 0x0): PciDeviceDriverInstance{ name: XhciDriverInstance }, (bus: 0x00, device: 0x03, function: 0x0): PciDeviceDriverInstance{ name: Rtl8139DriverInstance }} }
[PciDeviceDriver{ name: Rtl8139Driver }, PciDeviceDriver{ name: XhciDriver }]
INFO: console_task has started
Network manager started running
Network: network interfaces updated:
  52:54:00:12:34:56 RTL8139
PORTSC @ 0x800000440, max_port_num = 8
xHC started
Port 1: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
rx_status: 0b1
00000000: 52 54 00 12 34 56 52 55 0A 00 02 02 08 06 00 01 |RT..4VRU........|
00000010: 08 00 06 04 00 02 52 55 0A 00 02 02 0A 00 02 02 |......RU........|
00000020: 52 54 00 12 34 56 0A 00 02 0F 00 00 00 00 00 00 |RT..4V..........|
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040: D8 AC 72 F8                                     |..r.|
rx.next_index: 72
rx_status: 0b1
00000000: FF FF FF FF FF FF 52 55 0A 00 02 02 08 00 45 10 |......RU......E.|
00000010: 01 2E 00 00 00 00 40 11 6D AE 0A 00 02 02 FF FF |......@.m.......|
00000020: FF FF 00 43 00 44 01 1A 86 83 02 01 06 00 34 12 |...C.D........4.|
00000030: 00 00 00 00 00 00 00 00 00 00 0A 00 02 0F 0A 00 |................|
00000040: 02 02 00 00 00 00 52 54 00 12 34 56 00 00 00 00 |......RT..4V....|
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000110: 00 00 00 00 00 00 63 82 53 63 35 01 05 36 04 0A |......c.Sc5..6..|
00000120: 00 02 02 01 04 FF FF FF 00 03 04 0A 00 02 02 06 |................|
00000130: 04 0A 00 02 03 33 04 00 01 51 80 FF 2C AB 5F 00 |.....3...Q..,._.|
rx.next_index: 396
Port 2: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
Port 3: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
Port 4: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
Port 5: Device attached: PORTSC: 0x00000EE1 Disabled (PP=true, PLS=Polling, Speed=HighSpeed): USB2
Ignoring event (!= type): PortStatusChangeEvent Port = 5
USB device detected: Some("QEMU") Some("QEMU USB Keyboard") Some("68284-0000:00:02.0-1")
USB device vid:pid: 0x0627:0x0001
device future attached
usb_hid_kbd: EP: EndpointDescriptor { desc_length: 7, desc_type: 5, endpoint_address: 129, attributes: 3, max_packet_size: 8, interval: 7 }
INFO: usb_hid_keyboard is ready
Port 6: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
Port 7: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
Port 8: Device detached: PORTSC: 0x000002A0 Disconnected (PP=true, PLS=RxDetect, Speed=Unknown(0))
net: rx: ARP: ArpPacket { op: response, sender: 10.0.2.2 (52:55:0A:00:02:02), target: 10.0.2.15 (52:54:00:12:34:56) }
net: rx: DHCP: SERVER -> CLIENT yiaddr = 10.0.2.15
op = 53, data = [5]
DHCPACK
op = 54, data = [10, 0, 2, 2]
op = 1, data = [255, 255, 255, 0]
netmask: 255.255.255.0
op = 3, data = [10, 0, 2, 2]
router: 10.0.2.2
op = 6, data = [10, 0, 2, 3]
dns: 10.0.2.3
op = 51, data = [0, 1, 81, 128]
make[1]: Leaving directory '/home/hikalium/repo/wasabi'
hikalium commented 10 months ago

@d0iasm Could you attach full steps to reproduce and console logs? Thank you!

hikalium commented 10 months ago

Also, could you check if it succeeds after running make run twice or not? Thanks!!!

d0iasm commented 10 months ago

Thanks! Here are full logs and steps: The second make run doesn't change the output.

$ rm -rf wasabi
$ git clone https://github.com/hikalium/wasabi.git
$ cd wasabi
$ make run
export INIT="hello1" && \
                cd os && cargo \
                  --config "target.'cfg(target_os = \"uefi\")'.runner = '/Users/asami/Projects/wasabi/scripts/launch_qemu.sh'" \
                run --release
   Compiling core v0.0.0 (/Users/asami/.rustup/toolchains/nightly-2023-03-01-aarch64-apple-darwin/lib/rustlib/src/rust/library/core)
   Compiling proc-macro2 v1.0.69
   Compiling compiler_builtins v0.1.87
   Compiling unicode-ident v1.0.6
   Compiling libc v0.2.138
   Compiling quote v1.0.33
   Compiling syn v2.0.43
   Compiling font v0.1.0 (/Users/asami/Projects/wasabi/font)
   Compiling rustc-std-workspace-core v1.99.0 (/Users/asami/.rustup/toolchains/nightly-2023-03-01-aarch64-apple-darwin/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/Users/asami/.rustup/toolchains/nightly-2023-03-01-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc)
   Compiling cfg-if v1.0.0
   Compiling panic_abort v0.0.0 (/Users/asami/.rustup/toolchains/nightly-2023-03-01-aarch64-apple-darwin/lib/rustlib/src/rust/library/panic_abort)
   Compiling os v0.0.0 (/Users/asami/Projects/wasabi/os)
    Finished release [optimized] target(s) in 11.09s
     Running `/Users/asami/Projects/wasabi/scripts/launch_qemu.sh /Users/asami/Projects/wasabi/target/x86_64-unknown-uefi/release/os.efi`
+ PATH_TO_EFI=/Users/asami/Projects/wasabi/target/x86_64-unknown-uefi/release/os.efi
++ dirname /Users/asami/Projects/wasabi/scripts/launch_qemu.sh
+ cd /Users/asami/Projects/wasabi/scripts
+ cd ..
+ PATH_TO_EFI=/Users/asami/Projects/wasabi/target/x86_64-unknown-uefi/release/os.efi
+ make internal_launch_qemu
rm -r generated/bin
rm: generated/bin: No such file or directory
make[1]: [app] Error 1 (ignored)
# build all apps under app/ dir for dev
find app -mindepth 1 -maxdepth 1 -not -path '*/.*' | \
                xargs -I {} -n 1 -- bash -c 'make -C {} build || exit 255'
rustup target add x86_64-unknown-none
info: component 'rust-std' for target 'x86_64-unknown-none' is up to date
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo build --target=x86_64-unknown-none
   Compiling proc-macro2 v1.0.69
   Compiling unicode-ident v1.0.6
   Compiling quote v1.0.33
   Compiling syn v2.0.43
   Compiling font v0.1.0 (/Users/asami/Projects/wasabi/font)
   Compiling noli v0.1.0 (/Users/asami/Projects/wasabi/noli)
   Compiling uname v0.1.0 (/Users/asami/Projects/wasabi/app/uname)
    Finished dev [unoptimized + debuginfo] target(s) in 2.44s
RUSTFLAGS='-C link-args=-e -C link-args=entry -C link-args=-z -C link-args=execstack' cargo install --target=x86_64-unknown-none --force --root  --path .
error: a value is required for '--root <DIR>' but none was supplied

For more information, try '--help'.
make[2]: *** [build] Error 1
xargs: bash: exited with status 255; aborting
make[1]: *** [app] Error 1
make: *** [run] Error 2

There is no generated/ directory. The files under wasabi/ are:

$ ls
Cargo.lock          LICENSE             README.md           builder             e2etest             log                 os                  rust-toolchain.toml target
Cargo.toml          Makefile            app                 dbgutil             font                noli                practice            scripts             third_party
hikalium commented 10 months ago

Could you run the following commands at the wasabi's root dir and upload the result?

set -x
pushd app/hello0
rm -rf ../../generated
readlink -f ../../generated ; echo $?
readlink -e ../../generated ; echo $?
readlink -m ../../generated ; echo $?
mkdir ../../generated
readlink -f ../../generated ; echo $?
readlink -e ../../generated ; echo $?
readlink -m ../../generated ; echo $?
readlink -v
readlink --help
popd
set +x

Mine was:

+ pushd app/hello0
~/repo/wasabi/app/hello0 ~/repo/wasabi
+ rm -rf ../../generated
+ readlink -f ../../generated
/home/hikalium/repo/wasabi/generated
+ echo 0
0
+ readlink -e ../../generated
+ echo 1
1
+ readlink -m ../../generated
/home/hikalium/repo/wasabi/generated
+ echo 0
0
+ mkdir ../../generated
+ readlink -f ../../generated
/home/hikalium/repo/wasabi/generated
+ echo 0
0
+ readlink -e ../../generated
/home/hikalium/repo/wasabi/generated
+ echo 0
0
+ readlink -m ../../generated
/home/hikalium/repo/wasabi/generated
+ echo 0
0
+ readlink -v
readlink: missing operand
Try 'readlink --help' for more information.
+ readlink --help
Usage: readlink [OPTION]... FILE...
Print value of a symbolic link or canonical file name

  -f, --canonicalize            canonicalize by following every symlink in
                                every component of the given name recursively;
                                all but the last component must exist
  -e, --canonicalize-existing   canonicalize by following every symlink in
                                every component of the given name recursively,
                                all components must exist
  -m, --canonicalize-missing    canonicalize by following every symlink in
                                every component of the given name recursively,
                                without requirements on components existence
  -n, --no-newline              do not output the trailing delimiter
  -q, --quiet
  -s, --silent                  suppress most error messages (on by default)
  -v, --verbose                 report error messages
  -z, --zero                    end each output line with NUL, not newline
      --help     display this help and exit
      --version  output version information and exit

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/readlink>
or available locally via: info '(coreutils) readlink invocation'
+ popd
~/repo/wasabi
+ set +x
hikalium commented 10 months ago

If possible, could you replace the -f flag on the following line with -m and see if it fixes the issue (even after deleting the generated dir, as the script above creates the generated dir... (sorry I forgot to clean it up))

https://github.com/hikalium/wasabi/blob/19be415026dc6b75db8c0205e2b32ef73922367f/noli/app_common.mk#L3

d0iasm commented 10 months ago

It looks readlink in Mac doesn't have options e and m.

$ readlink -f ../../generated ; echo $? 1 $ readlink -e ../../generated ; echo $? readlink: illegal option -- e usage: readlink [-fn] [file ...] 1 $ readlink -m ../../generated ; echo $? readlink: illegal option -- m usage: readlink [-fn] [file ...] 1 $ mkdir ../../generated $ readlink -f ../../generated ; echo $? /Users/asami/Projects/wasabi/generated 0 $ readlink -e ../../generated ; echo $? readlink: illegal option -- e usage: readlink [-fn] [file ...] 1 $ readlink -m ../../generated ; echo $? readlink: illegal option -- m usage: readlink [-fn] [file ...] 1

hikalium commented 10 months ago

interesting... okay, then I think I can repro the issue with my macbook. Let me replace the usage of readlink -f with something portable (maybe we should replace all the dependencies in the end to make it buildable on Wasabi 😇)

Please wait a bit to be fixed!!!