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

[SR-13083] ./src/llvm-project/llvm/bindings/ocaml/backends, "ar" fails, 5.3-DEVELOPMENT-SNAPSHOT-2020-06-24-a #55529

Open
swift-ci opened this issue Jun 25, 2020 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-13083
Radar None
Original Reporter soloturn (JIRA User)
Type Bug
Environment

the build script:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=swift-language

this is fixed in DEVELOPMENT-SNAPSHOT-2020-06-24-a

{{}}

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: e15ce96afcc14d73f15d3ba804c47473

Issue Description:


[1841/3945][ 46%][3209.741s] Building OCaml library llvm_AArch64
FAILED: bindings/ocaml/backends/llvm_AArch64.cma bindings/ocaml/backends/libllvm_AArch64.a bindings/ocaml/backends/llvm_AArch64.cmxa bindings/ocaml/backends/llvm_AArch64.a bindings/ocaml/backends/llvm_AArch64.cmi bindings/ocaml/backends/llvm_AArch64.cmo bindings/ocaml/backends/llvm_AArch64.cmx bindings/ocaml/backends/llvm_AArch64.o 
cd /run/media/3tb-home/1tb-no-space/src/swift-language/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bindings/ocaml/backends && /usr/bin/ocamlfind ocamlmklib -o llvm_AArch64 -lstdc++ -ldopt -L/run/media/3tb-home/1tb-no-space/src/swift-language/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/./lib -ccopt "-L\\\$CAMLORIGIN/../.." -ccopt "-Wl,-rpath,\\\$CAMLORIGIN/../.." -custom -lLLVMAArch64Disassembler -lLLVMMCDisassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMCFGuard -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMAArch64Desc -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBinaryFormat -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMSupport -lLLVMDemangle -l/usr/lib/libz.so -lrt -ldl -ltinfo -lpthread -lm -ldopt "-Wl,-rpath,\\\$ORIGIN/../../../lib" llvm_AArch64.mli llvm_AArch64.ml AArch64_ocaml.o
ar: invalid option – '/'
Usage: ar [emulation options] [-]\{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
 ar -M [<mri-script]
 commands:
 d - delete file(s) from the archive
 m[ab] - move file(s) in the archive
 p - print file(s) found in the archive
 q[f] - quick append file(s) to the archive
 r[ab][f][u] - replace existing or insert new file(s) into the archive
 s - act as ranlib
 t[O][v] - display contents of the archive
 x[o] - extract file(s) from the archive
 command specific modifiers:
 [a] - put file(s) after [member-name]
 [b] - put file(s) before [member-name] (same as [i])
 [D] - use zero for timestamps and uids/gids (default)
 [U] - use actual timestamps and uids/gids
 [N] - use instance [count] of name
 [f] - truncate inserted file names
 [P] - use full path names when matching
 [o] - preserve original dates
 [O] - display offsets of files in the archive
 [u] - only replace files that are newer than current archive contents
 generic modifiers:
 [c] - do not warn if the library had to be created
 [s] - create an archive index (cf. ranlib)
 [S] - do not build a symbol table
 [T] - make a thin archive
 [v] - be verbose
 [V] - display the version number
 @<file> - read options from <file>
 --target=BFDNAME - specify the target object format as BFDNAME
 --output=DIRNAME - specify the output directory for extraction operations
 optional:
 --plugin <p> - load the specified plugin
 emulation options: 
 No emulation specific options
ar: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64 pe-i386 srec symbolsrec verilog tekhex binary ihex plugin
[1844/3945][ 46%][3226.811s] Building CXX object lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting

@swift-ci
Copy link
Collaborator Author

Comment by solo turn (JIRA)

with 5.3-DEVELOPMENT-SNAPSHOT-2020-06-29-a

[1802/3905][ 46%][5862.902s] Building OCaml library llvm_AArch64
FAILED: bindings/ocaml/backends/llvm_AArch64.cma bindings/ocaml/backends/libllvm_AArch64.a bindings/ocaml/backends/llvm_AArch64.cmxa bindings/ocaml/backends/llvm_AArch64.a bindings/ocaml/backends/llvm_AArch64.cmi bindings/ocaml/backends/llvm_AArch64.cmo bindings/ocaml/backends/llvm_AArch64.cmx bindings/ocaml/backends/llvm_AArch64.o
cd /run/media/3tb-home/1tb-no-space/src/swift-language/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bindings/ocaml/backends && /usr/bin/ocamlfind ocamlmklib -o llvm_AArch64 -lstdc++ -ldopt -L/run/media/3tb-home/1tb-no-space/src/swift-language/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/./lib -ccopt "-L\$CAMLORIGIN/../.." -ccopt "-Wl,-rpath,\$CAMLORIGIN/../.." -custom -lLLVMAArch64Disassembler -lLLVMMCDisassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMCFGuard -lLLVMAsmPrinter -lLLVMDebugInfoDWARF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMAArch64Desc -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMBinaryFormat -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMSupport -lLLVMDemangle -l/usr/lib/libz.so -lrt -ldl -ltinfo -lpthread -lm -ldopt "-Wl,-rpath,\$ORIGIN/../../../lib" llvm_AArch64.mli llvm_AArch64.ml AArch64_ocaml.o
ar: invalid option – '/'
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin ] [member-name] [count] archive-file file...
ar -M [<mri-script]

@swift-ci
Copy link
Collaborator Author

swift-ci commented Aug 1, 2020

Comment by solo turn (JIRA)

@natecook1000 - this happens when ocam is installed on arch linux, also for swift from git.
```
LDFLAGS='-ldl -lpthread' python swift/utils/build-script --preset=buildbot_linux,no_test install_destdir="$srcdir/build" installable_package="/tmp/swift-arch-pkg.tar.gz"
```

not sure what the difference is, but llvm builds without patch, see here or the PKGBUILD file:
https://www.archlinux.org/packages/extra/x86_64/llvm/
https://github.com/archlinux/svntogit-packages/blob/packages/llvm/trunk/PKGBUILD

containing:
```
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_HOST_TRIPLE=$CHOST \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DLLVM_ENABLE_DOXYGEN=OFF \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DLLVM_BINUTILS_INCDIR=/usr/include
ninja all ocaml_doc
```

@swift-ci
Copy link
Collaborator Author

swift-ci commented Aug 7, 2020

Comment by solo turn (JIRA)

see here: https://forums.swift.org/t/ninja-build-failure-on-ubuntu-20-04/35883 for the same error on ubuntu 20.04

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant