Re: "undefined reference" errors while running make

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/29/2016 12:08 PM, Mahmood Naderan wrote:
> O that is good :thumsup:
> I applied the patch and the compilation passed that file. However, I get
> a new undefined reference in another file
> 
> 
> root@cluster:spice-src# patch < patch
> can't find file to patch at input line 5

The new patch attached should fix your issue.

Please apply with the following command:

$ patch -p1 < glib_2_38_compat.patch

Thanks for the report.

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko@xxxxxxxxxx
diff --git a/tests/test-logging.c b/tests/test-logging.c
index eed149e..32f7b83 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -43,6 +43,10 @@ LOG_OTHER_HELPER(message, MESSAGE)
 LOG_OTHER_HELPER(warning, WARNING)
 LOG_OTHER_HELPER(critical, CRITICAL)
 
+#ifdef GLIB_VERSION_2_38
+#undef GLIB_VERSION_2_38
+#endif
+#ifdef GLIB_VERSION_2_38
 /* Checks that spice_warning() aborts after changing SPICE_ABORT_LEVEL */
 static void test_spice_abort_level(void)
 {
@@ -376,6 +380,7 @@ static void test_spice_g_messages_debug_all(void)
     g_test_trap_assert_stdout("*spice_debug\n*spice_info\n*g_debug\n*g_info\n*other_debug\n*other_info\n");
     g_test_trap_assert_stderr("*g_message\n*other_message\n");
 }
+#endif /* GLIB_VERSION_2_38 */
 
 static void handle_sigabrt(int sig)
 {
@@ -399,6 +404,7 @@ int main(int argc, char **argv)
      * test cases are going to test */
     g_log_set_always_fatal(fatal_mask & G_LOG_LEVEL_MASK);
 
+#ifdef GLIB_VERSION_2_38
     g_test_add_func("/spice-common/spice-abort-level", test_spice_abort_level);
     g_test_add_func("/spice-common/spice-abort-level-gwarning", test_spice_abort_level_g_warning);
     g_test_add_func("/spice-common/spice-debug-level", test_spice_debug_level);
@@ -412,6 +418,7 @@ int main(int argc, char **argv)
     g_test_add_func("/spice-common/spice-fatal-return-if-fail", test_spice_fatal_return_if_fail);
     g_test_add_func("/spice-common/spice-non-fatal-greturn-if-fail", test_spice_non_fatal_g_return_if_fail);
     g_test_add_func("/spice-common/spice-fatal-warning", test_spice_fatal_warning);
+#endif /* GLIB_VERSION_2_38 */
 
     return g_test_run();
 }
diff --git a/tests/test-marshallers.c b/tests/test-marshallers.c
index d2c80e5..c2f7547 100644
--- a/tests/test-marshallers.c
+++ b/tests/test-marshallers.c
@@ -4,6 +4,14 @@
 #include "common/marshaller.h"
 #include "generated_test_marshallers.h"
 
+#ifndef g_assert_true
+#define g_assert_true(expr)             do { if G_LIKELY (expr) ; else \
+                                               g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
+                                                                    #expr); \
+                                           } while (0)
+#endif
+
+
 static uint8_t expected_data[] = { 0x02, 0x00, 0x00, 0x00, /* data_size */
                                    0x08, 0x00, 0x00, 0x00, /* data offset */
                                    0xef, 0xcd, 0xab, 0x90, 0x78, 0x56, 0x34, 0x12, /* data */
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]