def METHOD_NAME(input_file, yarac, install_dir, stdout_lock):
    """ Compile the given .yara file in the given installation directory using
    the provided YARAC program into a *.yarac file.
    Remove the source *.yara file.
    """
    with stdout_lock:
        print('-- Compiling:', input_file)
    output_file = str(pathlib.Path(input_file).with_suffix('.yarac'))
    cmd = [yarac, '-w', input_file, output_file]
    ret = subprocess.call(cmd)
    if ret != 0:
        print('Error: yarac failed during compilation of file', input_file, file=sys.stderr)
        sys.exit(1)
    os.remove(input_file)