Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 2014 09:54:50 -0500
From:      Diane Bruce <db@db.net>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Missing RPATH problem with gfortran related ports
Message-ID:  <20140518145450.GA12200@night.db.net>

next in thread | raw e-mail | index | archive | help
Uses/fortran.mk 
provides

FFLAGS+=        -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER}
FCFLAGS+=       -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER}
LDFLAGS+=       -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} \
                -L${LOCALBASE}/lib/gcc${_GCC_VER} -B${LOCALBASE}/bin

It turns out that cc on HEAD FreeBSD-10 passes the -Wl,-rpath
information correctly to ld but the -B${LOCALBASE}/bin means
ports ld is used which promptly ignores the -rpath option somehow.
This means any port using both cc and gfortran that uses any C code
will not properly insert the needed RPATH into the resultant binary.

This will lead to errors about missing libgcc being the wrong version
and the program will not run. This is the case I discovered with py-numpy
in particular. The quick fix is to USE_GCC=  yes 
in the Makefile.

I hope that was coherent as I am still recovering from BSDCan ;)

Diane
-- 
- db@FreeBSD.org db@db.net http://www.db.net/~db



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140518145450.GA12200>