[CLN-list] configuration (and build) fails unless top_srcdir = top_builddir

Richard B. Kreckel kreckel at ginac.de
Sun Apr 6 21:47:04 CEST 2008


Dear Alexei,

Alexei Sheplyakov wrote:
> The patch below reverts incorrect changes:
> 
> diff --git a/configure.ac b/configure.ac
> index d9c5d66..048996a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -154,6 +154,7 @@ dnl           checks for compiler characteristics
>  dnl
>  AC_C_CHAR_UNSIGNED
>                        dnl DEFS __CHAR_UNSIGNED__ if char is unsigned
> +test -d 'include/cln' || mkdir -p 'include/cln'
>  CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,[CL_INTPARAM_CROSS],include/cln/intparam.h,cl_cv_file_intparam_h)
>                        dnl builds include/cln/intparam.h
>  CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,[CL_FLOATPARAM_CROSS],include/cln/floatparam.h,cl_cv_file_floatparam_h)

Ooops. Can you, please, word a comment what this line does and why, and 
I'll happily apply it. I'm afraid someone will remove it again some day 
because it looks sooo much like nonsense. (Incidentally, that is exactly 
what happened to that poor line recently.)

> BTW, --with-gmp=PREFIX doesn't work properly and is very confusing. It doesn't
> set correct linker flags, so the *run-time* linker either can't find libgmp.so
> or even worse -- uses one found in the default library search path.

That feature is useful for people like Paul Zimmermann, who have 
fifty-some versions of libgmp sitting in /opt/. Most people will have 
only one version of libgmp isntalled at a more common prefix and won't 
be interested in it. And it can only work for shared libraries which 
record their dependencies.

That being said, it is working just fine over here:

Step 1, install GMP in non-standard prefix:
$ tar xjf gmp-4.2.2.tar.bz2
$ cd gmp-4.2.2
$ ./configure --prefix=/opt/gmp-4.2.2
$ make install

Step 2, build CLN using the newly built gmp:
$ tar xjf cln-1.2.2.tar.bz2
$ cd cln-1.2.2
$ ./configure --with-gmp=/opt/gmp-4.2.2
$ make

Step 3, link applications with -cln will pull in that libgmp:
$ ldd src/.libs/libcln.so.5.0.2
     libgmp.so.3 => /opt/gmp-4.2.2/lib/libgmp.so.3 (0x00002baa170bf000)
[...]

And LD_LIBRARY_PATH does not contain /opt/gmp-4.2.2 and I do have a 
/usr/lib/libgmp.so.3 on my system which would have been used without 
specifying a GMP prefix.

Cheers
   -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the CLN-list mailing list