mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
430 stars 141 forks source link

Why does gtk sharp 3 have error since compilation time? #237

Open ghost opened 6 years ago

ghost commented 6 years ago

What is shit?

Why do I should not use Gtk Sharp 3.x What do I miss that?????

gui-thread-check.c:90:1: warning: no previous prototype for ‘mono_profiler_startup’ [-Wmissing-prototypes]
 mono_profiler_startup (const char *desc)
 ^
gui-thread-check.c: In function ‘mono_profiler_startup’:
gui-thread-check.c:94:2: warning: implicit declaration of function ‘mono_profiler_install’ [-Wimplicit-function-declaration]
  mono_profiler_install (NULL, NULL);
  ^
gui-thread-check.c:94:2: warning: nested extern declaration of ‘mono_profiler_install’ [-Wnested-externs]
gui-thread-check.c:95:2: warning: implicit declaration of function ‘mono_profiler_install_enter_leave’ [-Wimplicit-function-declaration]
  mono_profiler_install_enter_leave (simple_method_enter, NULL);
  ^
gui-thread-check.c:95:2: warning: nested extern declaration of ‘mono_profiler_install_enter_leave’ [-Wnested-externs]
gui-thread-check.c:96:2: warning: implicit declaration of function ‘mono_profiler_set_events’ [-Wimplicit-function-declaration]
  mono_profiler_set_events (MONO_PROFILE_ENTER_LEAVE);
  ^
gui-thread-check.c:96:2: warning: nested extern declaration of ‘mono_profiler_set_events’ [-Wnested-externs]
gui-thread-check.c:96:28: error: ‘MONO_PROFILE_ENTER_LEAVE’ undeclared (first use in this function)
  mono_profiler_set_events (MONO_PROFILE_ENTER_LEAVE);
                            ^
gui-thread-check.c:96:28: note: each undeclared identifier is reported only once for each function it appears in
Makefile:459: recipe for target 'gui-thread-check.lo' failed
make[4]: *** [gui-thread-check.lo] Error 1
make[4]: Leaving directory '/home/sourceskyboxer/gtk-sharp/gtk/gui-thread-check/profiler'
Makefile:387: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/sourceskyboxer/gtk-sharp/gtk/gui-thread-check'
Makefile:603: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/sourceskyboxer/gtk-sharp/gtk'
Makefile:447: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/sourceskyboxer/gtk-sharp'
Makefile:375: recipe for target 'all' failed
make: *** [all] Error 2

Please listen me! I want recompile for Gtk Sharp 3.xx for Mono and OpenTK. Because Mono assemblies was updated to 5.19.0 That is why I need "recompile" with Gtk Sharp 3 and OpenTK. But OpenTK is already recompiled but Gtk Sharp 3 not :(

scx commented 5 years ago

Temporary patch (gtk-sharp-profiler-startup.patch):

diff -Naur gtk-sharp.org/gtk/gui-thread-check/profiler/gui-thread-check.c gtk-sharp/gtk/gui-thread-check/profiler/gui-thread-check.c
--- gtk-sharp.org/gtk/gui-thread-check/profiler/gui-thread-check.c  2018-12-07 05:05:42.325500894 +0100
+++ gtk-sharp/gtk/gui-thread-check/profiler/gui-thread-check.c  2018-12-07 05:40:53.044438289 +0100
@@ -93,6 +93,6 @@

    mono_profiler_install (NULL, NULL);
    mono_profiler_install_enter_leave (simple_method_enter, NULL);
-   mono_profiler_set_events (MONO_PROFILE_ENTER_LEAVE);
+   mono_profiler_set_events (1 << 12);
 }

See also: https://github.com/flathub/org.gnome.gbrainy/pull/4#issue-236756221

zoujiaqing commented 5 years ago

How to upgrade to GTK+ 3.x ?

scx commented 5 years ago

@zoujiaqing

How to upgrade to GTK+ 3.x ?

https://github.com/mono/gtk-sharp/releases/tag/2.99.3

Moreover, HEAD supports Gtk+3.

jordimas commented 5 years ago

See https://github.com/mono/gtk-sharp/pull/266

jfferson commented 4 years ago

Temporary patch (gtk-sharp-profiler-startup.patch):

diff -Naur gtk-sharp.org/gtk/gui-thread-check/profiler/gui-thread-check.c gtk-sharp/gtk/gui-thread-check/profiler/gui-thread-check.c
--- gtk-sharp.org/gtk/gui-thread-check/profiler/gui-thread-check.c    2018-12-07 05:05:42.325500894 +0100
+++ gtk-sharp/gtk/gui-thread-check/profiler/gui-thread-check.c    2018-12-07 05:40:53.044438289 +0100
@@ -93,6 +93,6 @@

  mono_profiler_install (NULL, NULL);
  mono_profiler_install_enter_leave (simple_method_enter, NULL);
- mono_profiler_set_events (MONO_PROFILE_ENTER_LEAVE);
+ mono_profiler_set_events (1 << 12);
 }

See also: flathub/org.gnome.gbrainy#4 (comment)

what does mono_profiler_set_events (1 << 12); means?