zig icon indicating copy to clipboard operation
zig copied to clipboard

got "error: InvalidExe" when trying to build from a vm shared directory

Open Lking03x opened this issue 10 months ago • 0 comments

Zig Version

0.11.0

Steps to Reproduce and Observed Behavior

  • Create a virtual machine (Virtual Box) Host: Windows, Guess: Linux (Ubuntu 22.04)
  • Set up a shared directory between the two OS
  • create a new project ("zig init-exe") and try "zig build"

The compilation seams to be successful, it shows

Sementic Analisis (...) LLVM Emit Object ... LLD Link ... then "error: InvalidExe"

NB:

  • When creating (init-exe) and running (build) from the vm folder itself (eg: Desktop) it works fine
  • A "zig-out" folder is created as expected, which is not the case from withing the shared folder
  • In both case a "build" file in "zig-cache/o/.../" is just full of null bytes (0000 0000 ...)
  • And both "build.o" are exactly the same (tested with the "diff" command)

Expected Behavior

"zig build" should produce the same ouput whether called for a project in a VM shared folder or one in the VM's folder itself

All other apps/cmd I have tested so far behave correctly, as if the vm shared folder was just a folder from a mounted disk.

Lking03x avatar Mar 30 '24 11:03 Lking03x