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

Invalid CoreCLR directory path in CMakeFile #181

Open
giritrivedi opened this issue Dec 10, 2024 · 8 comments
Open

Invalid CoreCLR directory path in CMakeFile #181

giritrivedi opened this issue Dec 10, 2024 · 8 comments

Comments

@giritrivedi
Copy link

Hello,
In CMakeList.txt of netcoredbg below code looks to be incorrect,
set(CORECLR_SRC_DIR "${CORECLR_DIR}/src")

What should be the correct path to be set to CORECLR_DIR ?

@gbalykov
Copy link
Member

Do you have some build issues? CORECLR_SRC_DIR takes in account both older coreclr repo (https://github.com/dotnet/coreclr before merge in https://github.com/dotnet/runtime, e.g. .Net Core 3.1), as well as new runtime repo.

@giritrivedi
Copy link
Author

yes.. If above repo paths are given, it will throw an error if /dotnet/runtime repo is given and the condition below will fail

# Basic checks for valid paths
if (NOT IS_DIRECTORY "${CORECLR_SRC_DIR}/pal")
    message(FATAL_ERROR "Invalid CoreCLR source directory")
endif()

as /dotnet/runtime/pal is invalid here. Pal directory is located at /dotnet/runtime/src/coreclr/pal ,
Hence I had to pass /dotnet/runtime/src/coreclr directory path.

@giritrivedi
Copy link
Author

Hence I think,
The code needs to be changed from set(CORECLR_SRC_DIR "${CORECLR_DIR}/src") to set(CORECLR_SRC_DIR "${CORECLR_DIR}") and Proper path of CORECLR_DIR should be passed as /dotnet/runtime/src/coreclr

@giritrivedi
Copy link
Author

Let me know if its proper to provide the fix, i will submit.

@viewizard
Copy link
Member

The code needs to be changed from set(CORECLR_SRC_DIR "${CORECLR_DIR}/src") to set(CORECLR_SRC_DIR "${CORECLR_DIR}")

In this case you broke build with previous CoreCLR versions. In case you want provide changes, please, make sure it will work for all CoreCLR sources since version 3.1.

@gbalykov
Copy link
Member

gbalykov commented Dec 15, 2024

Hence I had to pass /dotnet/runtime/src/coreclr directory path.

This is intentional behavior, CORECLR_SRC_DIR variable represents dir of CoreCLR, and runtime repo contains other stuff too. Path to CoreCLR is passed right now to support build with new and old repos. You can propose some change that will support passing dotnet/runtime, but this change should not break build with older repo.

@giritrivedi
Copy link
Author

Thanks.
Microsoft is no more using https://github.com/dotnet/coreclr repo. Active development is happening in https://github.com/dotnet/runtime. I Suppose we should be using this going further.

@viewizard
Copy link
Member

For this time we support build starts from CoreCLR 3.1, since it still used in old, but still supported by Samsung versions of Tizen OS, that don't provide other source packages of CoreCLR for debugger build. This mean, netcoredbg build must support CoreCLR versions 3.1, 6.0, 8.0, ... (usually LTS + current release versions) in order to support all actively supported Tizen OS versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants