gentoo / libressl

[MIRROR] LibreSSL ebuilds testing repository
https://gitweb.gentoo.org/repo/proj/libressl.git
72 stars 44 forks source link

dev-dotnet/dotnet-sdk build failed: no usable version of libssl #575

Open blucybrb14de opened 3 weeks ago

blucybrb14de commented 3 weeks ago

Try using dev-dotnet/dotnet-sdk instead of dev-dotnet/dotnet-sdk-bin.

Originally posted by @orbea in >https://github.com/gentoo/libressl/issues/571#issuecomment-2447366760

Looks like dev-dotnet/dotnet-sdk fails to compile against LibreSSL 4.0.0.

dev-libs/libressl: LibreSSL 4.0.0

dotnet-sdk-8.0.107.log

inxi-output.log

Error Message:

>>> Unpacking source...
>>> Unpacking dotnet-sdk-8.0.107-prepared-gentoo-amd64.tar.xz to /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work
>>> Source unpacked in /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work
>>> Preparing source in /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work/dotnet-sdk-8.0.7 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work/dotnet-sdk-8.0.7 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work/dotnet-sdk-8.0.7 ...
 * Building the .NET SDK 8.0 ...
Detected '--': passing remaining parameters '-maxCpuCount:20 -verbosity:minimal -p:ContinueOnPrebuiltBaselineError=true -p:LogVerbosity=minimal -p:MinimalConsoleLogOutput=false -p:verbosity=minimal' as build.sh arguments.
Found bootstrap SDK 8.0.106, bootstrap Arcade 8.0.0-beta.24266.3, bootstrap SourceLink 8.0.0-beta.23615.1

Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.106
No usable version of libssl was found
./build.sh: line 256:    69 Aborted                 (core dumped) "$CLI_ROOT/dotnet" build-server shutdown                                                                                       [ !! ]
 * ERROR: dev-dotnet/dotnet-sdk-8.0.107::gentoo failed (compile phase):
 *   build failed
 *
 * Call stack:
 *     ebuild.sh, line 136:  Called src_compile
 *   environment, line 3047:  Called die
 * The specific snippet of code:
 *       eend ${?} || die "build failed"
 *
 * If you need support, post the output of `emerge --info '=dev-dotnet/dotnet-sdk-8.0.107::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-dotnet/dotnet-sdk-8.0.107::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work/dotnet-sdk-8.0.7'
 * S: '/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.107/work/dotnet-sdk-8.0.7'
orbea commented 3 weeks ago

So the bootstrap depends on a precompiled version of the dotnet-sdk that was built against openssl?

I'm not sure there is anything I can do with a precompiled binary?

blucybrb14de commented 3 weeks ago

So the bootstrap depends on a precompiled version of the dotnet-sdk that was built against openssl?

I'm not sure there is anything I can do with a precompiled binary?

I'm not exactly sure if there is exactly a way to get this working properly, besides asking upstream for a solution.

I was able to find a similar issue for dotnet-sdk on their github page.

In theory, it should be possible to compile dotnet-sdk as a bootstrap binary against libressl and then place it in the /files/* directory, however I was not able to pass the right flags to get it to compile? Maybe if there is any workaround so that dotnet-sdk-bin or the bootstrap binary can detect or not check for the version of libssl, that might work?

I tried to compile using ./build.sh, using the CLR_OPENSSL_VERSION_OVERRIDE=43, but it does not looks like that works. Right now, dotnet-sdk-bin as dotnet wont even compile if it detects the wrong libssl version.

orbea commented 3 weeks ago

There is documentation on how to make your own bootstrap, but it doesn't seem clear to me...

https://github.com/dotnet/source-build/blob/b05c0daf8b26acd8f8862abe7fe5e0177234d5bb/Documentation/boostrap-new-os.md

blucybrb14de commented 2 weeks ago

There is documentation on how to make your own bootstrap, but it doesn't seem clear to me...

https://github.com/dotnet/source-build/blob/b05c0daf8b26acd8f8862abe7fe5e0177234d5bb/Documentation/boostrap-new-os.md

After devoting some time to it today, it appears that there might be some information in the documentation that needs to be updated, so I have let upstream know and I've created an issue: https://github.com/dotnet/source-build/issues/4726

We should be able to get dotnet support on Gentoo LibreSSL systems, relatively easy, I also believe that dotnet-sdk is needed for a lot of gaming and other utilities. But like I said, it shouldn't be too difficult to rewrite the ebuild to use the bootstrapped binary, as soon as I can get clarification back.

blucybrb14de commented 1 week ago

UPDATE: It seems like there is, in-fact outdated documentation, their new documentation is not current for building the boostrap with LibreSSL.

https://github.com/dotnet/source-build/issues/4729

orbea commented 1 week ago

There are also directions in the Gentoo ebuild which I noticed now, but with all the rust upheaval I haven't tried to see if that is enough yet.

# Pre-build (and distribution preparation)
# Build the tarball:
#  git clone --depth 1 -b v8.0.7 https://github.com/dotnet/dotnet dotnet-sdk-8.0.7
#  cd dotnet-sdk-8.0.7
#  git rev-parse HEAD
#  ./prep.sh
#  rm -fr .git
#  cd ..
#  tar -acf dotnet-sdk-8.0.107-prepared-gentoo-amd64.tar.xz dotnet-sdk-8.0.7
# Upload dotnet-sdk-8.0.107-prepared-gentoo-amd64.tar.xz