.NET Runtime Docker build tools missing openssl
Hi, I am trying to build a modified .net runtime using docker and I get the following error:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
I cloned the repo locally and ran this :
docker run --rm -v (my windows path here):/runtime -w /runtime mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64 ./build.sh --subset clr --configuration Checked
.
Anyone has an idea ?
I would ultimately like to be able to install the modified version so I can try a bugfix in my project11 Replies
Maybe the image needs openssl1.1? Think openssl3.0 is the default on newer images and doesn't map the same (if I recall, correctly).
https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu2.23
it's weird if I need to play with the image to work, it's custom made to build .net from source 😅
Same issue with
ubuntu-24.04-helix-amd64
I see a lot of build disabled. Maybe this is why? https://github.com/dotnet/dotnet/blob/main/src/sdk/eng/pipelines/templates/stages/vmr-build.yml#L248
hm that's a good question! I can't seem to be able to build it locally, was hoping the container would fix that issue... supposed to be the whole freakin point of docker is that it's repeatable for everyone 😅
So far, just seems to have been two packages it was missing - but the build containers definitely aren't all 2legit2quit for this.
Build succeeded; just a painfully slow export.
My dockerfile contents, if you want to just build without sorting package dependencies:
NOTE: If you want to build from a release tag, the steps are little more involved.
To build from a tag, you'd have to do this:
damn, NICE! You're amazing 🙌. I sadly have to work an entire day before I can fiddle with it. I'll see later today if it works
I'll just mount a volume again like in my original command
Coudn't wait 😐
It does work. At least I can run all the unit tests like that too.
Do you know if I can use that setup to create the SDK installer / use that runtime in VS ? I changed the "runtime" not the "dotnet" repo. It would be easier to actually install it so I can use it normally with VS without working in dev containers since I do desktop apps that manipulate a lot of stuff on the PC that I don't really wanna go through containers when debugging
On a dev machine, you'd just unpack it into the target folder -- but you should use a separate machine (e.g.: Hyper-V, VMWare, etc.) to not mux your .NET build with distributed binaries via the supported channels (e.g.: Windows updates might freak about binary signatures not matching).
oh that easy, gotcha!