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

Fix Tizen ARMEL Build Failure #55545

Merged
merged 2 commits into from
Jul 13, 2021
Merged

Fix Tizen ARMEL Build Failure #55545

merged 2 commits into from
Jul 13, 2021

Conversation

clamp03
Copy link
Member

@clamp03 clamp03 commented Jul 13, 2021

No description provided.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@@ -14,10 +14,10 @@
#include <assert.h>
#include <limits.h>
#include <errno.h>
#ifdef TARGET_LINUX
#if defined(TARGET_LINUX) && !defined(ARM_SOFTFP)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARM_SOFTFP does not look like the most appropriate define to use for this context. Is there a better one to use?

cc @janvorli

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clamp03 what is the build error that you were getting? I don't think we should base this check on the ARM_SOFTFP, since I don't believe it is related to memfd_create. I guess the issue is most likely a very recent distro that has something different w.r.t. the memfd_create.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janvorli
Build error message (armel+tizen cross build) is

  [  2%] Building C object Native.Unix/System.IO.Compression.Native/CMakeFiles/System.IO.Compression.Native-Static.dir/home/dheon/work/dotnet/jobs/fnv/runtime/src/libraries/Native/AnyOS/brotli/common/platform.c.o
  /home/dheon/work/dotnet/jobs/fnv/runtime/src/coreclr/minipal/Unix/doublemapping.cpp:18:10: fatal error: 'linux/memfd.h' file not found 
  #include <linux/memfd.h>                                                                                                              
           ^~~~~~~~~~~~~~~                                                                                                                                                                                                                                                      
  1 error generated.

In our armel build environment (cross build rootfs), memfd_create and MFD_CLOEXEC are defined in headers included by sys/mman.h. (others are not)

How about MFD_CLOEXEC instead of ARM_SOFTFP? If MFD_CLOEXEC is defined in sys/mman.h already, it doesn't need to include linux/memfd.h. Then I think it can support both old and very recent distro.
Thank you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a good way.

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@davidwrighton davidwrighton merged commit 59ab54c into dotnet:main Jul 13, 2021
@clamp03
Copy link
Member Author

clamp03 commented Jul 13, 2021

Thank you!

@clamp03 clamp03 deleted the fixbuild branch July 13, 2021 22:44
@ghost ghost locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants