Skip to content

Define dirent d_type for Solaris based OS - #34263

Merged
jkotas merged 1 commit into
dotnet:masterfrom
am11:feature/solaris/installer-port
Apr 4, 2020
Merged

Define dirent d_type for Solaris based OS#34263
jkotas merged 1 commit into
dotnet:masterfrom
am11:feature/solaris/installer-port

Conversation

@am11

@am11am11 commented Mar 29, 2020

Copy link
Copy Markdown
Member
  1. On Solaris-like operating systems such as SmartOS, struct dirent does not contain a member called d_type. Although we have a comment about it:

    // Handle symlinks and file systems that do not support d_type
    but that itself is in a switch block over d_type. This delta defines d_type's DT_UNKNOWN and friends for Solaris.

  2. _X is defined in one of the system header, so undef it before #define:

    /usr/include/iso/ctype_iso.h:60:0: note: this is the location of the previous definition
    #define _X 0x00000080 /* heXadecimal digit */
    
  3. GCC build of installer was broken even on Linux, due to missing dl link in test project. Align it with what we are already using in src projects:

    target_link_libraries (${DOTNET_PROJECT_NAME}"dl")

Contributes to #4173.

@am11
am11 marked this pull request as ready for review March 29, 2020 22:00
@am11

am11 commented Mar 29, 2020

Copy link
Copy Markdown
MemberAuthor

With these changes:

src/installer/corehost/build.sh -apphostver "5.0.0-dev" -hostver "5.0.0-dev" \
-fxrver "5.0.0-dev" -policyver "5.0.0-dev" -commithash $(git rev-parse HEAD) -gcc

succeeds on SmartOS amd64. There is another layer of shared configuration for SunOS, which is based on top of #34211, I will create a separate PR once these are merged.

cc @jkotas

Comment threadsrc/installer/corehost/cli/hostmisc/pal.h Outdated
Comment threadsrc/installer/corehost/cli/hostmisc/pal.unix.cpp Outdated
@am11

am11 commented Mar 30, 2020

Copy link
Copy Markdown
MemberAuthor

Libraries tests failures are related to #28553.

Comment threadsrc/installer/corehost/cli/hostmisc/pal.h Outdated
Comment threadeng/native/configurecompiler.cmake Outdated
Comment threadsrc/installer/corehost/cli/hostmisc/pal.unix.cpp Outdated
Comment threadsrc/installer/corehost/cli/test/nativehost/CMakeLists.txt Outdated
@am11am11 changed the title Use POSIX compliant way of checking file statDefine dirent d_type for Solaris based OSMar 31, 2020
@am11

am11 commented Apr 1, 2020

Copy link
Copy Markdown
MemberAuthor

Resolved merge conflict and updated title to reflect what PR is doing now.

Comment threadsrc/installer/corehost/cli/test/nativehost/CMakeLists.txt Outdated

@lpereiralpereira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with a suggestion

Comment threadsrc/installer/corehost/cli/common.cmake Outdated
@am11

am11 commented Apr 4, 2020

Copy link
Copy Markdown
MemberAuthor

@jkotas, seems like two CI legs are green on AzDo but GitHub hasn't sync in past two days:

System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_ServerNoEncryption_NoConnect failure from Libraries Test Run release coreclr Windows_NT x86 Release leg seems unrelated, as PR does not touch Libraries (even :/eng/native/configurecompiler.cmake is not used by libraries - yet). However, there was no issue reported for it previously so I have filed #34545.

@jkotas
jkotas merged commit 9f0c540 into dotnet:masterApr 4, 2020
@am11
am11 deleted the feature/solaris/installer-port branch April 4, 2020 16:28
@ghostghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@am11@lpereira@elinor-fung@jkotas@Dotnet-GitSync-Bot