I needed a newer version of tool smbcacls because of its new options '--save savefile' and '--recurse'. So I downloaded the sources (samba-4.23.4.tar.gz) and built Samba like this: cd "$HOME/name with spaces/samba-4.23.4" ./configure --prefix="$HOME/name with spaces/samba-4.23.4-bin" make After a while, I got this error: [640/770] Processing librpc/idl/browser.idl /usr/bin/python3: can't open file '/home/rdiez/name': [Errno 2] No such file or directory I am guessing that the invocation of the Python tool which processes such IDL files is not properly quoting/escaping the filename argument, and that is why the filename argument breaks at the first space in "/home/rdiez/name with spaces". There are 2 ways to fix this issue: 1) Check upfront that the source path contains no spaces, tabs, and probably any problematic shell characters too, depending on how the invocation of that Python script is coded. 2) Properly quote all arguments to that Python script. I personally would change the Continuous Integration to build with a source directory which contains a space, and possibly other problematic shell characters like $. That way, you can be pretty confident that all paths are properly quoted everywhere.
I would start with the "configure" shell script. This is a fixed version (better too many quotes, just in case, than too few): #!/bin/sh PREVPATH="$(dirname "$0")" WAF="./buildtools/bin/waf" # using JOBS=1 gives maximum compatibility with # systems like AIX which have broken threading in python JOBS=1 export JOBS # Make sure we don't have any library preloaded. unset LD_PRELOAD # Make sure we get stable hashes PYTHONHASHSEED=1 export PYTHONHASHSEED cd . || exit 1 "$PYTHON" "$WAF" configure "$@" || exit 1 cd "$PREVPATH"