[Bug 208120] devel/cmake: Strips necessary rpath when installing any GNU compiler from ports

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Dec 10 20:27:23 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208120

--- Comment #15 from groot at kde.org ---
This ticket is languishing *mostly* because it's unclear what the right course
is (there's no WWJD for cmake behavior in the presence of gcc on FreeBSD).
Diane Bruce in comment:12 explains the issues and has two fixes:

 - fix things in cmake
 - fix individual ports using cmake

The workaround posted here in comment:14 takes another tack and fixes
"everything" that uses libgcc_s by mapping it to a gcc-version-specific
library.

The example program referenced in comment:12 compiles a Fortran program like
so:

    gfortran sum.f90

This program doesn't run, because it links to the wrong libgcc_s.so. So there's
at least four questions we can ask:

 - should Fortran programs, compiled naively, run out-of-the-box? (they don't,
currently)
 - should Fortran programs, compiled with -Wl,rpath, run OOB? (yes)
 - should Fortran programs, compiled using a build-system, run OOB?
 - should Fortran programs, compiled using a build-system and a specific
workaround, run OOB?

The workround / fix in comment:14 answers all of these four questions with
"yes". Fixing things in cmake answers the last two questions with "yes";
working around in ports answers just the last one with "yes".

Personally I think that the build-system should DTRT as much as possible to
deliver a working executable, and that the rpath-fix for gcc-compilers should
be added in cmake.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list