Bug 93520 - Fail build from Git
Summary: Fail build from Git
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-28 03:25 UTC by gustavo alvarez
Modified: 2016-01-08 13:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
server/tests/Makefile.am patch (2.18 KB, patch)
2015-12-30 13:46 UTC, Eduardo Lima (Etrunko)
Details | Splinter Review
Another fix for makefile (657 bytes, patch)
2016-01-07 13:17 UTC, Eduardo Lima (Etrunko)
Details | Splinter Review

Description gustavo alvarez 2015-12-28 03:25:56 UTC
Hi

when build Spice from gri, i get this

libtool: link: gcc -march=native -O2 -pipe -fstack-protector-strong
--param=ssp-buffer-size=4 -Wl,-O1 -Wl,--sort-common -Wl,--as-needed
-Wl,-z -Wl,relro -o .libs/stat_test stat-main.o -pthread
../../spice-common/common/.libs/libspice-common.a
../../server/.libs/libspice-server.so -lcelt051 -lgio-2.0
-lgobject-2.0 -lopus -ljpeg -lpixman-1 -lssl -lcrypto -lz -lglib-2.0
-lm -lrt libstat_test1.a libstat_test2.a libstat_test3.a
libstat_test4.a -pthread
libstat_test2.a(libstat_test2_a-stat-test.o): In function `stat_test2':
stat-test.c:(.text+0xc0): undefined reference to `g_assertion_message_cmpnum'
stat-test.c:(.text+0x14a): undefined reference to `g_assertion_message_cmpnum'
libstat_test3.a(libstat_test3_a-stat-test.o): In function `stat_test3':
stat-test.c:(.text+0x143): undefined reference to `g_assertion_message_cmpnum'
stat-test.c:(.text+0x196): undefined reference to `g_assertion_message_cmpnum'
stat-test.c:(.text+0x1ea): undefined reference to `g_assertion_message_cmpnum'
libstat_test3.a(libstat_test3_a-stat-test.o):stat-test.c:(.text+0x23d):
more undefined references to `g_assertion_message_cmpnum' follow
collect2: error: ld returned 1 exit status
Makefile:906: recipe for target 'stat_test' failed
make[4]: *** [stat_test] Error 1

builded with:

gcc 5.3.0
glib2 2.46.2
python3 3.5.1
python-six 1.10.0 (over python3)
python-pyparsing 2.0.6-1 (over python3)
spice-protocol cffb8ba (from git)
libcacard 998db1e (from git)
libjpeg-turbo 1.4.2
celt0.5.1 0.5.1.3
pixman 0.32.8
openssl 1.0.2.e
zlib 1.2.8
Archlinux 64 bits

full log http://sl1pkn07.wtf/paste/view/9b38e3a8

greetings

[1] http://lists.freedesktop.org/archives/spice-bugs/2015-December/001222.html
Comment 1 Eduardo Lima (Etrunko) 2015-12-29 17:23:08 UTC
I have just created a fresh build here and it works fine. I suspect there is something to do with glib in your setup. Are you using a package provided by your distribution or did you build it manually?
Comment 2 gustavo alvarez 2015-12-29 17:25:45 UTC
only used selfcompiled the packages marked with 'from git'. the rest is provide by package distribution
Comment 3 gustavo alvarez 2015-12-29 17:35:06 UTC
one note is, all git is builded through of makepkg, official arch package maker

this is the PKGBUILD (build script) for libcacard and spice-protocol

http://sl1pkn07.wtf/paste/view/7f48be94 -> spice protocol
http://sl1pkn07.wtf/paste/view/1435a6f5 -> libcacard

the CXXFLAGS, CPPFLAGS and LDFLAGS is provided by makepkg config environment

--snit---
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CXXFLAGS="-march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
--snip--
Comment 4 gustavo alvarez 2015-12-29 17:38:32 UTC
Hi again

the spice pkgbuild http://sl1pkn07.wtf/paste/view/27bdbd2a

greetings
Comment 5 Eduardo Lima (Etrunko) 2015-12-30 12:44:30 UTC
Hi, can you please check for this symbol in the /usr/lib/libglib-2.0.so in your system?

For example, here is the result in my system:

$ readelf -Ws /usr/lib64/libglib-2.0.so | grep assertion
   627: 000000000006f8a0   389 FUNC    GLOBAL DEFAULT   11 g_assertion_message
  1000: 000000000006fd20   470 FUNC    GLOBAL DEFAULT   11 g_assertion_message_cmpnum
Comment 6 gustavo alvarez 2015-12-30 13:01:39 UTC
└───╼  readelf -Ws /usr/lib/libglib-2.0.so | grep assertion
   589: 0000000000070060   255 FUNC    GLOBAL DEFAULT   11 g_assertion_message_error
   596: 000000000006cd10    64 FUNC    GLOBAL DEFAULT   11 g_test_set_nonfatal_assertions
   644: 000000000006fc00   470 FUNC    GLOBAL DEFAULT   11 g_assertion_message_cmpnum
   749: 000000000006f780   389 FUNC    GLOBAL DEFAULT   11 g_assertion_message
   975: 000000000006f910   124 FUNC    GLOBAL DEFAULT   11 g_assertion_message_expr
  1385: 000000000006ff20   311 FUNC    GLOBAL DEFAULT   11 g_assertion_message_cmpstr
  1666: 0000000000070160   682 FUNC    GLOBAL DEFAULT   11 g_test_trap_assertions
Comment 7 Eduardo Lima (Etrunko) 2015-12-30 13:46:54 UTC
Created attachment 120738 [details] [review]
server/tests/Makefile.am patch

So, as glib exports the symbols, the only option left is something wrong with Makefile, but as I can't reproduce it, it is more a guess. Please check if this patch solves the build issues you are having.
Comment 8 gustavo alvarez 2015-12-30 23:28:32 UTC
perfect. with the patch now build ok

thanks a lot!
Comment 9 Eduardo Lima (Etrunko) 2016-01-07 13:17:28 UTC
Created attachment 120859 [details] [review]
Another fix for makefile

Hi Gustavo,

We are discussing the proper solution for this problem on the mailing list, and it was raised that a this new patch should also fix it. Can you test it please?

Thanks, Eduardo
Comment 10 gustavo alvarez 2016-01-07 16:53:08 UTC
yes, https://bugs.freedesktop.org/attachment.cgi?id=120859 also fixed the problem

greetings
Comment 11 Eduardo Lima (Etrunko) 2016-01-07 17:00:37 UTC
Thanks for the confirmation, this second one will  be merged.
Comment 12 Eduardo Lima (Etrunko) 2016-01-08 13:57:20 UTC
Fix pushed to upstream repository
http://cgit.freedesktop.org/spice/spice/commit/?id=8c6dcc5eaffc4e1ed810693de04a78dd2ca2b528


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.