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

compilation error: too many arguments to function #12

Open
lenzls opened this issue Dec 31, 2016 · 5 comments
Open

compilation error: too many arguments to function #12

lenzls opened this issue Dec 31, 2016 · 5 comments

Comments

@lenzls
Copy link

lenzls commented Dec 31, 2016

I need some help on compiling volnoti.

I installed the needed dependencies (hopefully) but I always receive the error from the title. Here is the output of make:

[04:25:40] xx@yy:~/build/volnoti  (master)
[1] $> ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for DBUS... yes
checking for DBUS_GLIB... yes
checking for GTK... yes
checking for CAIRO... yes
checking for GDK_PIXBUF... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for inline... inline
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for strchr... yes
checking for strcspn... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating res/Makefile
config.status: creating config.h
config.status: executing depfiles commands
[04:25:53] xx@yy:~/build/volnoti  (master)
[0] $> make
make  all-recursive
make[1]: Verzeichnis „/home/xx/build/volnoti“ wird betreten
Making all in src
make[2]: Verzeichnis „/home/xx/build/volnoti/src“ wird betreten
depbase=`echo daemon.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPREFIX="\"/usr/share/pixmaps/volnoti/\""   -g -O2 -MT daemon.o -MD -MP -MF $depbase.Tpo -c -o daemon.o daemon.c &&\
mv -f $depbase.Tpo $depbase.Po
daemon.c: In function ‘main’:
daemon.c:227:5: warning: ‘g_type_init’ is deprecated [-Wdeprecated-declarations]
     g_type_init();
     ^~~~~~~~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/dbus-1.0/dbus/dbus-glib.h:27,
                 from daemon.c:22:
/usr/include/glib-2.0/gobject/gtype.h:681:23: note: declared here
 void                  g_type_init                    (void);
                       ^~~~~~~~~~~
depbase=`echo notification.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPREFIX="\"/usr/share/pixmaps/volnoti/\""   -g -O2 -MT notification.o -MD -MP -MF $depbase.Tpo -c -o notification.o notification.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo common.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPREFIX="\"/usr/share/pixmaps/volnoti/\""   -g -O2 -MT common.o -MD -MP -MF $depbase.Tpo -c -o common.o common.c &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo gopt.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPREFIX="\"/usr/share/pixmaps/volnoti/\""   -g -O2 -MT gopt.o -MD -MP -MF $depbase.Tpo -c -o gopt.o gopt.c &&\
mv -f $depbase.Tpo $depbase.Po
gcc  -g -O2   -o volnoti daemon.o notification.o common.o gopt.o -ldbus-1 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lcairo -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 
depbase=`echo client.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPREFIX="\"/usr/share/pixmaps/volnoti/\""   -g -O2 -MT client.o -MD -MP -MF $depbase.Tpo -c -o client.o client.c &&\
mv -f $depbase.Tpo $depbase.Po
client.c: In function ‘main’:
client.c:84:5: warning: ‘g_type_init’ is deprecated [-Wdeprecated-declarations]
     g_type_init();
     ^~~~~~~~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/dbus-1.0/dbus/dbus-glib.h:27,
                 from client.c:22:
/usr/include/glib-2.0/gobject/gtype.h:681:23: note: declared here
 void                  g_type_init                    (void);
                       ^~~~~~~~~~~
client.c:108:62: warning: passing argument 3 of ‘uk_ac_cam_db538_VolumeNotification_notify’ makes pointer from integer without a cast [-Wint-conversion]
     uk_ac_cam_db538_VolumeNotification_notify(proxy, volume, muted, &error);
                                                              ^~~~~
In file included from client.c:28:0:
value-client-stub.h:29:1: note: expected ‘GError ** {aka struct _GError **}’ but argument is of type ‘int’
 uk_ac_cam_db538_VolumeNotification_notify (DBusGProxy *proxy, const gint IN_volume, GError **error)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client.c:108:5: error: too many arguments to function ‘uk_ac_cam_db538_VolumeNotification_notify’
     uk_ac_cam_db538_VolumeNotification_notify(proxy, volume, muted, &error);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from client.c:28:0:
value-client-stub.h:29:1: note: declared here
 uk_ac_cam_db538_VolumeNotification_notify (DBusGProxy *proxy, const gint IN_volume, GError **error)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:393: die Regel für Ziel „client.o“ scheiterte
make[2]: *** [client.o] Fehler 1
make[2]: Verzeichnis „/home/xx/build/volnoti/src“ wird verlassen
Makefile:366: die Regel für Ziel „all-recursive“ scheiterte
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis „/home/xx/build/volnoti“ wird verlassen
Makefile:307: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2

What am I doing wrong? :)

@CodingJonas
Copy link

I get the same error, I work under Ubuntu 16.04

@luislobo
Copy link

luislobo commented Feb 1, 2017

same here

@luislobo
Copy link

luislobo commented Feb 1, 2017

This fixed the issue:

/src/volnoti$ cd src
/src/volnoti/src$ 
/src/volnoti/src$ rm value-client-stub.h && make value-client-stub.h
dbus-binding-tool --prefix=volume_object --mode=glib-client \
      specs.xml > value-client-stub.h
/src/volnoti/src$ rm value-daemon-stub.h && make value-daemon-stub.h
dbus-binding-tool --prefix=volume_object --mode=glib-server \
      specs.xml > value-daemon-stub.h
/src/volnoti/src$

https://ubuntuforums.org/showthread.php?t=2215264&s=968300ce5d1a65291ab5aa5d1728e978&p=12978792#post12978792

@CodingJonas
Copy link

That solved my problem!

@freethinker
Copy link

@luislobo Thanks! .. that solved the problem.

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

4 participants