On Mon, 24 Jan 2011 20:05:44 -0500
Matthew Mondor <mm_li...@pulsar-zone.net> wrote:

> Because -L is allright, linking succeeds.  However, because RPATH is
> missing, ecl_min invokation fails when trying to dynamically link
> libffi.  BTW, I also tried disabling libffi support using
> --with-dffi=NO but it didn't remove dependency on libffi either.  I
> suppose that runtime linking would also have failed on libgmp and
> libgc, which in my case are all under /usr/pkg/lib.
> 
> Should I explicitely add an RPATH declaration to LDFLAGS myself, or is
> this a bug where the ecl_min bootstrap should do it?

The attached diff fixes it for me, although I'm not sure how "portable"
it is on the various toolchains and setups.

Although this doesn't explicitely add an -L and RPATH combination for
libffi (it appears that configuration magic is missing for that
library), since libffi is likely to be at the same location as gmp and
boehm, it's probably "safe enough" and fixes the above issue for me.

Thanks,
-- 
Matt
Index: src/configure.in
===================================================================
RCS file: /cvsroot/ecls/ecl/src/configure.in,v
retrieving revision 1.257
diff -u -r1.257 configure.in
--- src/configure.in    19 Jan 2011 21:32:21 -0000      1.257
+++ src/configure.in    26 Jan 2011 01:51:40 -0000
@@ -84,7 +84,7 @@
 AC_ARG_WITH(gmp-prefix,
   AS_HELP_STRING( [--with-gmp-prefix=path],
                   [prefix for system GMP includes and libraries] ),
-  [GMP_CPPFLAGS="-I$withval/include"; GMP_LDFLAGS="-L$withval/lib"], [])
+  [GMP_CPPFLAGS="-I$withval/include"; GMP_LDFLAGS="-L$withval/lib 
-Wl,-R$withval/lib"], [])
 
 AC_ARG_WITH(gmp-incdir,
   AS_HELP_STRING( [--with-gmp-incdir=path],
@@ -94,7 +94,7 @@
 AC_ARG_WITH(gmp-libdir,
   AS_HELP_STRING( [--with-gmp-libdir=path],
                  [path to system GMP libraries (overrides prefix)] ),
-  [GMP_LDFLAGS="-L$withval"], [])
+  [GMP_LDFLAGS="-L$withval -Wl,-R$withval"], [])
 
 AC_ARG_ENABLE(local-gmp,
   AS_HELP_STRING( [--enable-local-gmp],
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to