Bug 204380 - multimedia/kodi: Add missing dependencies, fix linking error
Summary: multimedia/kodi: Add missing dependencies, fix linking error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Carlos J. Puga Medina
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 209698
  Show dependency treegraph
 
Reported: 2015-11-09 00:19 UTC by Yuri Victorovich
Modified: 2016-11-25 01:37 UTC (History)
7 users (show)

See Also:
mickael.maillot: maintainer-feedback+


Attachments
patch (2.32 KB, patch)
2015-11-09 00:19 UTC, Yuri Victorovich
no flags Details | Diff
squish patch to link with kodi's own squish library (924 bytes, patch)
2016-02-06 10:26 UTC, Tomasz Sowa
cpm: maintainer-approval? (mickael.maillot)
Details | Diff
patch to add missing dependencies (1.94 KB, patch)
2016-11-14 10:09 UTC, Carlos J. Puga Medina
no flags Details | Diff
patch (2.03 KB, patch)
2016-11-14 11:08 UTC, Carlos J. Puga Medina
cpm: maintainer-approval? (mickael.maillot)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2015-11-09 00:19:06 UTC
Created attachment 162911 [details]
patch

Added many ports that kody immediately depends on. It (obviously) builds without these dependencies, however if some of the other dependencies will change and drop the corresponding dependency, kody build will break.
Comment 1 Andrew 2015-12-17 00:13:05 UTC
FreeBSD bclinton 10.2-STABLE FreeBSD 10.2-STABLE #0 r291083: Sun Nov 22 21:34:30 PST 2015     toor@bclinton:/usr/obj/usr/src/sys/GENERIC  amd64

root@bclinton:kodi# make showconfig
===> The following configuration options are available for kodi-15.2_1:
     AIRPLAY=off: AirPlay support via libplist
     AIRTUNES=off: AirTunes support via libshairplay
     AVAHI=off: Zeroconf support via Avahi
     CEC=off: CEC adapter support
     DOCS=on: Build and/or install documentation
     LIBBLURAY=off: Blu-ray discs support via libbluray
     LIRC=off: Infrared remote control support
     MYSQL=on: MySQL database support
     NFS=off: Network File System support
     NONFREE=on: Enable non-free components (rar, ccx, ffmpeg)
     PULSEAUDIO=off: PulseAudio sound server support
     RTMP=off: RTMP protocol support via librtmp
     SFTP=off: SSH SFTP support via libssh
     SMB=off: 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


root@bclinton:kodi# svn update
Updating '.':
At revision 403885.


gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26/xbmc/cores/dvdplayer/DVDInputStreams'
CPP     xbmc/guilib/TextureManager.o
CPP     xbmc/guilib/VisibleEffect.o
CPP     xbmc/guilib/XBTF.o
CPP     xbmc/guilib/XBTFReader.o
CPP     xbmc/guilib/TextureGL.o
CPP     xbmc/guilib/GUIFontTTFGL.o
CPP     xbmc/guilib/GUITextureGL.o
CPP     xbmc/guilib/MatrixGLES.o
AR      xbmc/guilib/guilib.a
gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26/xbmc/guilib'
LD      kodi.bin
xbmc/guilib/guilib.a(DDSImage.o): In function `CDDSImage::Compress(unsigned int, unsigned int, unsigned int, unsigned char const*, double)':
DDSImage.cpp:(.text+0x5b0): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
DDSImage.cpp:(.text+0x5e2): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
DDSImage.cpp:(.text+0x6ea): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
DDSImage.cpp:(.text+0x718): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
DDSImage.cpp:(.text+0x75f): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
DDSImage.cpp:(.text+0x78d): 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+0x9a5): 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)
Makefile:486: recipe for target 'kodi.bin' failed
gmake[2]: *** [kodi.bin] Error 1
gmake[2]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

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

Stop.
make: stopped in /usr/ports/multimedia/kodi
Comment 2 Tomasz Sowa 2016-02-06 10:25:00 UTC
Kodi needs to link with its own squish library not the one in the system (graphics/squish), simple workaround is to add libsquish.a to the link stage, patch below.

# cd /usr/ports/multimedia/kodi
# make extract
# make patch
# patch < squish.patch
# make all reinstall clean

diff -ur work.org/xbmc-f4dda26/Makefile.in work/xbmc-f4dda26/Makefile.in
--- work.org/xbmc-f4dda26/Makefile.in	2016-02-06 11:03:56.059503000 +0100
+++ work/xbmc-f4dda26/Makefile.in	2016-02-06 11:04:48.954934000 +0100
@@ -483,7 +483,7 @@
 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
Comment 3 Tomasz Sowa 2016-02-06 10:26:06 UTC
Created attachment 166648 [details]
squish patch to link with kodi's own squish library
Comment 4 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-20 20:59:41 UTC
This patch needs to be committed to fix build on 10.3/amd64.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-10-21 02:24:44 UTC
Re-opener is committer, re-assign accordingly
Comment 6 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-10-22 10:23:46 UTC
(In reply to Kubilay Kocak from comment #5)

Thanks, Kubilay :)
Comment 7 Mark Felder freebsd_committer freebsd_triage 2016-11-11 18:58:43 UTC
cpm, approved.
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-11-12 15:54:13 UTC
A commit references this bug:

Author: cpm
Date: Sat Nov 12 15:54:00 UTC 2016
New revision: 425964
URL: https://svnweb.freebsd.org/changeset/ports/425964

Log:
  multimedia/kodi: Fix linking error on FreeBSD

  gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26/xbmc/cores/dvdplayer/DVDInputStreams'
  CPP     xbmc/guilib/TextureManager.o
  CPP     xbmc/guilib/VisibleEffect.o
  CPP     xbmc/guilib/XBTF.o
  CPP     xbmc/guilib/XBTFReader.o
  CPP     xbmc/guilib/TextureGL.o
  CPP     xbmc/guilib/GUIFontTTFGL.o
  CPP     xbmc/guilib/GUITextureGL.o
  CPP     xbmc/guilib/MatrixGLES.o
  AR      xbmc/guilib/guilib.a
  gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26/xbmc/guilib'
  LD      kodi.bin
  xbmc/guilib/guilib.a(DDSImage.o): In function `CDDSImage::Compress(unsigned int, unsigned int, unsigned int, unsigned char const*, double)':
  DDSImage.cpp:(.text+0x5b0): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
  DDSImage.cpp:(.text+0x5e2): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
  DDSImage.cpp:(.text+0x6ea): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
  DDSImage.cpp:(.text+0x718): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
  DDSImage.cpp:(.text+0x75f): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
  DDSImage.cpp:(.text+0x78d): 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+0x9a5): 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)
  Makefile:486: recipe for target 'kodi.bin' failed
  gmake[2]: *** [kodi.bin] Error 1
  gmake[2]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26'
  ===> Compilation failed unexpectedly.
  Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
  the maintainer.
  *** Error code 1

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

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

  PR:		204380
  Submitted by:	Tomasz Sowa <bugsfreebsd@ttmath.org>
  Reported by:	Andrew <andrew_terekhov@yahoo.com>
  Reviewed by:	feld, junovitch, koobs (mentors)
  Approved by:	Mickael Maillot (maintainer timeout, 9 months), feld, junovitch, koobs (mentors)
  MFH:		2016Q4

