[Spice-devel] "undefined reference" errors while running make

Mahmood Naderan nt_mahmood at yahoo.com
Sat Apr 2 14:14:11 UTC 2016


Hi Eduardo,I have to say that the latest git revision doesn't include your patch.  So, I applied your patch manually into the latest revision.
That undefined error has been solved, but now I see a new error.Please note that it is saying I have to include two compiler options. Should I do that or you have a netter idea?

Please see the full log below




root at cluster:spice-src# git rev-parse HEAD
77946c395ba9ff3e6e03386a43f7451ddf1e38a0

root at cluster:spice-src# make -j
make  all-recursive
make[1]: Entering directory `/opt/spice-src'
Making all in spice-common
make[2]: Entering directory `/opt/spice-src/spice-common'
make  all-recursive
make[3]: Entering directory `/opt/spice-src/spice-common'
Making all in python_modules
make[4]: Entering directory `/opt/spice-src/spice-common/python_modules'
make[4]: Leaving directory `/opt/spice-src/spice-common/python_modules'
Making all in common
make[4]: Entering directory `/opt/spice-src/spice-common/common'
make  all-am
make[5]: Entering directory `/opt/spice-src/spice-common/common'
  CC     backtrace.lo
  CC     canvas_utils.lo
  CC     lines.lo
  CC     lz.lo
  CC     log.lo
  CC     marshaller.lo
  CC     mem.lo
  CC     pixman_utils.lo
  CC     quic.lo
  CC     region.lo
  CC     snd_codec.lo
  CC     rop3.lo
  CC     ssl_verify.lo
  CC     libspice_common_server_la-generated_server_demarshallers.lo
  CC     libspice_common_server_la-generated_server_marshallers.lo
  CC     generated_client_marshallers.lo
  CC     generated_client_demarshallers.lo
  CC     generated_client_demarshallers1.lo
  CC     generated_client_marshallers1.lo
  CCLD   libspice-common-server.la
  CCLD   libspice-common-client.la
  CCLD   libspice-common.la
make[5]: Leaving directory `/opt/spice-src/spice-common/common'
make[4]: Leaving directory `/opt/spice-src/spice-common/common'
Making all in tests
make[4]: Entering directory `/opt/spice-src/spice-common/tests'
make  all-am
make[5]: Entering directory `/opt/spice-src/spice-common/tests'
  CC     test_logging-test-logging.o
  CC     test_marshallers-test-marshallers.o
  CC     test_marshallers-generated_test_marshallers.o
test-logging.c: In function 'test_spice_abort_level':
test-logging.c:49: warning: implicit declaration of function 'g_test_subprocess'
test-logging.c:52: warning: implicit declaration of function 'g_test_expect_message'
test-logging.c:56: warning: implicit declaration of function 'g_test_assert_expected_messages'
test-logging.c:60: warning: implicit declaration of function 'g_test_trap_subprocess'
test-logging.c: In function 'test_log_levels':
test-logging.c:204: warning: implicit declaration of function 'g_info'
test-marshallers.c: In function 'main':
test-marshallers.c:31: warning: implicit declaration of function 'g_assert_true'
  CCLD   test_marshallers
  CCLD   test_logging
test_marshallers-test-marshallers.o: In function `main':
/opt/spice-src/spice-common/tests/test-marshallers.c:31: undefined reference to `g_assert_true'
collect2: ld returned 1 exit status
make[5]: *** [test_marshallers] Error 1
make[5]: *** Waiting for unfinished jobs....
test_logging-test-logging.o: In function `test_spice_fatal_critical':
/opt/spice-src/spice-common/tests/test-logging.c:102: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:106: undefined reference to `g_test_trap_subprocess'
test_logging-test-logging.o: In function `test_spice_fatal_return_if_fail':
/opt/spice-src/spice-common/tests/test-logging.c:145: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:149: undefined reference to `g_test_trap_subprocess'
test_logging-test-logging.o: In function `test_spice_fatal_warning':
/opt/spice-src/spice-common/tests/test-logging.c:88: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:92: undefined reference to `g_test_trap_subprocess'
test_logging-test-logging.o: In function `test_spice_non_fatal_g_return_if_fail':
/opt/spice-src/spice-common/tests/test-logging.c:161: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:165: undefined reference to `g_test_trap_subprocess'
test_logging-test-logging.o: In function `test_spice_fatal_g_critical':
/opt/spice-src/spice-common/tests/test-logging.c:131: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:135: undefined reference to `g_test_trap_subprocess'
test_logging-test-logging.o: In function `test_spice_non_fatal_g_critical':
/opt/spice-src/spice-common/tests/test-logging.c:118: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:122: undefined reference to `g_test_trap_subprocess'
test_logging-test-logging.o: In function `test_spice_abort_level_g_warning':
/opt/spice-src/spice-common/tests/test-logging.c:68: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:79: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:71: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:75: undefined reference to `g_test_assert_expected_messages'
test_logging-test-logging.o: In function `test_spice_abort_level':
/opt/spice-src/spice-common/tests/test-logging.c:49: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:60: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:52: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:56: undefined reference to `g_test_assert_expected_messages'
test_logging-test-logging.o: In function `test_log_levels':
/opt/spice-src/spice-common/tests/test-logging.c:175: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:256: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:176: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:180: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:184: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:189: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:193: undefined reference to `g_test_expect_message'
test_logging-test-logging.o:/opt/spice-src/spice-common/tests/test-logging.c:197: more undefined references to `g_test_expect_message' follow
test_logging-test-logging.o: In function `test_log_levels':
/opt/spice-src/spice-common/tests/test-logging.c:204: undefined reference to `g_info'
/opt/spice-src/spice-common/tests/test-logging.c:205: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:210: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:214: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:218: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:222: undefined reference to `g_test_expect_message'
test_logging-test-logging.o:/opt/spice-src/spice-common/tests/test-logging.c:226: more undefined references to `g_test_expect_message' follow
test_logging-test-logging.o: In function `test_log_levels':
/opt/spice-src/spice-common/tests/test-logging.c:231: undefined reference to `g_test_assert_expected_messages'
/opt/spice-src/spice-common/tests/test-logging.c:245: undefined reference to `g_info'
test_logging-test-logging.o: In function `test_spice_g_messages_debug_all':
/opt/spice-src/spice-common/tests/test-logging.c:359: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:374: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:365: undefined reference to `g_info'
test_logging-test-logging.o: In function `test_spice_g_messages_debug':
/opt/spice-src/spice-common/tests/test-logging.c:334: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:349: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:340: undefined reference to `g_info'
test_logging-test-logging.o: In function `test_spice_debug_level_warning':
/opt/spice-src/spice-common/tests/test-logging.c:295: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:325: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:298: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:301: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:305: undefined reference to `g_test_assert_expected_messages'
/opt/spice-src/spice-common/tests/test-logging.c:312: undefined reference to `g_info'
test_logging-test-logging.o: In function `test_spice_debug_level':
/opt/spice-src/spice-common/tests/test-logging.c:264: undefined reference to `g_test_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:285: undefined reference to `g_test_trap_subprocess'
/opt/spice-src/spice-common/tests/test-logging.c:267: undefined reference to `g_test_expect_message'
/opt/spice-src/spice-common/tests/test-logging.c:271: undefined reference to `g_test_assert_expected_messages'
collect2: ld returned 1 exit status
make[5]: *** [test_logging] Error 1
make[5]: Leaving directory `/opt/spice-src/spice-common/tests'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/opt/spice-src/spice-common/tests'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/spice-src/spice-common'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/spice-src/spice-common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/spice-src'
make: *** [all] Error 2





root at cluster:spice-src# patch -p1 < glib_2_38_compat.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|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
--------------------------
File to patch: /opt/spice-src/spice-common/tests/test-logging.c
patching file /opt/spice-src/spice-common/tests/test-logging.c
can't find file to patch at input line 44
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|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
--------------------------
File to patch: /opt/spice-src/spice-common/tests/test-marshallers.c
patching file /opt/spice-src/spice-common/tests/test-marshallers.c






root at cluster:spice-src# make
make  all-recursive
make[1]: Entering directory `/opt/spice-src'
Making all in spice-common
make[2]: Entering directory `/opt/spice-src/spice-common'
make  all-recursive
make[3]: Entering directory `/opt/spice-src/spice-common'
Making all in python_modules
make[4]: Entering directory `/opt/spice-src/spice-common/python_modules'
make[4]: Leaving directory `/opt/spice-src/spice-common/python_modules'
Making all in common
make[4]: Entering directory `/opt/spice-src/spice-common/common'
make  all-am
make[5]: Entering directory `/opt/spice-src/spice-common/common'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/opt/spice-src/spice-common/common'
make[4]: Leaving directory `/opt/spice-src/spice-common/common'
Making all in tests
make[4]: Entering directory `/opt/spice-src/spice-common/tests'
make  all-am
make[5]: Entering directory `/opt/spice-src/spice-common/tests'
  CC     test_logging-test-logging.o
  CCLD   test_logging
  CC     test_marshallers-test-marshallers.o
  CCLD   test_marshallers
make[5]: Leaving directory `/opt/spice-src/spice-common/tests'
make[4]: Leaving directory `/opt/spice-src/spice-common/tests'
make[4]: Entering directory `/opt/spice-src/spice-common'
make[4]: Leaving directory `/opt/spice-src/spice-common'
make[3]: Leaving directory `/opt/spice-src/spice-common'
make[2]: Leaving directory `/opt/spice-src/spice-common'
Making all in server
make[2]: Entering directory `/opt/spice-src/server'
make  all-recursive
make[3]: Entering directory `/opt/spice-src/server'
Making all in .
make[4]: Entering directory `/opt/spice-src/server'
  CC     agent-msg-filter.lo
cc1: warnings being treated as errors
In file included from red-common.h:40,
                 from agent-msg-filter.c:25:
utils.h: In function 'spice_get_monotonic_time_ms':
utils.h:69: error: implicit declaration of function 'g_get_monotonic_time' [-Wimplicit-function-declaration]
utils.h:69: error: nested extern declaration of 'g_get_monotonic_time' [-Wnested-externs]
In file included from agent-msg-filter.c:27:
reds.h: At top level:
reds.h:35: error: redefinition of typedef 'RedsState'
reds-stream.h:31: note: previous declaration of 'RedsState' was here
In file included from agent-msg-filter.c:28:
red-qxl.h:23: error: redefinition of typedef 'QXLState'
spice-qxl.h:39: note: previous declaration of 'QXLState' was here
make[4]: *** [agent-msg-filter.lo] Error 1
make[4]: Leaving directory `/opt/spice-src/server'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/spice-src/server'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/spice-src/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/spice-src'
make: *** [all] Error 2
root at cluster:spice-src#
 Regards,
Mahmood 


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160402/e763da12/attachment-0001.html>


More information about the Spice-devel mailing list