Bug 217459 - benchmarks/hpl /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc49/libgfortran.so.3 not found
Summary: benchmarks/hpl /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/l...
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: Oliver Lehmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 18:55 UTC by otacilio.neto
Modified: 2019-04-19 16:50 UTC (History)
3 users (show)

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


Attachments
v0 (708 bytes, patch)
2019-02-17 22:18 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description otacilio.neto 2017-03-01 18:55:34 UTC
xhpl fails with message 

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

I have tested on FreeBSD 10 i386 and FreeBSD 11 amd64. 
Looks like a problem related with two versions of libgcc_s.so.1

root@nostromo:/usr/ports/benchmarks/hpl # ls /lib/libgcc_s.so.1
/lib/libgcc_s.so.1
root@nostromo:/usr/ports/benchmarks/hpl # ls /usr/local/lib/gcc49/libgcc_s.so.1
/usr/local/lib/gcc49/libgcc_s.so.1
Comment 1 Yuri Victorovich freebsd_committer 2017-04-20 15:47:06 UTC
This is a long-standing problem that clang-compiled code using exceptions isn't compatible with gcc fortran.
Comment 2 Ed Maste freebsd_committer 2017-07-04 21:03:07 UTC
Unfortunately rtld reports an error when the needed verdef entry does not exist, and exits. It does not report the actual symbols that are missing:

For reference I found the following missing symbols from GCC_4.6.0 (from gcc5-provided libgfortran.so.3), which have a compiler-rt implementation:

__addtf3@@GCC_4.6.0
__divtf3@@GCC_4.6.0
__floatditf@@GCC_4.6.0
__floatsitf@@GCC_4.6.0
__floatunditf@@GCC_4.6.0
__multf3@@GCC_4.6.0
__subtf3@@GCC_4.6.0

and the following that do not have a compiler-rt implementation:

__eqtf2@@GCC_4.6.0
__getf2@@GCC_4.6.0
__gttf2@@GCC_4.6.0
__letf2@@GCC_4.6.0
__lttf2@@GCC_4.6.0
__netf2@@GCC_4.6.0
Comment 3 Yuri Victorovich freebsd_committer 2017-07-04 21:08:52 UTC
Once flang matures and supports i386, bug#220313 will solve this problem.
Comment 4 Jan Beich freebsd_committer 2019-02-17 22:18:06 UTC
Created attachment 202107 [details]
v0

Looks like the port doesn't respect LDFLAGS which carry -Wl,-rpath. Can you try the attached patch?
Comment 5 Oliver Lehmann freebsd_committer 2019-04-19 16:50:05 UTC
LINKFLAGS added, updated to 2.3 - works for me

--------------------------------------------------------------------------------
||Ax-b||_oo/(eps*(||A||_oo*||x||_oo+||b||_oo)*N)=   2.29176713e-02 ...... PASSED
================================================================================

Finished    864 tests with the following results:
            864 tests completed and passed residual checks,
              0 tests completed and failed residual checks,
              0 tests skipped because of illegal input values.
--------------------------------------------------------------------------------

End of Tests.
================================================================================