Closed claudiopica closed 12 years ago
I think I solved it with the new Makefile.am. Unfortunately I do not have access to a machine without a std installation, but I'm pretty sure this is working now. See the commit history for details.
Tell me if this solved the issue and I will close this issue.
The issue still persists. I think it is at the level of the configure.ac file in the root directory. The test program to check for the mpfr library fails to compile because of the non-standard location of the library, resulting in configure to exit with a missing library error.
I think at the moment there are 2 problems in the configure.ac file: 1) we should test for the presence of "--with-mpfr" before the check of the library; 2) set LIB to include MPFR_LIB before the check of the library.
This is an extract of the config.log file:
[Omissis] It was created by rhmc_staggered_cuda configure 0.1.2, which was generated by GNU Autoconf 2.67. Invocation command line was
$ ./configure --enable-cuda=sm_20 --with-mpfr=/people/disk2/pica
[omissis]
configure:4484: checking for mpfr_init in -lmpfr
configure:4509: gcc -o conftest -g -O2 conftest.c -lmpfr >&5
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmpfr.a(set_dfl_prec.o): In function mpfr_set_default_prec': (.text+0x37): undefined reference to gmp_assert_fail'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmpfr.a(init2.o): In function mpfr_init2': (.text+0x3c): undefined reference to gmp_assert_fail'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libmpfr.a(init2.o): In function mpfr_init2': (.text+0x56): undefined reference to __gmp_allocate_func'
collect2: ld returned 1 exit status
configure:4509: $? = 1
configure: failed program was: |
/* confdefs.h _/ | #define PACKAGE_NAME "rhmc_staggered_cuda" | #define PACKAGE_TARNAME "rhmc_staggered_cuda" | #define PACKAGE_VERSION "0.1.2" | #define PACKAGE_STRING "rhmc_staggered_cuda 0.1.2" | #define PACKAGE_BUGREPORT "cossu@post.kek.jp" | #define PACKAGE_URL "" | #define PACKAGE "rhmc_staggered_cuda" | #define VERSION "0.1.2" | / end confdefs.h. / |
---|---|---|---|---|---|---|---|---|---|---|
/_ Override any GCC internal prototype to avoid an error. | ||||||||||
Use char because int might match the return type of a GCC | ||||||||||
builtin and then its argument prototype would still apply. */ | ||||||||||
#ifdef __cplusplus | ||||||||||
extern "C" | ||||||||||
#endif | ||||||||||
char mpfr_init (); | ||||||||||
int | ||||||||||
main () | ||||||||||
{ | ||||||||||
return mpfr_init (); | ||||||||||
; | ||||||||||
return 0; | ||||||||||
} |
configure:4518: result: no
Try the new version. I included a special test for MPFR library in a separate .m4 file and I am not using anymore the AC_CHECK_LIB directive in configure.ac . I tried with a non standard installation in my machine and it works, the test is passed and it is invoked using the correct -I
Everything works fine now!
Perfect. Now should work also in Rome, where they had similar problems.
The flag "--with-mpfr=/non-standard/path/to/lib/" seems to be ignored by the configure script.
A temporary hack to avoid the problem is to set LIBRARY_PATH to point to the library location.
Maybe due to old version of autotools? (v2.59)