Page 1 of 1

Running .NET Core on Mageia

PostPosted: Aug 3rd, '17, 17:32
by steveh
Hi all,

I'm trying to get .NET Core running on Mageia 6. They don't make official packages for Mageia, only the distributions listed here:

https://www.microsoft.com/net/core#linuxfedora

I've tried downloading the packages for all of the different RPM-based distributions, but all of them have library version conflicts of one sort or another.

For example, trying out the Fedora 23 package, I have the following libraries missing (this is from ldd):

libicuuc.so.54 => not found
libicui18n.so.54 => not found
libcrypto.so.10 => not found
libssl.so.10 => not found

I even went so far as to compile and install icu54 from source into /opt/libicu, and add /opt/libicu/lib to ld.so.conf, but I can't for the life of me figure out how to build a libssl or libcrypto that has the matching version numbers.

Can anyone help me figure this out?

thanks,
Steve

Re: Running .NET Core on Mageia

PostPosted: Aug 3rd, '17, 18:22
by doktor5000
Your best bet is to install the respective Mageia packages that contain those libraries with slightly different version number, and then create symlinks as ldd requests which point to the Mageia libraries.
You should be able to find the matching packages by searching for the filename as a pattern / regex:
Code: Select all
urpmf 'libicuuc.so.*'

should list all packages that contain a file where part of the filename/path contains "libicuuc.so.*"

Then you would create the symlink that it points to the Mageia version, so that it becomes (just a simplified example)

/usr/lib/libicuuc.so.54 => points to /usr/lib/libicuuc.so.57

Is that comprehensible?


The more correct way but much more complex way would be to compile the libraries into a custom prefix (/usr/local or /opt like you mentioned) but that is probably more hassle altogether,

Otherwise a fedora VM would also be an option.

Re: Running .NET Core on Mageia

PostPosted: Aug 3rd, '17, 20:00
by steveh
That makes sense, but unfortunately doesn't work. The libraries are missing some symbols, if I just symlink version .58 as version .54. Similar thing with libcrypto.

I'm actually OK with compiling the libraries into the custom prefix, it's kind of a pain but not the end of the world.

I'll keep trying to get this going...

Re: Running .NET Core on Mageia

PostPosted: Aug 3rd, '17, 20:14
by doktor5000
steveh wrote:I'm actually OK with compiling the libraries into the custom prefix, it's kind of a pain but not the end of the world.

AFAICT you would need to compile openssl 1.0.0 from https://www.openssl.org/source/old/1.0.0/ with something like

Code: Select all
./config shared linux-x86_64
make
make install

and then you might need to create symlinks in /usr/local/lib like

ln -s libssl.so.1.0.0 libssl.so.10
ln -s libcrypto.so.1.0.0 libcrypto.so.10

Re: Running .NET Core on Mageia

PostPosted: Aug 6th, '17, 05:12
by ngompa
OpenSSL needs to be compiled with the correct soname, as it does funny things to how the symbol lookups work. Otherwise you might get random crashes.

If I recall rightly, the Fedora DotNet SIG has some source packages for the dotnet stuff. I believe that our version of LLVM in Mageia is compatible with the .NET Core sources, so we may actually be able to build from those source packages to have normal binary packages. Currently, the Fedora DotNet SIG has a COPR group for their package projects, and they may be willing to enable Mageia support there. If someone is interested in collaborating with them to support .NET Core on Mageia and improve .NET for both distributions (as we do with the Fedora Rust SIG for Rust today), I think this would be highly welcome.

Re: Running .NET Core on Mageia

PostPosted: May 16th, '22, 08:22
by Umeaboy
I'm noticing that in the Fedora spec file for dotnet6.0 it's a requirement to already have dotnet-sdk-6.0 installed before rebuilding the src.rpm that they made.

Besides installing https://download-ib01.fedoraproject.org ... x86_64.rpm, is there no way to actually get around this?

Edit:

Trying to installing that package ends up with this error:

Code: Select all
Problem: conflicting requests
  - nothing provides libc.so.6(GLIBC_2.33)(64bit) needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides libc.so.6(GLIBC_2.34)(64bit) needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides libstdc++.so.6(GLIBCXX_3.4.30)(64bit) needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides aspnetcore-runtime-6.0(x86-64) >= 6.0.5-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides aspnetcore-targeting-pack-6.0(x86-64) >= 6.0.5-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides dotnet-apphost-pack-6.0(x86-64) >= 6.0.5-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides dotnet-runtime-6.0(x86-64) >= 6.0.5-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides dotnet-targeting-pack-6.0(x86-64) >= 6.0.5-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides dotnet-templates-6.0(x86-64) >= 6.0.105-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64
  - nothing provides netstandard-targeting-pack-2.1(x86-64) >= 6.0.105-1.fc37 needed by dotnet-sdk-6.0-6.0.105-1.fc37.x86_64


aspnetcore-runtime-6.0 seems to be built by the dotnet-sdk so we're back at square 1.

Re: Running .NET Core on Mageia

PostPosted: May 16th, '22, 17:33
by doktor5000
If you have a question about (re-)building packages, it would be appreciated if you would create a separate thread instead of necro-bumping an old thread.
For your question, no there's no way to get arround installing dotnet-sdk-6.0 if you want to rebuild this. Also there's a conditinal for bootstrapping, which is often required for something like this.

Re: Running .NET Core on Mageia

PostPosted: May 31st, '22, 08:30
by papoteur
Hello,
As you can see, there is:
Code: Select all
%package -n dotnet-sdk-6.0

in the spec file. dotnet-sdk is provided by the same spec file. You have to build a first time as bootstrap, then use the result with includes dotnet-sdk to run a second round without bootstrap. You have to play with the first line, replacing
Code: Select all
%bcond_with bootstrap

by
Code: Select all
%bcond_without bootstrap


See : https://docs.fedoraproject.org/en-US/pa ... tstrapping