Error during build of svn rev 14138

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
szafran
Posts: 33
Joined: Sat Oct 13, 2012 3:06 pm

Error during build of svn rev 14138

Post by szafran »

Hi,

I'm getting these errors while trying to build svn revision 14138:

Code: Select all

  CC     util.o
tr-icon.c:24:26: error: expected ‘)’ before ‘-’ token
tr-icon.c: In function ‘gtr_icon_new’:
tr-icon.c:148:3: warning: implicit declaration of function ‘core_quark’ [-Wimplicit-function-declaration]
tr-icon.c:148:3: warning: nested extern declaration of ‘core_quark’ [-Wnested-externs]
make[3]: *** [tr-icon.o] Błąd 1
make[3]: *** Oczekiwanie na niezakończone zadania....
util.c:667:33: error: expected ‘)’ before ‘-’ token
util.c: In function ‘gtr_freespace_label_new’:
util.c:729:3: warning: implicit declaration of function ‘freespace_label_data_quark’ [-Wimplicit-function-declaration]
util.c:729:3: warning: nested extern declaration of ‘freespace_label_data_quark’ [-Wnested-externs]
util.c: At top level:
util.c:648:13: warning: ‘on_freespace_label_core_destroyed’ used but never defined [enabled by default]
make[3]: *** [util.o] Błąd 1
tr-window.c:69:31: error: expected ‘)’ before ‘-’ token
tr-window.c: In function ‘prefsChanged’:
tr-window.c:185:3: warning: implicit declaration of function ‘get_private_data’ [-Wimplicit-function-declaration]
tr-window.c:185:3: warning: nested extern declaration of ‘get_private_data’ [-Wnested-externs]
tr-window.c:185:21: warning: initialization makes pointer from integer without a cast [enabled by default]
tr-window.c: In function ‘gtr_window_new’:
tr-window.c:614:3: warning: implicit declaration of function ‘private_data_quark’ [-Wimplicit-function-declaration]
tr-window.c:614:3: warning: nested extern declaration of ‘private_data_quark’ [-Wnested-externs]
tr-window.c: In function ‘gtr_window_refresh’:
tr-window.c:886:21: warning: initialization makes pointer from integer without a cast [enabled by default]
tr-window.c: In function ‘gtr_window_get_selection’:
tr-window.c:898:32: error: invalid type argument of ‘->’ (have ‘int’)
tr-window.c:899:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [tr-window.o] Błąd 1
make[3]: Opuszczenie katalogu `/home/szafran/.sources/transmission/transmission.svn/gtk'
make[2]: *** [all-recursive] Błąd 1
make[2]: Opuszczenie katalogu `/home/szafran/.sources/transmission/transmission.svn/gtk'
make[1]: *** [all] Błąd 2
make[1]: Opuszczenie katalogu `/home/szafran/.sources/transmission/transmission.svn/gtk'
make: *** [all-recursive] Błąd 1
What's wrong ?
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Error during build of svn rev 14138

Post by Jordan »

Hi Szafran, does r14139 build for you?
szafran
Posts: 33
Joined: Sat Oct 13, 2012 3:06 pm

Re: Error during build of svn rev 14138

Post by szafran »

Unfortunatelly no.

Code: Select all

  CC     util.o
tr-icon.c:24:8: warning: return type defaults to ‘int’ [enabled by default]
tr-icon.c:24:8: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
tr-icon.c: In function ‘G_DEFINE_QUARK’:
tr-icon.c:31:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-icon.c:111:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-icon.c:139:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-icon.c:24:8: warning: type of ‘tr_core’ defaults to ‘int’ [enabled by default]
tr-icon.c:24:8: warning: type of ‘core’ defaults to ‘int’ [enabled by default]
tr-icon.c:158:1: error: expected ‘{’ at end of input
tr-icon.c:24:8: warning: unused parameter ‘tr_core’ [-Wunused-parameter]
tr-icon.c:24:8: warning: unused parameter ‘core’ [-Wunused-parameter]
tr-icon.c: At top level:
tr-icon.c:24:8: warning: ‘G_DEFINE_QUARK’ defined but not used [-Wunused-function]
tr-icon.c: In function ‘G_DEFINE_QUARK’:
tr-icon.c:158:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [tr-icon.o] Błąd 1
make[3]: *** Oczekiwanie na niezakończone zadania....
tr-window.c:69:8: warning: return type defaults to ‘int’ [enabled by default]
tr-window.c:69:8: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
tr-window.c: In function ‘G_DEFINE_QUARK’:
tr-window.c:73:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:84:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:97:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:107:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:122:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:177:13: error: storage class specified for parameter ‘syncAltSpeedButton’
tr-window.c:183:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:229:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:237:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:250:3: error: storage class specified for parameter ‘stats_modes’
tr-window.c:250:1: error: parameter ‘stats_modes’ is initialized
tr-window.c:251:5: warning: braces around scalar initializer [enabled by default]
tr-window.c:251:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:251:5: warning: initialization from incompatible pointer type [enabled by default]
tr-window.c:251:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:251:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:251:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:252:5: warning: braces around scalar initializer [enabled by default]
tr-window.c:252:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:252:5: warning: initialization from incompatible pointer type [enabled by default]
tr-window.c:252:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:252:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:252:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:252:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:252:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:253:5: warning: braces around scalar initializer [enabled by default]
tr-window.c:253:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:253:5: warning: initialization from incompatible pointer type [enabled by default]
tr-window.c:253:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:253:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:253:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:253:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:253:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:254:5: warning: braces around scalar initializer [enabled by default]
tr-window.c:254:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:254:5: warning: initialization from incompatible pointer type [enabled by default]
tr-window.c:254:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:254:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:254:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:254:5: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:254:5: warning: (near initialization for ‘stats_modes’) [enabled by default]
tr-window.c:260:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:271:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:296:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:311:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:328:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:359:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:369:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:383:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:397:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:413:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:464:21: error: storage class specified for parameter ‘stockRatios’
tr-window.c:464:1: error: parameter ‘stockRatios’ is initialized
tr-window.c:464:1: error: incompatible types when initializing type ‘const double *’ using type ‘double’
tr-window.c:464:1: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:464:1: warning: (near initialization for ‘stockRatios’) [enabled by default]
tr-window.c:464:1: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:464:1: warning: (near initialization for ‘stockRatios’) [enabled by default]
tr-window.c:464:1: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:464:1: warning: (near initialization for ‘stockRatios’) [enabled by default]
tr-window.c:464:1: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:464:1: warning: (near initialization for ‘stockRatios’) [enabled by default]
tr-window.c:464:1: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:464:1: warning: (near initialization for ‘stockRatios’) [enabled by default]
tr-window.c:464:1: warning: excess elements in scalar initializer [enabled by default]
tr-window.c:464:1: warning: (near initialization for ‘stockRatios’) [enabled by default]
tr-window.c:468:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:479:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:489:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:531:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:557:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:596:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:789:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:840:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:885:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:897:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:903:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
tr-window.c:69:8: warning: type of ‘private_data’ defaults to ‘int’ [enabled by default]
tr-window.c:69:8: error: multiple parameters named ‘private_data’
tr-window.c:464:21: error: declaration for parameter ‘stockRatios’ but no such parameter
tr-window.c:250:3: error: declaration for parameter ‘stats_modes’ but no such parameter
tr-window.c:177:13: error: declaration for parameter ‘syncAltSpeedButton’ but no such parameter
tr-window.c:916:1: error: expected ‘{’ at end of input
tr-window.c:69:8: warning: unused parameter ‘private_data’ [-Wunused-parameter]
tr-window.c:464:21: warning: unused parameter ‘stockRatios’ [-Wunused-parameter]
tr-window.c:250:3: warning: unused parameter ‘stats_modes’ [-Wunused-parameter]
tr-window.c:177:13: warning: unused parameter ‘syncAltSpeedButton’ [-Wunused-parameter]
tr-window.c: At top level:
tr-window.c:69:8: warning: ‘G_DEFINE_QUARK’ defined but not used [-Wunused-function]
tr-window.c: In function ‘G_DEFINE_QUARK’:
tr-window.c:916:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [tr-window.o] Błąd 1
util.c:667:8: warning: return type defaults to ‘int’ [enabled by default]
util.c:667:8: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
util.c: In function ‘G_DEFINE_QUARK’:
util.c:671:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
util.c:679:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
util.c:687:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
util.c:716:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
util.c:736:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
util.c:667:8: warning: type of ‘freespace_label_data’ defaults to ‘int’ [enabled by default]
util.c:667:8: error: multiple parameters named ‘freespace_label_data’
util.c:744:1: error: expected ‘{’ at end of input
util.c:667:8: warning: unused parameter ‘freespace_label_data’ [-Wunused-parameter]
util.c: At top level:
util.c:648:13: warning: ‘on_freespace_label_core_destroyed’ used but never defined [enabled by default]
util.c:649:13: warning: ‘on_freespace_label_destroyed’ used but never defined [enabled by default]
util.c:652:1: warning: ‘freespace_label_data_free’ defined but not used [-Wunused-function]
util.c:667:8: warning: ‘G_DEFINE_QUARK’ defined but not used [-Wunused-function]
util.c: In function ‘G_DEFINE_QUARK’:
util.c:744:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [util.o] Błąd 1
make[3]: Opuszczenie katalogu `/home/szafran/.sources/transmission/transmission.svn/gtk'
make[2]: *** [all-recursive] Błąd 1
make[2]: Opuszczenie katalogu `/home/szafran/.sources/transmission/transmission.svn/gtk'
make[1]: *** [all] Błąd 2
make[1]: Opuszczenie katalogu `/home/szafran/.sources/transmission/transmission.svn/gtk'
make: *** [all-recursive] Błąd 1
mathedit
Posts: 1
Joined: Tue Jul 23, 2013 12:23 pm

Re: Error during build of svn rev 14138

Post by mathedit »

Hi Szafran,

I have exactly the same problem while compiling rev 14139 with Ubuntu 12.04.2 (Precise).

I think it's because the macro G_DEFINE_QUARK is not defined, because the GLIB version shipped in 12.04 is 2.32.3.
In my /usr/include/glib-2.0/glib/gquark.h, the macro G_DEFINE_QUARK doesn't exists.

Maybe simply defining the macro, like version 2.33 of GLIB does, will work ?

cf :
https://bugs.launchpad.net/ubuntu/+sour ... ug/1045608 (launchpad bug talking about upgrade of GLIB)
https://git.gnome.org/browse/glib/tree/glib/gquark.h (the GLIB source file where G_DEFINE_QUARK is defined)

EDIT :
I just tried, and applying that patch to gtk/tr-core.h works for me (it compiles, not sure it will run ;) ) :

Code: Select all

--- gtk/tr-core.h
+++ gtk/tr-core.h
@@ -196,4 +196,19 @@
 
 G_END_DECLS
 
+
+#ifndef G_DEFINE_QUARK
+  #define G_DEFINE_QUARK(QN, q_n)                                         \
+  GQuark                                                                  \
+  q_n##_quark (void)                                                      \
+  {                                                                       \
+    static GQuark q;                                                      \
+                                                                          \
+    if G_UNLIKELY (q == 0)                                                \
+      q = g_quark_from_static_string (#QN);                               \
+                                                                          \
+    return q;                                                             \
+  }
+#endif /* G_DEFINE_QUARK*/
+
 #endif /* GTR_CORE_H */
szafran
Posts: 33
Joined: Sat Oct 13, 2012 3:06 pm

Re: Error during build of svn rev 14138

Post by szafran »

Thanks for the info.
But I'd like to build from official without changes.
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Error during build of svn rev 14138

Post by Jordan »

Aha, thanks mathedit to pointing that out. I hadn't realized G_DEFINE_QUARK was such a recent addition to glib -- I'll add a backwards compatibility macro as you suggested.
szafran
Posts: 33
Joined: Sat Oct 13, 2012 3:06 pm

Re: Error during build of svn rev 14138

Post by szafran »

Thank you Jordan.
Now the svn version builds fine.
Post Reply