arpack-ng  

Issue 1536: Linker error while making tests of 3.1.4

Reported by Bobby Rz, Mar 25, 2015

Steps to reproduce the problem:
1.Install ATLAS 3.10 with full LAPACK interface before building 
arpack-ng
2.configure arpack-ng 3.1.4 with path to ATLAS library
3.make && make check

Expected result:
The test programs would compile and run

Actual result:
/usr/local/lib/liblapack.a(ATL_ilaenv.o): In function `ATL_ilaenv':
ATL_ilaenv.c:(.text+0x413): undefined reference to `ATL_dGetNB'
ATL_ilaenv.c:(.text+0x423): undefined reference to `ATL_sGetNB'
ATL_ilaenv.c:(.text+0x433): undefined reference to `ATL_cGetNB'
ATL_ilaenv.c:(.text+0x441): undefined reference to `ATL_zGetNB'
ATL_ilaenv.c:(.text+0x45f): undefined reference to `ATL_dGetNB'
ATL_ilaenv.c:(.text+0x471): undefined reference to `ATL_sGetNB'
ATL_ilaenv.c:(.text+0x481): undefined reference to `ATL_zGetNB'
ATL_ilaenv.c:(.text+0x488): undefined reference to `ATL_cGetNB'
collect2: ld returned 1 exit status

I noticed that linker flags used for this test program had been as 
"-lcblas -lf77blas -latlas -llapack", which is a 
reflection of this specification in the corresponding Makefile.am : 
	bug_1323_LDADD=../libarpack.la $(BLAS_LIBS) $(LAPACK_LIBS)
 
 But reffering to ATLAS trouble shooting, figured out that the 
correct order should be like "-llapack -lf77blas -lcblas 
-latlas", and "-llapack -lcblas -lf77blas -latlas" 
also works; In either case, the Makefile.am should use this flag 
definition:
 
	bug_1323_LDADD=../libarpack.la $(LAPACK_LIBS) $(BLAS_LIBS)
	
And I think you shall apply this chagne for all other Makefile.am as 
well (after all, both netlib and ATLAS LAPACK use BLAS).

Thanks from a Geek

Created: 2 years 8 months ago by Bobby Rz

Status: New

Labels:
Type:Defect
Priority:Medium