Bug 194237 - multimedia/plexhometheater crashes on startup with error undefined symbol dll_fopen
Summary: multimedia/plexhometheater crashes on startup with error undefined symbol dll...
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: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-08 10:24 UTC by Ben Woods
Modified: 2014-10-13 16:10 UTC (History)
1 user (show)

See Also:


Attachments
Patch to resolve PR194237: fix object files included in libwrapper.a (1.29 KB, patch)
2014-10-08 10:30 UTC, Ben Woods
no flags Details | Diff
Patch to resolve PR194237: Add ENABLE_EXPORTS to plex/CMakeLists.txt (941 bytes, patch)
2014-10-13 11:36 UTC, Ben Woods
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woods freebsd_committer freebsd_triage 2014-10-08 10:24:17 UTC
My port of plexhometheater v1.2.2 to FreeBSD is crashing on startup and printing the following error to the terminal:
/usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so: Undefined symbol "dll_fopen"

The last two lines in the log file show what it was attempting to do at the time:
DEBUG: SECTION:LoadDLL(special://xbmcbin/system/ImageLib-x86_64-freebsd.so)
DEBUG: Loading: /usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so

This can be fixed by running the following command, after which PHT runs well.
# sed -i.bak s/dll_fopen/fopen/g /usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so

If I look in the logs after that, I can see there are still some issues:
DEBUG: SECTION:LoadDLL(special://xbmcbin/system/ImageLib-x86_64-freebsd.so)
DEBUG: Loading: /usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so
ERROR: Unable to load /usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so, reason: /usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so: Shared object has no run-time symbol table
Comment 1 Ben Woods freebsd_committer freebsd_triage 2014-10-08 10:30:21 UTC
Created attachment 148090 [details]
Patch to resolve PR194237: fix object files included in libwrapper.a

This patch fixes PR194237 by ensuring libwrapper.a includes the object files with the necessary dll_fopen function.
Patch should be applied with svn patch.
Comment 2 Ben Woods freebsd_committer freebsd_triage 2014-10-08 10:31:51 UTC
More details of the problem description, and how I found the solution can be found here: https://forums.plex.tv/index.php/topic/123207-freebsd-pht-crashes-on-startup-with-error-undefined-symbol-dll-fopen/
Comment 3 Ben Woods freebsd_committer freebsd_triage 2014-10-08 14:51:43 UTC
Sorry... not ready to commit just yet. Now instead of ImageLib failing with an error about dll_fopen, I get the following:
$ /usr/local/bin/plexhometheater.sh
/usr/local/lib/plexhometheater/system/ImageLib-x86_64-freebsd.so: Undefined symbol "_ZN11XbmcThreads8pthreads14RecursiveMutex16getRecursiveAttrEv"

Still investigating, will feedback once I have a solution.
Comment 4 Ben Woods freebsd_committer freebsd_triage 2014-10-13 11:36:21 UTC
Created attachment 148238 [details]
Patch to resolve PR194237: Add ENABLE_EXPORTS to plex/CMakeLists.txt

This patch resolves PR194237, by allowing shared libraries access to the functions with in the main program of plexhometheater.
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2014-10-13 16:10:20 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2014-10-13 16:10:32 UTC
A commit references this bug:

Author: adamw
Date: Mon Oct 13 16:10:11 UTC 2014
New revision: 370791
URL: https://svnweb.freebsd.org/changeset/ports/370791

Log:
  Allow shared libraries access to the functions within the main program of plexhometheater.

  While here, remove @dirrm's

  PR:		194237
  Submitted by:	maintainer

Changes:
  head/multimedia/plexhometheater/Makefile
  head/multimedia/plexhometheater/files/patch-plex__CMakeLists.txt
  head/multimedia/plexhometheater/pkg-plist