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

gtk module compile error on OpenBSD 5.7 #53

Closed
alfredh opened this issue Jul 18, 2015 · 7 comments
Closed

gtk module compile error on OpenBSD 5.7 #53

alfredh opened this issue Jul 18, 2015 · 7 comments

Comments

@alfredh
Copy link
Collaborator

alfredh commented Jul 18, 2015

building Baresip on OpenBSD 5.7 fails in gtk.so module:

modules/gtk/gtk_mod.c: In function 'notify_incoming_call':
modules/gtk/gtk_mod.c:279: warning: implicit declaration of function 'g_notification_set_priority'
modules/gtk/gtk_mod.c:279: warning: nested extern declaration of 'g_notification_set_priority'
modules/gtk/gtk_mod.c:280: error: 'G_NOTIFICATION_PRIORITY_URGENT' undeclared (first use in this function)
modules/gtk/gtk_mod.c:280: error: (Each undeclared identifier is reported only once
modules/gtk/gtk_mod.c:280: error: for each function it appears in.)
modules/gtk/gtk_mod.c: In function 'gtk_thread':
modules/gtk/gtk_mod.c:591: warning: declaration of 'error' shadows a global declaration
include/baresip.h:387: warning: shadowed declaration is here
gmake: *** [build-x86_64/modules/gtk/gtk_mod.o] Error 1

@clehner could you have a look plz ? is the usage of
G_NOTIFICATION_PRIORITY_URGENT a portable API between all libgtk
implementations? can we avoid using this api, or using another portable api?

@clehner
Copy link
Contributor

clehner commented Jul 18, 2015

According to /usr/include/glib-2.0/gio/gnotification.h on my system, g_notification_set_priority was added in GLib 2.42. I'm not too familiar with how OpenBSD does packaging/ports. If it carries an older version of GLib, perhaps a macro could be used to pick g_notification_set_urgent instead (which was deprecated in 2.42 in favor of g_notification_set_priority. GNotification docs

@alfredh
Copy link
Collaborator Author

alfredh commented Jul 18, 2015

hmm, tried to fix it but now get an error on linux :)

looks like OpenBSD is using GTK 2.24

@alfredh alfredh reopened this Jul 18, 2015
@clehner
Copy link
Contributor

clehner commented Jul 18, 2015

What version of GLib (or GIO)? That is where GNotification is from. Perhaps gio-2.0 should be added to the pkgconfig command. Also, G_NOTIFICATION_PRIORITY_URGENT is an enum.

@clehner
Copy link
Contributor

clehner commented Jul 18, 2015

My mistake, the version check macro was wrong. Try GLIB_CHECK_VERSION(2,42,0)

@alfredh
Copy link
Collaborator Author

alfredh commented Jul 18, 2015

ok! will try that soon

@alfredh
Copy link
Collaborator Author

alfredh commented Jul 18, 2015

fixed in commit 52d1c33

thanks @clehner !

@alfredh alfredh closed this as completed Jul 18, 2015
@clehner
Copy link
Contributor

clehner commented Jul 18, 2015 via email

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