Bug 209698 - multimedia/kodi: 16.0 doesn't build on FreeBSD 10.3-RELEASE amd64
Summary: multimedia/kodi: 16.0 doesn't build on FreeBSD 10.3-RELEASE amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch, patch-ready
Depends on: 204380 213553
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-22 17:43 UTC by Vladimir Omelchuk
Modified: 2016-11-25 01:38 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (mickael.maillot)
koobs: merge-quarterly?


Attachments
Full log (4.44 KB, application/x-xz)
2016-05-22 17:43 UTC, Vladimir Omelchuk
no flags Details
Full log [2] (35.97 KB, application/x-xz)
2016-10-20 20:28 UTC, Vladimir Omelchuk
no flags Details
patch (774 bytes, patch)
2016-10-20 22:28 UTC, Vladimir Omelchuk
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Omelchuk 2016-05-22 17:43:22 UTC
Created attachment 170552 [details]
Full log

Part of log:
...
gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99/tools/depends/native/JsonSchemaBuilder'
Jsonbuilder: tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder
gmake -C xbmc/interfaces/json-rpc ServiceDescription.h
gmake[3]: Entering directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99/xbmc/interfaces/json-rpc'
../../../tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder schema/version.txt schema/license.txt schema/methods.json schema/types.json schema/notifications.json
/usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.11 required by /usr/ports/multimedia/kodi/work/xbmc-a5f3a99/tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder not found
Makefile:39: recipe for target 'ServiceDescription.h' failed
gmake[3]: *** [ServiceDescription.h] Error 1
gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99/xbmc/interfaces/json-rpc'
codegenerator.mk:76: recipe for target 'xbmc/interfaces/json-rpc/ServiceDescription.h' failed
gmake[2]: *** [xbmc/interfaces/json-rpc/ServiceDescription.h] Error 2
gmake[2]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99'
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/multimedia/kodi
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/kodi


# make showconfig
===> The following configuration options are available for kodi-16.0_1:
     AIRPLAY=on: AirPlay support via libplist
     AIRTUNES=on: AirTunes support via libshairplay
     AVAHI=on: Zeroconf support via Avahi
     CEC=on: CEC adapter support
     DOCS=on: Build and/or install documentation
     LIBBLURAY=on: Blu-ray discs support via libbluray
     LIRC=on: Infrared remote control support
     MYSQL=on: MySQL database support
     NFS=on: Network File System support
     NONFREE=off: Enable non-free components (rar, ccx, ffmpeg)
     PULSEAUDIO=off: PulseAudio sound server support
     RTMP=on: RTMP protocol support via librtmp
     SFTP=on: SSH SFTP support via libssh
     SMB=on: SMB network protocol support
     VAAPI=on: VAAPI (GPU video acceleration) support
     VDPAU=on: VDPAU (GPU video acceleration) support
     WEBSERVER=on: Build and/or install internal web server
===> Use 'make config' to modify these settings


<uname>
FreeBSD 10.3-RELEASE-p3 amd64

<make.conf>
CPUTYPE?=core2
OPTIONS_SET=CUPS
WITHOUT_LPR=YES
DEFAULT_VERSIONS=apache=2.4
QT4_OPTIONS=CUPS NAS QGTKSTYLE
LOCALIZED_LANG=ru
DEFAULT_VERSIONS+=perl5=5.20
MAKE_JOBS_UNSAFE=yes
DEFAULT_VERSIONS=mysql=5.7
.if ${.CURDIR:M*/ports/devel/ccache}
NO_CCACHE=yes
.endif
Comment 1 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-07-15 14:45:13 UTC
It seems that linux_base-c6 has GLIBCXX_3.4.9

# strings /usr/local/lib/compat/libstdc++.so.6 | grep GLIBCXX_3
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9

linux_base-f10 has one minor version short

# strings /compat/linux/usr/lib/libstdc++.so.6 | grep GLIBCXX_3
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10

Unfortunately it requires GLIBCXX_3.4.11
Comment 2 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-07-15 15:11:00 UTC
So I'd give a shot to configure kodi to to have the correct C++ libraries for GCC
Comment 3 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-07-15 15:14:39 UTC
(In reply to Carlos J. Puga Medina from comment #2)

Here is the corresponding output:

# strings /usr/local/lib/gcc48/libstdc++.so.6 | grep GLIBCXX_3.4.11
GLIBCXX_3.4.11
_ZSt10adopt_lock@@GLIBCXX_3.4.11
_ZSt10defer_lock@@GLIBCXX_3.4.11
_ZNVSt9__atomic011atomic_flag12test_and_setESt12memory_order@@GLIBCXX_3.4.11
GLIBCXX_3.4.11
_ZNVSt9__atomic011atomic_flag5clearESt12memory_order@@GLIBCXX_3.4.11
_ZSt11try_to_lock@@GLIBCXX_3.4.11
Comment 4 mickael.maillot 2016-07-15 15:27:23 UTC
Looks like your JsonSchemaBuilder is built with g++ command from gcc48 and not linked properly with -Wl,-rpath=.... and the binary take the wrong libstdc++

we need to pass the CXX variable to JsonSchemaBuilder's configure, i'll look how to do that.
Comment 5 bye 2016-09-08 19:03:30 UTC
I've also run into the exact same issue. Is there any update on this bug?
Comment 6 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-20 17:23:04 UTC
It should be fixed by r424299.
Comment 7 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-20 17:47:21 UTC
Also it's necessary to deinstall misc/compat9x port before trying to build kodi.
Comment 8 Vladimir Omelchuk 2016-10-20 20:25:43 UTC
(In reply to Carlos J. Puga Medina from comment #7)

Note, package "misc/compat9x" need for "archivers/rar" ...

root@vladiom:~ # pkg version -v | grep compat9x
compat9x-amd64-9.3.903000.20160608 =   up-to-date with index

Reverse dependencies for a package "misc/compat9x":
root@vladiom:~ # pkg query %ro compat9x-amd64-9.3.903000.20160608 
archivers/rar

But in any case remove:
root@vladiom:~ # pkg delete compat9x-amd64-9.3.903000.20160608
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 2 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	compat9x-amd64-9.3.903000.20160608
	rar-5.4.0,3

Number of packages to be removed: 2

The operation will free 12 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/2] Deinstalling rar-5.4.0,3...
[1/2] Deleting files for rar-5.4.0,3: 100%
[2/2] Deinstalling compat9x-amd64-9.3.903000.20160608...
[2/2] Deleting files for compat9x-amd64-9.3.903000.20160608: 100%

root@vladiom:~ # pkg version -v | grep compat9x
root@vladiom:~ #
Comment 9 Vladimir Omelchuk 2016-10-20 20:27:24 UTC
(In reply to Carlos J. Puga Medina from comment #6)

New error (full log in the attachment):
...
gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-c327c53/xbmc/main'
LD      kodi.bin
/usr/bin/ld: warning: libcrypto.so.7, needed by //usr/lib/libkrb5.so.11, may conflict with libcrypto.so.8
xbmc/guilib/guilib.a(DDSImage.o): In function `CDDSImage::Compress(unsigned int, unsigned int, unsigned int, unsigned char const*, double)':
DDSImage.cpp:(.text+0x70c): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
DDSImage.cpp:(.text+0x73f): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
DDSImage.cpp:(.text+0x89f): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
DDSImage.cpp:(.text+0x8ce): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
DDSImage.cpp:(.text+0x916): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
DDSImage.cpp:(.text+0x945): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
xbmc/guilib/guilib.a(DDSImage.o): In function `CDDSImage::Decompress(unsigned char*, unsigned int, unsigned int, unsigned int, unsigned char const*, unsigned int)':
DDSImage.cpp:(.text+0xb65): undefined reference to `squish::DecompressImage(unsigned char*, int, int, int, void const*, int)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:437: kodi.bin] Error 1
gmake[2]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-c327c53'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/kodi
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/kodi


<uname>
FreeBSD 10.3-RELEASE-p10 amd64

<make.conf>
CPUTYPE?=core2
OPTIONS_SET=CUPS
WITHOUT_LPR=YES
DEFAULT_VERSIONS+=apache=2.4
QT4_OPTIONS=CUPS NAS QGTKSTYLE
LOCALIZED_LANG=ru
DEFAULT_VERSIONS+=perl5=5.20
MAKE_JOBS_UNSAFE=yes
DEFAULT_VERSIONS+=mysql=5.7
DEFAULT_VERSIONS+=ssl=openssl
Comment 10 Vladimir Omelchuk 2016-10-20 20:28:31 UTC
Created attachment 175992 [details]
Full log [2]
Comment 11 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-20 20:55:23 UTC
(In reply to Vladimir Omelchuk from comment #9)

The following patch will fix the issue:

--- Makefile.in.orig	2016-10-20 18:15:13 UTC
+++ Makefile.in
@@ -434,7 +434,7 @@ endif
 ifeq ($(findstring osx,@ARCH@), osx)
 	$(SILENT_LD) $(CXX) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,-all_load,-ObjC $(MAINOBJS) $(DYNOBJSXBMC) $(NWAOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic
 else
-	$(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic
+	$(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o @APP_NAME_LC@.bin $(MAINOBJS) -Wl,--start-group $(MAINOBJS) $(DYNOBJSXBMC) $(OBJSXBMC) -Wl,--end-group $(NWAOBJSXBMC) $(LIBS) -rdynamic ./tools/depends/native/libsquish-native/squish-install/lib/libsquish.a
 endif
 
 @APP_NAME_LC@-xrandr: xbmc-xrandr.c


See bug #204380 for further details.
Comment 12 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-20 21:05:56 UTC
(In reply to Vladimir Omelchuk from comment #8)

After install multimedia/kodi, you can reinstall misc/compat9x again.
Comment 13 Vladimir Omelchuk 2016-10-20 21:16:30 UTC
(In reply to Carlos J. Puga Medina from comment #11)

Wait commit this patch or test locally?
Comment 14 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-20 21:18:41 UTC
(In reply to Vladimir Omelchuk from comment #13)

Please, test it locally and report back.

It worked for me :)
Comment 15 Vladimir Omelchuk 2016-10-20 22:26:16 UTC
(In reply to Carlos J. Puga Medina from comment #14)

With patch build and install without any errors!
Thanks!
Comment 16 Vladimir Omelchuk 2016-10-20 22:28:32 UTC
Created attachment 175996 [details]
patch
Comment 17 Vladimir Omelchuk 2016-11-09 22:52:11 UTC
When you are planning fix this error?
Comment 18 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-10 00:34:13 UTC
(In reply to Vladimir Omelchuk from comment #17)

Yes, it is ready to be committed :)
Comment 19 commit-hook freebsd_committer freebsd_triage 2016-11-25 01:37:31 UTC
A commit references this bug:

Author: cpm
Date: Fri Nov 25 01:36:45 UTC 2016
New revision: 427072
URL: https://svnweb.freebsd.org/changeset/ports/427072

Log:
  multimedia/kodi: Add missing dependencies

  - Add missing dependencies [1]
  - Register CONFLICTS_BUILD=compat9x [2]

  Building kodi with misc/compat9x installed is known to fail.
  So before attempting to build kodi users should first remove misc/compat9x.

  gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99/tools/depends/native/JsonSchemaBuilder'
  Jsonbuilder: tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder
  gmake -C xbmc/interfaces/json-rpc ServiceDescription.h
  gmake[3]: Entering directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99/xbmc/interfaces/json-rpc'
  ../../../tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder schema/version.txt schema/license.txt schema/methods.json schema/types.json schema/notifications.json
  /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.11 required by /usr/ports/multimedia/kodi/work/xbmc-a5f3a99/tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder not found
  Makefile:39: recipe for target 'ServiceDescription.h' failed
  gmake[3]: *** [ServiceDescription.h] Error 1
  gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99/xbmc/interfaces/json-rpc'
  codegenerator.mk:76: recipe for target 'xbmc/interfaces/json-rpc/ServiceDescription.h' failed
  gmake[2]: *** [xbmc/interfaces/json-rpc/ServiceDescription.h] Error 2
  gmake[2]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-a5f3a99'
  *** Error code 2

  Stop.
  make[1]: stopped in /usr/ports/multimedia/kodi
  *** Error code 1

  Stop.
  make: stopped in /usr/ports/multimedia/kodi

  PR:		204380 [1], 209698 [2]
  Submitted by:	cpm, Yuri Victorovich <yuri@rawbw.com>
  Reported by:	Vladimir Omelchuck <admin@vladiom.com.ua> [2]
  Approved by:	Mickael Maillot <mickael.maillot@gmail.com> (maintainer), feld (mentor)

Changes:
  head/multimedia/kodi/Makefile
Comment 20 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-25 01:38:23 UTC
Committed, thanks!