-
Notifications
You must be signed in to change notification settings - Fork 4
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
Please add ARM compiler RT library #97
Comments
Strictly I could not verify it at 100% because built-in linker is not working for cross compiling ARM
|
All the same, anyway, an external linker has to take this library from somewhere. |
Thanks for reporting this. Which version are you using? Can you give me the result of |
|
Looks like it is need to add:
into llvm section of snapcraft.yaml it would also be cool to add libunwind because it is sort of runtime library for dlang without betterC
|
This should improve the cross-compiler support, for example if we want to build for ARM. Part of ldc-developers#97.
OK, so let's try and break this down following @kinke's feedback on #101. Some of the reported errors appear to be unrelated to ARM and are instead about using LLD. I can reproduce with the following steps:
This results in the error:
If I do not have
If instead I try to build with
I get the errors:
... which suggests that lld can be used per se, but the system libraries it requires/expects are missing from the snap package. The The flag is used with the snap package, but not with the standard LDC binaries, to avoid linker errors when searching for paths that do not exist. Essentially it's a workaround for including all of That aside, it's clear we have (at least) 2 separate problems here:
A related question is how much the snap package should aim to fulfil that goal. For example: what is the current state of support provided by LDC binary packages? @denizzzka are you able/willing to try using one of the LDC binary packages downloadable from GitHub (https://github.com/ldc-developers/ldc/releases/tag/v1.18.0 should give you a comparable setup) and compare how it works when trying to cross-compile, with and without using |
What kind of erros? |
The |
The lld arg has been resolved with v1.20... |
On the more general problem: multi-arch cross-compiling support for snap packages is non-trivial in general. To see why, consider the following difference between the linking of 64-bit and 32-bit libs in the snap package: 64-bit:
32-bit:
This is almost certainly why the snap package (as currently written) reports some missing diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 0171f08..15b55cc 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -58,6 +58,13 @@ parts:
- g++-multilib
- ninja-build
- zlib1g-dev
+ stage-packages:
+ - on amd64:
+ - lib32gcc1
+ - libc6-i386
+ - on i386:
+ - lib64gcc1
+ - libc6-amd64
after:
- ctest-setup
- ldc-bootstrap ... after which the 32-bit libs link up against those staged packages instead:
|
I've created a separate issue for this: #102. |
Please add ARM compiler RT library to prevent linking errors while cross-compile. Errors like:
The text was updated successfully, but these errors were encountered: