Other lang/dotnet missing packages GtkSharp

Error given:
Code:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gtk.Application' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'libdl.so.2' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
Cannot open "/usr/local/dotnet/shared/Microsoft.NETCore.App/8.0.0/libdl.so.2"
Cannot open "/mnt/xxx_source/Languages_ok/fsharptut/65_gtk/c_treestore/bin/Debug/net8.0/libdl.so.2"
Shared object "libdl.so.2" not found, required by "fsharp_gtk"
Cannot open "/usr/local/dotnet/shared/Microsoft.NETCore.App/8.0.0/liblibdl.so.2"
Cannot open "/mnt/xxx_source/Languages_ok/fsharptut/65_gtk/c_treestore/bin/Debug/net8.0/liblibdl.so.2"
Shared object "liblibdl.so.2" not found, required by "fsharp_gtk"
Cannot open "/usr/local/dotnet/shared/Microsoft.NETCore.App/8.0.0/libdl.so.2.so"
Cannot open "/mnt/xxx_source/Languages_ok/fsharptut/65_gtk/c_treestore/bin/Debug/net8.0/libdl.so.2.so"
Shared object "libdl.so.2.so" not found, required by "fsharp_gtk"
Cannot open "/usr/local/dotnet/shared/Microsoft.NETCore.App/8.0.0/liblibdl.so.2.so"
Cannot open "/mnt/xxx_source/Languages_ok/fsharptut/65_gtk/c_treestore/bin/Debug/net8.0/liblibdl.so.2.so"
Shared object "liblibdl.so.2.so" not found, required by "fsharp_gtk"

   at FuncLoader.Linux.dlopen(String path, Int32 flags)
   at FuncLoader.LoadLibrary(String libname)
   at GLibrary.TryGet(Library library, IntPtr& ret)
   at GLibrary.Load(Library library)
   at Gtk.Application..cctor()
   --- End of inner exception stack trace ---
   at Gtk.Application.Init()
   at Program.main(String[] a) in /mnt/xxx_source/Languages_ok/fsharptut/65_gtk/c_treestore/Program.fs:line 31
 
You have the same problem as I have in Thread c-building-gtksharp-with-lang-dotnet-and-cake.92266. It's trying to open the Linux libc libdl.so.2 instead of the generic unix libc which should work for FreeBSD. GtkSharp only gained that generic unix support ~11 months ago. Is your program using a local copy of GtkSharp which is older than that?

Well, the real question is: can you compile GtkSharp itself on FreeBSD?
 
- how do i compile gtksharp ? Which commands should i execute ?
- should i enter a bug in freebsd bugzilla for the port lang/dotnet ?
 
- how do i compile gtksharp ? Which commands should i execute ?
I tried the official build instructions from https://github.com/GtkSharp/GtkSharp:
Code:
git clone https://github.com/GtkSharp/GtkSharp.git
cd GtkSharp
dotnet tool restore
dotnet cake build.cake
But this didn't work for me. You can see my output in the other thread. It seems the cake tool doesn't work right.

- should i enter a bug in freebsd bugzilla for the port lang/dotnet ?
Unfortunately I'm still a noob in C# and the associated tools like cake etc. I have no idea if this is something the port maintainer can fix or if it would be better to approach upstream and try to improve overall FreeBSD compatibility in the C# toolchain ?‍♂️
 
Back
Top