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

llvm-ranlib: -V option not supported (used by configure tests) #87654

Closed
emaste opened this issue Apr 4, 2024 · 1 comment · Fixed by #87661
Closed

llvm-ranlib: -V option not supported (used by configure tests) #87654

emaste opened this issue Apr 4, 2024 · 1 comment · Fixed by #87661

Comments

@emaste
Copy link
Member

emaste commented Apr 4, 2024

Found while trying to build the FreeBSD ports collection with LLVM's binutils installed (instead of ELF Tool Chain).
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258872

games/ponscripter-07th-mod uses ranlib -V to test for the presence of ranlib, but we report an unsupported option error and the test fails

    $echo_n "Checking for ranlib... ${nobr}"
    if ($RANLIB -V >/dev/null) 2>/dev/null
    then
        echo $RANLIB
    else
        RANLIB=granlib
        if ($RANLIB -V >/dev/null) 2>/dev/null
        then echo $RANLIB
        else echo "not found"
             echo "Unable to locate ranlib. If it's installed, try setting the environment variable RANLIB appropriately. (If your platform does not need ranlib, just set RANLIB=true.)"
             exit 1
        fi
    fi
@llvmbot
Copy link
Collaborator

llvmbot commented Apr 4, 2024

@llvm/issue-subscribers-tools-llvm-ar-llvm-ranlib

Author: Ed Maste (emaste)

Found while trying to build the FreeBSD ports collection with LLVM's binutils installed (instead of ELF Tool Chain). https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258872

games/ponscripter-07th-mod uses ranlib -V to test for the presence of ranlib, but we report an unsupported option error and the test fails

    $echo_n "Checking for ranlib... ${nobr}"
    if ($RANLIB -V >/dev/null) 2>/dev/null
    then
        echo $RANLIB
    else
        RANLIB=granlib
        if ($RANLIB -V >/dev/null) 2>/dev/null
        then echo $RANLIB
        else echo "not found"
             echo "Unable to locate ranlib. If it's installed, try setting the environment variable RANLIB appropriately. (If your platform does not need ranlib, just set RANLIB=true.)"
             exit 1
        fi
    fi

@MaskRay MaskRay self-assigned this Apr 4, 2024
MaskRay added a commit to MaskRay/llvm-project that referenced this issue Apr 4, 2024
-V prints the version information in both BSD and GNU ar/ranlib.

-v enables verbose output in BSD ranlib and GNU ar but is another alias
for --version in GNU ranlib. The GNU ranlib behavior is inconsistent:
`ranlib -v` is different from `ar -sv`.
But it's not a major concern in practice:

* Users typically use ranlib solely for creating archive symbol tables,
  and they don't need verbose output.
* Verbose output in ranlib seems a no-op.
* GNU ar creates an archive symbol table by default. Many ranlib uses
  have been eliminated.
* Modern linkers like lld/ELF (since version 14) and lld don't rely on
  archive symbol tables anymore.

https://reviews.llvm.org/D71554 introduced -v. This patch removes it so
that `llvm-ranlib -v` and `llvm-ranlib -version` lead to errors (GNU
ranlib rejects `-version` as well). -V is added as an alias for
--version.

Close llvm#87654
MaskRay added a commit to MaskRay/llvm-project that referenced this issue Apr 4, 2024
-V prints the version information in both BSD and GNU ar/ranlib.

-v enables verbose output in BSD ranlib and GNU ar but is another alias
for --version in GNU ranlib. The GNU ranlib behavior is inconsistent:
`ranlib -v` is different from `ar -sv`.
But it's not a major concern in practice:

* Users typically use ranlib solely for creating archive symbol tables,
  and they don't need verbose output.
* Verbose output in ranlib seems a no-op.
* GNU ar creates an archive symbol table by default. Many ranlib uses
  have been eliminated.
* Modern linkers like lld/ELF (since version 14) and lld don't rely on
  archive symbol tables anymore.

https://reviews.llvm.org/D71554 introduced -v. This patch removes it so
that `llvm-ranlib -v` and `llvm-ranlib -version` lead to errors (GNU
ranlib rejects `-version` as well). -V is added as an alias for
--version.

Close llvm#87654

Pull Request: llvm#87661
MaskRay added a commit that referenced this issue Apr 5, 2024
-V prints the version information in both BSD and GNU ar/ranlib.

BSD ranlib rejects -v while -v enables verbose output in GNU ar but is
another alias for --version in GNU ranlib. The GNU ranlib behavior is
inconsistent: `ranlib -v` is different from `ar -sv`. But it's not a
major concern in practice:

* Users typically use ranlib solely for creating archive symbol tables,
  and they don't need verbose output.
* Verbose output in ranlib seems a no-op.
* GNU ar creates an archive symbol table by default. Many ranlib uses
  have been eliminated.
* Modern linkers like lld/ELF (since version 14) and mold don't rely on
  archive symbol tables anymore.

https://reviews.llvm.org/D71554 introduced -v. This patch removes it so
that `llvm-ranlib -v` and `llvm-ranlib -version` lead to errors (GNU
ranlib rejects `-version` as well). -V is added as an alias for
--version.

Close #87654

Pull Request: #87661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants