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

Can no longer build with --enable-status-notifier #51

Open
protist opened this issue Mar 12, 2017 · 6 comments
Open

Can no longer build with --enable-status-notifier #51

protist opened this issue Mar 12, 2017 · 6 comments

Comments

@protist
Copy link

protist commented Mar 12, 2017

Hello, I just upgraded from statusnotifier (0.1.0-1 -> 1.0.0-1). However I can no longer make kalu with --enable-status-notifier, i.e. kalu-kde in Arch Linux's AUR.

./configure --prefix=/usr --enable-status-notifier seems to work fine.

$ make
make  all-recursive
make[1]: Entering directory '/tmp/kalu/kalu-4.1.0'
Making all in po
make[2]: Entering directory '/tmp/kalu/kalu-4.1.0/po'
make[2]: Leaving directory '/tmp/kalu/kalu-4.1.0/po'
make[2]: Entering directory '/tmp/kalu/kalu-4.1.0'
  CC       src/kalu/shared.lo
  CCLD     libshared.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       src/kalu/kalu-main.o
In file included from src/kalu/main.c:54:0:
src/kalu/gui.h:79:26: error: unknown type name ‘StatusNotifier’
 void sn_context_menu_cb (StatusNotifier *_sn, gint x, gint y, gpointer data);
                          ^~~~~~~~~~~~~~
src/kalu/main.c:915:8: error: unknown type name ‘StatusNotifier’
 extern StatusNotifier *sn;
        ^~~~~~~~~~~~~~
src/kalu/main.c: In function ‘sn_state_cb’:
src/kalu/main.c:1169:9: warning: implicit declaration of function ‘status_notifier_get_state’ [-Wimplicit-function-declaration]
     if (status_notifier_get_state (sn) == STATUS_NOTIFIER_STATE_REGISTERED)
         ^~~~~~~~~~~~~~~~~~~~~~~~~
src/kalu/main.c: At top level:
src/kalu/main.c:1185:16: error: unknown type name ‘StatusNotifier’
 sn_reg_failed (StatusNotifier *_sn _UNUSED_, GError *error)
                ^~~~~~~~~~~~~~
src/kalu/main.c: In function ‘main’:
src/kalu/main.c:1562:10: warning: implicit declaration of function ‘STATUS_NOTIFIER’ [-Wimplicit-function-declaration]
     sn = STATUS_NOTIFIER (g_object_new (TYPE_STATUS_NOTIFIER,
          ^~~~~~~~~~~~~~~
src/kalu/main.c:1562:41: error: ‘TYPE_STATUS_NOTIFIER’ undeclared (first use in this function)
     sn = STATUS_NOTIFIER (g_object_new (TYPE_STATUS_NOTIFIER,
                                         ^~~~~~~~~~~~~~~~~~~~
src/kalu/main.c:1562:41: note: each undeclared identifier is reported only once for each function it appears in
In file included from /usr/include/glib-2.0/gobject/gobject.h:28:0,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/statusnotifier.h:27,
                 from src/kalu/main.c:48:
src/kalu/main.c:1580:25: error: ‘sn_reg_failed’ undeclared (first use in this function)
             G_CALLBACK (sn_reg_failed), NULL);
                         ^
src/kalu/main.c:1582:25: error: ‘sn_context_menu_cb’ undeclared (first use in this function)
             G_CALLBACK (sn_context_menu_cb), NULL);
                         ^
src/kalu/main.c:1587:5: warning: implicit declaration of function ‘status_notifier_register’ [-Wimplicit-function-declaration]
     status_notifier_register (sn);
     ^~~~~~~~~~~~~~~~~~~~~~~~
At top level:
src/kalu/main.c:1144:1: warning: ‘create_status_icon’ defined but not used [-Wunused-function]
 create_status_icon (void)
 ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:891: src/kalu/kalu-main.o] Error 1
make[2]: Leaving directory '/tmp/kalu/kalu-4.1.0'
make[1]: *** [Makefile:1391: all-recursive] Error 1
make[1]: Leaving directory '/tmp/kalu/kalu-4.1.0'
make: *** [Makefile:627: all] Error 2

Reverting to statusnotifier 0.1.0-1 fixes this problem

@protist
Copy link
Author

protist commented Mar 12, 2017

Also, not sure if it's relevant, but vanilla kalu builds and install fine, but when I run it, there is no tray icon. There is nothing obvious in kalu -d, and it appear to be running fine otherwise. I get a notification, and I can get the context menu with echo popup-menu > /run/user/1000/kalu_fifo_18422.

@jjk-jacky
Copy link
Owner

jjk-jacky commented Mar 12, 2017 via email

@jjk-jacky
Copy link
Owner

jjk-jacky commented Mar 12, 2017 via email

@protist
Copy link
Author

protist commented Mar 13, 2017

I intend to upgrade kalu to support statusnotifier 1.0.0, but there are also other things I want to do before I can make a release, so no ETA.

No worries. Thank you!

In the mean time though, you should be able to build kalu just fine w/ statusnotifier 1.0.0 if you simply include the statusnotifier-compat.h header provided just for that.

I'm not really sure with how to do that exactly. I just spent half an hour reading various things, but I'm more confused now than when I started. So presumably from the package perspective, I need to include statusnotifier as a source too. Then include src/statusnotifier-compat.h how exactly? By patching one of the kalu files? Sorry, I'm just not familiar with C at all.

If you want systray icon to be shown you need something to show them.

Ah yes, good point.

@jjk-jacky
Copy link
Owner

jjk-jacky commented Mar 13, 2017 via email

@protist
Copy link
Author

protist commented Mar 13, 2017

Thank you! That works perfectly.

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