Summary: | =sys-devel/llvm-4.0.0-r2: llvm-ar does not support 'ar -r' (and friends) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alessandro Barbieri <lssndrbarbieri> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | haskell, jstein, mgorny, tsmksubc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugs.llvm.org/show_bug.cgi?id=21712 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
info
dev-haskell:regex-compat-0.95.1:20170522-014516.log cabal-1.24.2.0-llvm-ar.patch |
Description
Alessandro Barbieri
2017-05-21 04:42:25 UTC
Created attachment 473566 [details]
info
info
Your --info file does not describe how exactly you override AR and other vars. Do you have an example build.log for a faulty package? (In reply to Sergei Trofimovich from comment #2) > Your --info file does not describe how exactly you override AR and other > vars. > Do you have an example build.log for a faulty package? I use an "llvmbinutils" env file containing: AR="llvm-ar" NM="llvm-nm" RANLIB="llvm-ranlib" Created attachment 473732 [details]
dev-haskell:regex-compat-0.95.1:20170522-014516.log
example faulty emerge log
Aha, thank you! I think it's two bugs: - Cabal bug to call 'ar -r' instead of 'ar r' - minor llvm's infelicity to be not completely compatible with binutils' ar I've reproduced the error as: AR=llvm-ar HCFLAGS=-v CABAL_EXTRA_BUILD_FLAGS=-v emerge -1 regex-compat The output is: /usr/bin/llvm-ar -r dist/build/objs-24254/libHSregex-compat-0.95.1-Kazzd2jv476D4Ig45iYvjr.a dist/build/Text/Regex.o llvm-ar: Unknown command line argument '-r'. Try: '/usr/bin/llvm-ar -help' llvm-ar: Did you mean '-M'? Filed bug upstream as: https://github.com/haskell/cabal/issues/4530 Created attachment 473740 [details, diff]
cabal-1.24.2.0-llvm-ar.patch
cabal-1.24.2.0-llvm-ar.patch fixes cabal.
The patch will need to be applied both to cabal and ghc.
On the other hand opengroup documents specify only ar -r form: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ar.html I'll file a bug report to llvm. Found existing bug from 2014: https://bugs.llvm.org/show_bug.cgi?id=21712 Over to llvm@ on how they want to handle the mismatch on their side. Exact command example that does not work for llvm on linux: /usr/bin/llvm-ar -r dist/build/<foo>.a dist/build/<bar>.o llvm-ar: Unknown command line argument '-r'. Try: '/usr/bin/llvm-ar -help' llvm-ar: Did you mean '-M'? I don't think we really support using llvm-ar in place of ar. If you feel like it, please submit a patch upstream. Though I'm not convinced it's major enough issue to deserve backporting it, so probably RESO/UPST with fix in next LLVM release including it. Upstream got the fix as: https://github.com/llvm-mirror/llvm/commit/af481e4f940025c84ce601e68fdedbc1bd22cdd2 As said before, this is fixed in newer LLVM versions. Feel free to reopen if you really need this backported to 4. |