Changes:
  head/multimedia/kodi/Makefile
  head/multimedia/kodi/files/patch-Makefile.in
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-11-12 16:59:21 UTC
A commit references this bug:

Author: cpm
Date: Sat Nov 12 16:58:53 UTC 2016
New revision: 425967
URL: https://svnweb.freebsd.org/changeset/ports/425967

Log:
  MFH: r425964

  multimedia/kodi: Fix linking error on FreeBSD

  gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26/xbmc/cores/dvdplayer/DVDInputStreams'
  CPP     xbmc/guilib/TextureManager.o
  CPP     xbmc/guilib/VisibleEffect.o
  CPP     xbmc/guilib/XBTF.o
  CPP     xbmc/guilib/XBTFReader.o
  CPP     xbmc/guilib/TextureGL.o
  CPP     xbmc/guilib/GUIFontTTFGL.o
  CPP     xbmc/guilib/GUITextureGL.o
  CPP     xbmc/guilib/MatrixGLES.o
  AR      xbmc/guilib/guilib.a
  gmake[3]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26/xbmc/guilib'
  LD      kodi.bin
  xbmc/guilib/guilib.a(DDSImage.o): In function `CDDSImage::Compress(unsigned int, unsigned int, unsigned int, unsigned char const*, double)':
  DDSImage.cpp:(.text+0x5b0): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
  DDSImage.cpp:(.text+0x5e2): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
  DDSImage.cpp:(.text+0x6ea): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
  DDSImage.cpp:(.text+0x718): undefined reference to `squish::ComputeMSE(unsigned char const*, int, int, int, unsigned char const*, int, double&, double&)'
  DDSImage.cpp:(.text+0x75f): undefined reference to `squish::CompressImage(unsigned char const*, int, int, int, void*, int, float*)'
  DDSImage.cpp:(.text+0x78d): 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+0x9a5): 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)
  Makefile:486: recipe for target 'kodi.bin' failed
  gmake[2]: *** [kodi.bin] Error 1
  gmake[2]: Leaving directory '/usr/ports/multimedia/kodi/work/xbmc-f4dda26'
  ===> Compilation failed unexpectedly.
  Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
  the maintainer.
  *** Error code 1

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

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

  PR:		204380
  Submitted by:	Tomasz Sowa <bugsfreebsd@ttmath.org>
  Reported by:	Andrew <andrew_terekhov@yahoo.com>
  Reviewed by:	feld, junovitch, koobs (mentors)
  Approved by:	Mickael Maillot (maintainer timeout, 9 months), feld, junovitch, koobs (mentors)

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q4/
  branches/2016Q4/multimedia/kodi/Makefile
  branches/2016Q4/multimedia/kodi/files/patch-Makefile.in
Comment 10 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-12 17:03:00 UTC
Patch to add missing dependencies is pending.
Comment 11 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-14 10:09:43 UTC
Created attachment 176985 [details]
patch to add missing dependencies
Comment 12 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-14 11:08:40 UTC
Created attachment 176987 [details]
patch

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

Register CONFLICTS_BUILD=compat9x
Comment 13 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-14 20:24:00 UTC
All builds are fine via poudriere(8)

poudriere testport -j 102x32 -o multimedia/kodi [OK]
poudriere testport -j 102x64 -o multimedia/kodi [OK]
poudriere testport -j 103x32 -o multimedia/kodi [OK]
poudriere testport -j 103x64 -o multimedia/kodi [OK]
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2016-11-15 10:08:36 UTC
Is attachment 176987 [details] to be merged as well? Please set flags as appropriate, including maintainer-approval flags (with comment if necessary)
Comment 15 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-15 11:29:25 UTC
(In reply to Kubilay Kocak from comment #14)

Yes, I'll keep that in mind.

Thanks for your support, Kubilay :)
Comment 16 commit-hook freebsd_committer freebsd_triage 2016-11-25 01:37:28 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 17 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-11-25 01:37:48 UTC
Committed, thanks!