Bug 201348 - devel/py-tables: libgcc_s.so.1 raises ImportError on libgfortran.so.3 not found due to missing rpath
Summary: devel/py-tables: libgcc_s.so.1 raises ImportError on libgfortran.so.3 not fou...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-04 22:37 UTC by John W. O'Brien
Modified: 2015-07-05 08:29 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (wen)


Attachments
devel/py-tables: Add USES=fortran to link extensions with gcc rpath (617 bytes, patch)
2015-07-04 22:37 UTC, John W. O'Brien
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John W. O'Brien 2015-07-04 22:37:39 UTC
Created attachment 158354 [details]
devel/py-tables: Add USES=fortran to link extensions with gcc rpath

Upon import tables, the following ImportError exception is raised.

    ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by
/usr/local/lib/gcc48/libgfortran.so.3 not found

The root cause is that utilsextension.so is linked without -Wl,-rpath=${_GCC_RUNTIME} (/usr/local/lib/gcc48, in this case) combined with the dependency on numpy.

For full analysis see:
    https://lists.freebsd.org/pipermail/freebsd-python/2015-June/008420.html

A possible fix for this bug is available in the attached patch, which effectively performs USES+=fortran, thereby invoking ports machinery that sets the necessary linker flags.
Comment 1 commit-hook freebsd_committer 2015-07-05 08:27:13 UTC
A commit references this bug:

Author: wen
Date: Sun Jul  5 08:27:04 UTC 2015
New revision: 391350
URL: https://svnweb.freebsd.org/changeset/ports/391350

Log:
  - Update to 3.2.0
  - Fix run error by add USES=fortran [1]
  - Strip shared library

  PR:		201348 [1]
  Submitted by:	john@saltant.com [1]

Changes:
  head/devel/py-tables/Makefile
  head/devel/py-tables/distinfo
  head/devel/py-tables/files/patch-setup.py
Comment 2 Wen Heping freebsd_committer 2015-07-05 08:29:27 UTC
(In reply to John W. O'Brien from comment #0)
Thank you !

wen