Bug 217459

Summary: benchmarks/hpl /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc49/libgfortran.so.3 not found
Product: Ports & Packages Reporter: otacilio.neto
Component: Individual Port(s)Assignee: Oliver Lehmann <oliver>
Status: New ---    
Severity: Affects Only Me CC: emaste, gerald, jbeich
Priority: --- Flags: bugzilla: maintainer-feedback? (oliver)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220313
Attachments:
Description Flags
v0 none

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?