Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvptx-none-ar and nvptx-none-ranlib #4

Open
tschwinge opened this issue Jan 27, 2015 · 0 comments
Open

nvptx-none-ar and nvptx-none-ranlib #4

tschwinge opened this issue Jan 27, 2015 · 0 comments

Comments

@tschwinge
Copy link
Member

During installation, nvptx-none-ar and nvptx-none-ranlib are created as symlinks to the ar and ranlib binaries found in $PATH. (The intention is to re-use those of the GNU/Linux host system.)

This makes the installation tree non-relocatable to a different system. Maybe wrapper shell scripts should be used instead?

tschwinge added a commit that referenced this issue Jul 24, 2023
In the (very likely, given the settings in which nvptx-tools are used) case
that via 'gcc_AC_PROG_LN_S', 'LN_S' is resolved to 'ln -s', 'make install' does
work as expected, but it fails in case that 'LN_S' is resolved to 'ln', (a):

    ln  /usr/bin/ar [PREFIX]/bin/nvptx-none-ar
    ln: failed to create hard link '[PREFIX]/bin/nvptx-none-ar' => '/usr/bin/ar': Invalid cross-device link

..., since "forever".

In the 'ln' case, since #5 commit 2ec6ea2
"Use relative symlinks for [install]/nvptx-none/bin/{ar,as,ld,ranlib}", it
additionally fails, (b):

    rel=$(perl -MFile::Spec -e 'print File::Spec->abs2rel(@argv)' [PREFIX]/bin [PREFIX]/nvptx-none/bin) && \
    for p in ar as ld nm ranlib; do \
      rm -f [PREFIX]/nvptx-none/bin/"$p" && \
      ln  "$rel"/nvptx-none-"$p" [PREFIX]/nvptx-none/bin/"$p"; \
    done
    ln: failed to access '../../bin/nvptx-none-ar': No such file or directory

Ideally, these two issues ought to be resolved properly: (a) via
<#4>
"nvptx-none-ar and nvptx-none-ranlib", and (b) via slightly changing the shell
code (first 'cd', then 'ln').  Until that's done, let's assume that 'ln -s'
does work (very likely, given the settings in which nvptx-tools are used).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant