Linux CentOS 7 & Kodi (* master dde9b24) gcc7 & static library linking failure
#1
So trying to compile Kodi master with GCC 7.1.0 but linking fails as follows. Any ideas/pointers please?

@Karellen- Log Removed



Kodi:
* master dde9b24 Merge pull request #12619 from Rechi/bumpPython

CentOS 7:
Linux i5.domain.local 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

GCC:
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-7.1.0/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-7.1.0/libexec/gcc/x86_64-pc-linux-gnu/7.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-7.1.0/configure --prefix=/usr/local/gcc-7.1.0 --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 7.1.0 (GCC)

cmake:
cmake version 3.9.20170801-g748c

CMake suite maintained and supported by Kitware (kitware.com/cmake).
Reply
#2
@AlirezaTorabi

No logs to be posted in the forum please. Post at a public Pastebin type site and then provide the link back here.

Maybe provide a bit more information on what your question is. Detail the steps you have already taken that led you to that point.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
OK cool.

So %100 as in "[100%] Linking CXX executable kodi.bin" compile and then linking fails to build "kodi.bin" and I've a feeling this is to do with GCC and STL and/or static library linking...

I'm following: https://github.com/xbmc/xbmc/blob/master...ADME.linux

So as the stock gcc on CentOS is "gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)" I've manually added:
"gcc (GCC) 7.1.0" &
FFMpeg "* master 44e9783 doc/libav-merge: remove the hls merge TODO"

ld:
GNU ld version 2.25.1-22.base.el7
Copyright © 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

FFMpeg:
ffmpeg version N-86935-g44e9783 Copyright © 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-avresample --enable-shared --extra-cflags=-fPIC --enable-pic --cc=/usr/local/gcc-7.1.0/bin/gcc --cxx=/usr/local/gcc-7.1.0/bin/g++ --enable-vaapi --enable-vdpau --enable-gpl --enable-nonfree
libavutil 55. 69.101 / 55. 69.101
libavcodec 57.102.100 / 57.102.100
libavformat 57. 76.100 / 57. 76.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 97.100 / 6. 97.100
libavresample 3. 6. 0 / 3. 6. 0
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100


---------
LOGS:
---------

cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
https://pastebin.com/MBdewh3s

cmake --build . -- VERBOSE=1
https://pastebin.com/e29jSA8i
Reply
#4
The main issue I think is these two static libraries:

-- Found TinyXML: /usr/local/lib/libtinyxml.a (found version "2.6.2")
-- Found TagLib: /usr/local/lib/libtag.a (found version "1.11.1")

During linking.
I've tried to have them both between -Wl,--whole-archive ... -Wl,--no-whole-archive
with no joy...
Reply
#5
tinyxml seems to be the problem indeed.
can you try with the exact same version we use on our build servers?
http://mirrors.kodi.tv/build-deps/source...2_2.tar.gz

If that doesn't help, a try would be to turn off the gold linker: -DENABLE_LDGOLD=OFF

edit: and your libpcre version might need an update as well
Reply
#6
Success:
[100%] Built target kodi
gmake[1]: Leaving directory `/home/alireza/xbmc/kodi.build'

This "TinyXML" works. Still being detected as:
-- Found TinyXML: /usr/local/lib/libtinyxml.a (found version "2.6.2")

I'm able to link with the default "ld.gold".

Sure I needed to update libpcre as well:
-- Found PCRE: /usr/local/lib/libpcrecpp.so (found version "8.41")
Reply
#7
@wsnipex Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
CentOS 7 & Kodi (* master dde9b24) gcc7 & static library linking failure0