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

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

Open
blucybrb14de opened this issue Oct 30, 2024 · 6 comments
Open

Comments

@blucybrb14de
Copy link

blucybrb14de commented Oct 30, 2024

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

Originally posted by @orbea in >#571 (comment)

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'
@blucybrb14de blucybrb14de changed the title Dev-dotnet/dotnet-sdk build failed: no usable version of libssl dev-dotnet/dotnet-sdk build failed: no usable version of libssl Oct 30, 2024
@orbea
Copy link
Contributor

orbea commented Oct 30, 2024

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
Copy link
Author

blucybrb14de commented Oct 30, 2024

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
Copy link
Contributor

orbea commented Oct 31, 2024

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
Copy link
Author

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: dotnet/source-build#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
Copy link
Author

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

dotnet/source-build#4729

@orbea
Copy link
Contributor

orbea commented Nov 14, 2024

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

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

2 participants