-
Notifications
You must be signed in to change notification settings - Fork 199
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
[NativeAOT-LLVM] [Question]: why is c++ 11 not installed in the root fs on the linux distros? #2623
Comments
FYI, I believe the directory names under e.g. |
Thanks, there is an |
|
This cross-complication image is setup to target libraries (including standard C++ library) from Ubuntu 16. It looks like that standard C++ library is too old to compile LLVM. @jkoritzinsky have been looking into options for how we can use the new standard C++ library for these cross-compilation images using static linking. @jkoritzinsky Do you have any suggestions here? (Note that this is experimental project, so it is ok to cut some corners here to make things work.) |
I think due to the issues we found when trying to consume libc++, I think we need a slightly different solution. The best solution would be to make a new image that contains a statically-linkable libc++ as we talked about for dotnet/runtime. For now, I'd recommend using the "-sanitizer" image and passing the Another alternative would be to manually link against the dotnet/llvm-project libc++ (if that's where llvm is coming from) with the same options that Mono uses. |
Thanks, and I would need to install and build LLVM under the cross root (ROOTFS_DIR) ? |
You'd need to build LLVM against the rootfs, yes. |
Thanks, bit of a follow up , struct _libc_fpstate
{
unsigned long int __ctx(cw);
unsigned long int __ctx(sw);
unsigned long int __ctx(tag);
unsigned long int __ctx(ipoff);
unsigned long int __ctx(cssel);
unsigned long int __ctx(dataoff);
unsigned long int __ctx(datasel);
struct _libc_fpreg _st[8];
unsigned long int __ctx(status);
}; which doesnt have runtimelab/src/coreclr/pal/src/include/pal/context.h Lines 356 to 360 in 53342be
doesn't like. |
i.e.
|
As a quick workaround, you can try disabling |
Thanks, that works |
Can I go to the "host" root, to get libraries, e.g. for
This lib is not in the sysroot, can I assume the host arch is the same as the sysroot? |
If you link against the host, you can easily end up in a situation where the product becomes dependent on the host's capabilities, not the target. I wouldn't recommend it. I'd recommend installing more packages in the rootfs. |
Thanks, it has |
I've tried various cmake options to "cross" compile LLVM on the sysroot, and make it build a |
@yowl do you have a branch somewhere with your latest attempt, plus maybe instructions for running the Docker image locally? I might have some time next week to experiment with it. |
https://github.com/yowl/runtimelab/tree/linux-x64-jobs is the branch |
But change
Then try to run
Add |
All the prerequisites should be there with maybe the exception perhaps of |
I had some powershell syntax errors that caused cmake args to be merged. Fixing that has brought a new error
This symbol is in the sysroot
|
@yowl Removing the |
|
In Discord SA pointed me to a missing |
@yowl this commit worked for me: dicej@d97382f |
Ugg, must have not tried that properly or not deleted the build folder first... Thanks. |
When using the docker image
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-amd64-net9.0
there is:This means that for example the stdc++ header
<optional>
is not available in theROOTFS_DIR
. We need it to compile the LLVM headers. Is it simply the case that up till now nothing has required c++ headers from a later version of c++, and if so any suggestions about the way forward?Thanks.
The text was updated successfully, but these errors were encountered: