-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
4.10 branch - tests/output-complete-obj fails on FreeBSD-12 (at least 12.1-RC2) #9068
Comments
I encountered a similar failure when I tried version 4.09 with |
@bschommer interesting. I use clang for both compiler and linker (i.e. no binutils ld, but clang's lld). |
Similar setting here, we also use both clang and lld. The error message is the same one. |
In recent FreeBSD, `cc` is Clang and `ld` is LLD, the LLVM linker, but `as` is still GNU. Moreover, Clang contains its own assembler and does not call `as`. Consequently, object files produced by invoking `as` directly are slightly different from those produced by `cc`. This can cause obscure errors such as issue ocaml#9068: `ld -r` fails when combining objects produced by `as` and objects produced by `cc`. The workaround is to use `cc` as the assembler. We already did that for the ARM and ARM64 targets, but ocaml#9068 shows that it is necessary for AMD64 too. Just use `cc` as assembler for all FreeBSD targets.
In recent FreeBSD, `cc` is Clang and `ld` is LLD, the LLVM linker, but `as` is still GNU. Moreover, Clang contains its own assembler and does not call `as`. Consequently, object files produced by invoking `as` directly are slightly different from those produced by `cc`. This can cause obscure errors such as issue ocaml#9068: `ld -r` fails when combining objects produced by `as` and objects produced by `cc`. The workaround is to use `cc` as the assembler. We already did that for the ARM and ARM64 targets, but ocaml#9068 shows that it is necessary for AMD64 too. Just use `cc` as assembler for all FreeBSD targets. Closes: ocaml#9068
I was able to reproduce and diagnose the problem. One difference in the section where The solution is to use |
In recent FreeBSD, `cc` is Clang and `ld` is LLD, the LLVM linker, but `as` is still GNU binutils. Moreover, Clang contains its own assembler and does not call `as`. Consequently, object files produced by invoking `as` directly are slightly different from those produced by `cc`. This can cause obscure errors such as issue ocaml#9068: `ld -r` fails when combining objects produced by `as` and objects produced by `cc`. The workaround is to use `cc` as the assembler. We already did that for the ARM and ARM64 targets, but ocaml#9068 shows that it is necessary for AMD64 too. Just use `cc` as assembler for all FreeBSD targets. Similar issues were reported under Linux when clang and LLD are used instead of GCC and binutils. We already used clang as the preprocessed assembler in this case. Also use clang as the assembler in this case. Closes: ocaml#9068
Thanks @xavierleroy for your investigation and fix. I successfully tested #9437 -- the output-complete-obj test no longer fails on FreeBSD 12.1. |
…ms (#9437) In recent FreeBSD, `cc` is Clang and `ld` is LLD, the LLVM linker, but `as` is still GNU binutils. Moreover, Clang contains its own assembler and does not call `as`. Consequently, object files produced by invoking `as` directly are slightly different from those produced by `cc`. This can cause obscure errors such as issue #9068: `ld -r` fails when combining objects produced by `as` and objects produced by `cc`. The workaround is to use `cc` as the assembler. We already did that for the ARM and ARM64 targets, but #9068 shows that it is necessary for AMD64 too. Just use `cc` as assembler for all FreeBSD targets. Similar issues were reported under Linux when clang and LLD are used instead of GCC and binutils. We already used clang as the preprocessed assembler in this case. Also use clang as the assembler in this case. Closes: #9068 (cherry picked from commit 88a1bce)
when I run the testsuite with the 4.10 branch on my FreeBSD machine (amd64, 12-stable which uses clang 8.0.1 (similar to 12.1RC2 http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/12.1/) -- not sure whether this is as well an issue in 12.0), I see a single failing test (
output-complete-obj
):manually running the test to see the output:
The text was updated successfully, but these errors were encountered: