Skip to content

The installation script should use absolute paths for ln #9244

@XhstormR

Description

@XhstormR

When building on Windows, and executing the linked mutilcall program, because the generated ln.exe has higher priority than the default /usr/bin/ln.exe, it won't add the .exe suffix by default. Therefore, executing ln -f coreutils ls will result in an error, indicating that coreutils cannot be found. However, if you use ln -f coreutils.exe ls.exe, it will work.

Therefore, when linking, we need to use the absolute path of the ln file to prevent using the ln file that was just generated.

cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils df 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils dir 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils dircolors 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils dirname 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils du 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils echo 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils env 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils expand 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils expr 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils factor 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils false 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils fmt 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils fold 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils hashsum 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils head 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils hostname 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils join 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils link 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils ln 
cd /d/bld/uutils-coreutils_1762957332295/_h_env/bin && ln -f coreutils ls 
ln.exe: failed to create hard link 'coreutils' => 'ls': No such file or directory
make: *** [GNUmakefile:477: install] Error 1

(%BUILD_PREFIX%) %SRC_DIR%>echo Failed with error #2. 
Failed with error #2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions