Date: Fri, 31 Jan 2014 15:25:04 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: "Montgomery-Smith, Stephen" <stephen@missouri.edu> Cc: FreeBSD Ports <freebsd-ports@FreeBSD.org> Subject: Re: Problems with linking on FreeBSD-10 Message-ID: <20140131132504.GZ24664@kib.kiev.ua> In-Reply-To: <52EAEC1D.9040502@missouri.edu> References: <52EAEC1D.9040502@missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--ufMBWnG1WFkAvCRz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 31, 2014 at 12:19:46AM +0000, Montgomery-Smith, Stephen wrote: > I maintain the port math/sage. The port builds its own version of the > libreadline library. The port also uses lang/gcc instead of clang, > because the port needs Fortran. >=20 > The port is wanting to create a shared library called libR.so, which it > wants to link with the libreadline library it created itself. So it > issues this kind of command: >=20 > gcc46 -Wl,-rpath=3Dpath-of-newly-made-library -o libR.so -lreadline >=20 > I have left out most of the command for brevity. Not for brevity, but to make the diagnostic impossible. >=20 > Unfortunately the libR.so pulls in /lib/libreadline - the version that > comes with the base FreeBSD. I thought that -rpath flag was supposed to > tell the linker where to find the library. But it doesn't. Show exact commands and exact error message. It is not possible to understand from you message is the failure at the static linking (ld(1)) or dynamic (at the program startup) stage. Just in case this might be useful: - -rpath only affects runtime search path - ld(1) search for libraries is directed with the -L <path> option. >=20 > The failure is when using FreeBSD-10. With FreeBSD-8 it works great. I > also assume that gcc46 uses /usr/local/bin/ld instead of /usr/bin/ld, > since devel/binutils is a dependency of lang/gcc. >=20 > Can anyone help me? Is this a bug with FreeBSD? Or is there some extra > flag I can set with the linker to make it work? I have tried > -rpath-link and -z origin, but these were random guesses. and I don't > really know what I am doing. >=20 > Thanks, Stephen >=20 > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" --ufMBWnG1WFkAvCRz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJS66QvAAoJEJDCuSvBvK1Bjb4P+QGkyqdH8ea4T7VuDQbSvCv2 blnOJleyUr5Bfo7ruJJGICbV/nkEhCTvnr1yDSDToedpSro+dzQkQO2HhDMwl9ur /AG2zIrGHCCQ86tHCYuicLYBVt9YYTenvOG9/3lIe8sigcVBuKQUwW8I5rP3whhb nXczEE9YDmuY+/OiU0gbAmJ7VZ3S00TNBukSgLFaVvaTZP3Ab9+H+cI9wV1Sq7jx gtVIfLMnNGJkg7yRgs+YV9HT5SPTchMnle9oYTUQpiNaSLi1eJncAieMswhbLeSA dpePbFsWwFK+ne5Oxp4a7i57RDONjAuBBgNFS1Gn4quGQRJOZL8X2nTMIVd1MPmw WZmfi3IjyHZ6ZjTaeRRrtXvytRURHNJfiH1xbPoRzUqFQ+xhoFGzCrSlAfTbSbfl Bt427OxAneF17gSFn1Cru1m2x9OJ3sLSlNSoXEGUrqM8dOCfjhF/UrNoFP6oi1K8 32OaLBsrP1tTJbnXyLwzmvHfFbnscJRsVdYZyvjKBGUJ57dyPT9hYYT84e+8mQei /Qg5IlkwjQGii+2PYdcjk8qJqf/dL8sP0grOW1C7UzQPdtxX4WH6B/V4pPpTZnT/ rG4Yp00z6BbM2Vv1gLTPUOvvRPZCkn5UT+48+yW+GdmEL0TdKNPEy1GNhkvpVirQ YffXTNtcRdw91S0TdzTA =jcnp -----END PGP SIGNATURE----- --ufMBWnG1WFkAvCRz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140131132504.GZ24664>