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

Fixed build error #108633

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JongHeonChoi
Copy link
Contributor

@JongHeonChoi JongHeonChoi commented Oct 8, 2024

A build error occurred in Tizen OS as below.

[   85s] /usr/share/dotnet.tizen/netcoreapp/src/pal/inc/pal.h:4180:19: error: missing binary operator before token "("
[   85s]  4180 | #if !__has_builtin(_rotl)
[   85s]       |                   ^
[   85s] /usr/share/dotnet.tizen/netcoreapp/src/pal/inc/pal.h:4205:19: error: missing binary operator before token "("
[   85s]  4205 | #if !__has_builtin(_rotr)
[   85s]       |                   ^
[   86s] make[2]: *** [CMakeFiles/dotnet_launcher_util.dir/build.make:76: CMakeFiles/dotnet_launcher_util.dir/tool/r2r_checker.cc.o] Error 1
[   86s] make[2]: *** Waiting for unfinished jobs....
  1. Fix illumos-x64 build #85006
    -> The location of the code has been changed.

  2. Unify hardware feature detection between CoreCLR JIT and AOT #89342
    -> The code has been deleted.

So I restore the code again.

#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

I think it should be applied to release/8.0-staging branch as well.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Oct 8, 2024
@jkotas
Copy link
Member

jkotas commented Oct 8, 2024

What's the compiler and version that you are using to build that is missing __has_builtin?

@JongHeonChoi
Copy link
Contributor Author

JongHeonChoi commented Oct 8, 2024

What's the compiler and version that you are using to build that is missing __has_builtin?

[  156s] -- The C compiler identification is GNU 9.2.0
[  157s] -- The CXX compiler identification is GNU 9.2.0

In addition, no error occurred in version 14.1.0.

@jkotas
Copy link
Member

jkotas commented Oct 8, 2024

@am11 Could you please take a look?

@am11
Copy link
Member

am11 commented Oct 8, 2024

@JongHeonChoi, I am having hard time understanding how is it failing? It was moved here:

#ifndef __has_builtin
#define __has_builtin(x) 0
and that header is included in pal.h:
#include <minipal/utils.h>

We were using gcc 8.4 on illumos until recently (now switched to 13), so I know that this is a known requirement for gcc < v10 on all platforms. Can you check why minipal/utils.h not making a difference?

@JongHeonChoi
Copy link
Contributor Author

@am11
Currently, we were in the process of building based on .NET8. This is because minipal/utils.h was not applied in version 8.0.
Actually, I think it should be applied to 8.0 branch, not main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-PAL-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants