WSL: Perl-Script executed from Ninja doesn't find file path even though it exists

18 Views Asked by At

I am currently trying to migrate our CMake- and ninja-based build environment to WSL. One step is a Perl-script which combines previously compiled binary files into one image. One argument to the script is the absolute file path to a binary file.

This works fine in a "full" Linux environment but in WSL, the Perl-script executed within a Ninja-command complains "No such file or directory".

What's weird about this, if the Perl-script is executed on its own, it works perfectly fine:

img_gen.pl -image file.bin

but within the ninja environment, it failes recognising the image from the given file path:

rule CMD
  command = $COMMAND

build image.img: CMD img_gen.pl
    COMMAND = img_gen.pl -image file.bin

ninja image.img

0

There are 0 best solutions below