Skip to content

Misc. illumous build fixes (prereq. for #105403) #117023

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

gwr
Copy link
Contributor

@gwr gwr commented Jun 25, 2025

Co-authored-by: Adeel Mujahid [email protected]

  • Workaround Bootstrap is failing on platform without AOT support #116929 Update eng/Subsets.props

  • Fix compile error at minipal/debugger.c:127

    dotnet/runtime/src/native/minipal/debugger.c:127:5: error: implicit declaration of function 'snprintf' [-Werror=implicit-function-declaration]
    127 | snprintf(statusFilename, sizeof(statusFilename), "/proc/%d/status", getpid());
    | ^~~~~~~~

  • Fix compile error in minipal/thread.h

    src/native/minipal/thread.h:73:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
    73 | tid = (size_t)(void*)pthread_self();
    | ^~~~~~~~~~~~~~~~~~~~~

  • Fix compile error in native/libs/System.Native/pal_mount.c

src/native/libs/System.Native/pal_mount.c:164:38: error: 'struct statvfs' has no member named 'f_type'
164 | *formatType = (int64_t)(stats.f_type);
| ^

  • Fix compile error in coreclr/pal/src/thread/thread.cpp

    /home/gwr/dotnet/runtime/src/coreclr/pal/src/thread/thread.cpp:1367:5: error: 'cid' was not declared in this scope
    1367 | cid = CLOCK_THREAD_CPUTIME_ID;
    | ^~~

  • Fix compile error in coreclr/vm/appdomain.hpp

src/coreclr/vm/appdomain.hpp:1934:40: error: declaration of 'constexpr SystemDomain** const cdac_data::SystemDomain' changes meaning of 'SystemDomain' [-Wchanges-meaning]
1934 | static constexpr PTR_SystemDomain* SystemDomain = &SystemDomain::m_pSystemDomain;
| ^~~~~~~~~~~~
src/coreclr/vm/appdomain.hpp:1934:56: note: used here to mean 'class SystemDomain'
1934 | static constexpr PTR_SystemDomain* SystemDomain = &SystemDomain::m_pSystemDomain;
| ^~~~~~~~~~~~
src/coreclr/vm/appdomain.hpp:1629:7: note: declared here
1629 | class SystemDomain final
| ^~~~~~~~~~~~

  • Fix compile error in coreclr/runtime/amd64/AllocFast.S

coreclr/runtime/amd64/AllocFast.S: Assembler messages:
coreclr/runtime/amd64/AllocFast.S:237: Error: missing ')'

  • Add HAVE_DIRENT_D_TYPE introspection

  • Fix compile errors in coreclr/tools/superpmi/mcs/verbmerge.cpp

    /runtime/src/coreclr/tools/superpmi/mcs/verbmerge.cpp: In static member function 'static bool verbMerge::DirectoryFilterDirectories(FilterArgType*)': /runtime/src/coreclr/tools/superpmi/mcs/verbmerge.cpp:188:19: error: 'verbMerge::FilterArgType' {aka 'struct dirent'} has no member named 'd_type'
    188 | if (findData->d_type == DT_DIR)
    | ^~~~~~

and similar a few other places in this file

Let FilterArgType use struct FindData to simplify filters.
Handle the possibility of finding d_type == DT_UNKOWN

am11 and others added 6 commits June 24, 2025 13:39
Update eng/Subsets.props

Co-authored-by: Adeel Mujahid <[email protected]>
  dotnet/runtime/src/native/minipal/debugger.c:127:5: error: implicit declaration of function 'snprintf' [-Werror=implicit-function-declaration]
    127 |     snprintf(statusFilename, sizeof(statusFilename), "/proc/%d/status", getpid());
        |     ^~~~~~~~
  src/native/minipal/thread.h:73:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     73 |         tid = (size_t)(void*)pthread_self();
        |                       ^~~~~~~~~~~~~~~~~~~~~
 src/native/libs/System.Native/pal_mount.c:164:38: error: 'struct statvfs' has no member named 'f_type'
    164 |         *formatType = (int64_t)(stats.f_type);
        |                                      ^
  /home/gwr/dotnet/runtime/src/coreclr/pal/src/thread/thread.cpp:1367:5: error: 'cid' was not declared in this scope
   1367 |     cid = CLOCK_THREAD_CPUTIME_ID;
        |     ^~~
 src/coreclr/vm/appdomain.hpp:1934:40: error: declaration of 'constexpr SystemDomain** const cdac_data<SystemDomain>::SystemDomain' changes meaning of 'SystemDomain' [-Wchanges-meaning]
   1934 |     static constexpr PTR_SystemDomain* SystemDomain = &SystemDomain::m_pSystemDomain;
        |                                        ^~~~~~~~~~~~
  src/coreclr/vm/appdomain.hpp:1934:56: note: used here to mean 'class SystemDomain'
   1934 |     static constexpr PTR_SystemDomain* SystemDomain = &SystemDomain::m_pSystemDomain;
        |                                                        ^~~~~~~~~~~~
  src/coreclr/vm/appdomain.hpp:1629:7: note: declared here
   1629 | class SystemDomain final
        |       ^~~~~~~~~~~~
gwr and others added 2 commits June 25, 2025 13:51
 on illumos with gcc 13.3 cross copmiler
 coreclr/runtime/amd64/AllocFast.S: Assembler messages:
  coreclr/runtime/amd64/AllocFast.S:237: Error: missing ')'
@gwr
Copy link
Contributor Author

gwr commented Jun 25, 2025

I'm keeping the commits in this PR separately for now as that's easier for my local work.
I'll happily squash this all once people are happy with the changes.

@am11
Copy link
Member

am11 commented Jun 25, 2025

I'll happily squash this all once people are happy with the changes.

Repo maintainers can squash on merge (GitHub merge button has that option).

@@ -281,12 +288,47 @@ int verbMerge::FilterDirectory(LPCWSTR dir,
dirent *pEntry = readdir(pDir);
while (pEntry != nullptr)
{
if ((fnmatch(searchPatternUtf8.c_str(), pEntry->d_name, 0) == 0) && filter(pEntry))
int dirEntryType;
Copy link
Member

Choose a reason for hiding this comment

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

@dotnet/jit-contrib Could you please review the superpmi changes?

This comment was marked as spam.

Copy link
Contributor

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

  /runtime/src/coreclr/tools/superpmi/mcs/verbmerge.cpp: In static member function 'static bool verbMerge::DirectoryFilterDirectories(FilterArgType*)':
  /runtime/src/coreclr/tools/superpmi/mcs/verbmerge.cpp:188:19: error: 'verbMerge::FilterArgType' {aka 'struct dirent'} has no member named 'd_type'
    188 |     if (findData->d_type == DT_DIR)
        |                   ^~~~~~

and similar a few other places in this file

Let FilterArgType use struct FindData to simplify filters.
Handle the possibility of finding d_type == DT_UNKOWN
@gwr
Copy link
Contributor Author

gwr commented Jul 2, 2025

Needs approvers. @am11 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x64 area-Infrastructure-coreclr community-contribution Indicates that the PR has been added by a community member os-SunOS SunOS, currently not officially supported
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants