Bug 193188

Summary: multimedia/plexhometheater crash ERROR: Unable to load /usr/local/bin/system/libcpluff-x86_64-freebsd.so
Product: Ports & Packages Reporter: Ben Woods <woodsb02>
Component: Individual Port(s)Assignee: Adam Weinberger <adamw>
Status: Closed FIXED    
Severity: Affects Some People CC: adamw, fyr, marino
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
PR193188 patch resolving XBMC_BIN_HOME folder issue
none
PR193188 patch resolving XBMC_BIN_HOME folder issue none

Description Ben Woods freebsd_committer freebsd_triage 2014-08-31 04:26:10 UTC
Plexhometheater crashes at launch with:
ERROR: Unable to create application. Exiting
Segmentation fault (core dumped)

FROM LOGS:
ERROR: Unable to load /usr/local/bin/system/libcpluff-x86_64-freebsd.so, reason: Cannot open "/usr/local/bin/system/libcpluff-x86_64-freebsd.so

FROM KTRACE:
47944 plexhometheater NAMI  "/usr/local/bin/system/libcpluff-x86_64-freebsd.so"
      "23:21:46 T:34577867776   ERROR: Unable to load /usr/local/bin/system/libcpluff-x86_64-freebsd.so, reason: Cannot open "/usr/local/bin/system/libcpluff-x86_64-freebsd.so"
      "23:21:46 T:34577867776   ERROR: ADDONS: Fatal Error, could not load libcpluff
the lib is in /usr/local/lib/plexhometheater/system/libcpluff-x86_64-freebsd.so

The real file is in /usr/local/lib/plexhometheater/system/libcpluff-x86_64-freebsd.so
Comment 1 Ben Woods freebsd_committer freebsd_triage 2014-08-31 04:32:12 UTC
Reported by two users: Miguel Clara and fyr
Comment 2 John Marino freebsd_committer freebsd_triage 2014-08-31 09:36:15 UTC
To the others: 

woodsb02 is the maintainer.  The port is new (21 August).  He's reporting issues that he would be assigned to fix.  This is the 3rd such PR.  It appears that he may not understand the responsibilities of being a maintainer as it appears he expects somebody else to fix the issues of the port.

I'm trying to figure out what is going on in the other 2 PRs ( bug 193189 and bug 193190 )
Comment 3 Ben Woods freebsd_committer freebsd_triage 2014-08-31 09:54:18 UTC
Hi John,
I am listed as the maintainer as I did the original porting work, however I do not have a commit bit and adamw committed the original port for me.
Since I do not have a commit bit, I raised this PR as I have been notified of a problem, and it seemed the right place for me to attach the patch once I have it ready.
Regards,
Ben
Comment 4 John Marino freebsd_committer freebsd_triage 2014-08-31 10:10:44 UTC
OPENING - MAINTAINER and SUBMITTER are the same
Comment 5 Ben Woods freebsd_committer freebsd_triage 2014-08-31 15:39:46 UTC
Created attachment 146605 [details]
PR193188 patch resolving XBMC_BIN_HOME folder issue

This patch fixes the problem with libcpluff and the other libraries that it looks for in XBMC_BIN_HOME.
Comment 6 John Marino freebsd_committer freebsd_triage 2014-08-31 15:54:19 UTC
okay, thanks.  Moving to patch-ready pool
Comment 7 Ben Woods freebsd_committer freebsd_triage 2014-09-02 11:17:38 UTC
Created attachment 146675 [details]
PR193188 patch resolving XBMC_BIN_HOME folder issue

Sorry, I hadn't formed the original patch file correctly.... fixed now.
Comment 8 Ben Woods freebsd_committer freebsd_triage 2014-09-04 23:00:51 UTC
Successful redports build here:
https://redports.org/buildarchive/20140902111700-49616/
Comment 9 fyr 2014-09-05 01:58:07 UTC
The last patch 146675 solve the problem for me.
Comment 10 commit-hook freebsd_committer freebsd_triage 2014-09-13 16:59:06 UTC
A commit references this bug:

Author: adamw
Date: Sat Sep 13 16:58:33 UTC 2014
New revision: 368121
URL: http://svnweb.freebsd.org/changeset/ports/368121

Log:
  Upgrade multimedia/plexhometheater to v1.2.2

  The attached patch upgrades multimedia/plexhometheater to v1.2.2.

  In addition, it removes the LIBDEPENDS on audio/lame and java as neither are
  actually used by plexhometheater, and adds a pkg-message to explain how to run
  plexhometheater from the command line when the package is installed.

  ---

  Plexhometheater is unable to play videos, with some of the following error
  messages appearing in the logs depending on the codec of the video being
  played.

  ERROR: Unable to load
  /usr/local/lib/plexhometheater/system/players/dvdplayer/avcodec-53-x86-freebsd.so,
  reason: /usr/local/bin/system/players/dvdplayer/avcodec-53-x86_64-freebsd.so:
  Undefined symbol "ff_h264dsp_init_x86"

  ERROR: Unable to load
  /usr/local/lib/plexhometheater/system/players/dvdplayer/avcodec-53-x86-freebsd.so,
  reason: /usr/local/bin/system/players/dvdplayer/avcodec-53-x86_64-freebsd.so:
  Undefined symbol "ff_mlp_init_x86"

  This is similar to PR181964 filed previously for multimedia/gstreamer-ffmpeg
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181964

  This issue is caused as during port build some variables not defined in
  MAKE_ENV/MAKE_ARGS are leaked to do-build target via .MAKEFLAGS rule in
  bsd.port.mk. According to make(1) man page variable assignments in MAKEFLAGS
  are treated as those on command line which means they override assignments in
  Makefiles.

  Unfortunately, this breaks building arch-specific code for libavcodec as
  $(ARCH) in config.mak is no longer honored.

  Fix: Rename the variable from ARCH to FFMPEG_ARCH, as is done in
  multimedia/ffmpeg.

  ---

  Add binutils as builddep on FreeBSD8 and use cmake compiler in ffmpeg configure

  ---

  Plexhometheater will fail to build from ports if ffmpeg is already installed on
  the system (via ports or package).

  ---

  Plexhometheater crashes at launch with:
  ERROR: Unable to create application. Exiting
  Segmentation fault (core dumped)

  FROM LOGS:
  ERROR: Unable to load /usr/local/bin/system/libcpluff-x86_64-freebsd.so,
  reason: Cannot open "/usr/local/bin/system/libcpluff-x86_64-freebsd.so

  PR:		193547, 193282, 193190, 193189, 193188
  Submitted by:	Ben Woods (maintainer)

Changes:
  head/multimedia/plexhometheater/Makefile
  head/multimedia/plexhometheater/distinfo
  head/multimedia/plexhometheater/files/patch-CMakeLists.txt
  head/multimedia/plexhometheater/files/patch-lib__ffmpeg__CMakeLists.txt
  head/multimedia/plexhometheater/files/patch-xbmc__cdrip__CMakeLists.txt
  head/multimedia/plexhometheater/files/patch-xbmc__cdrip__EncoderFFmpeg.cpp
  head/multimedia/plexhometheater/files/pkg-message.in
  head/multimedia/plexhometheater/files/plexhometheater.sh.in
  head/multimedia/plexhometheater/pkg-plist
Comment 11 Adam Weinberger freebsd_committer freebsd_triage 2014-09-13 17:03:46 UTC
Committed