[Debichem-devel] Bug#779827: elpa: FTBFS could not link with blacs (Ubuntu)

Graham Inggs graham at nerve.org.za
Thu Mar 5 10:02:48 UTC 2015


Source: elpa
Version: 2013.11.008-2
Severity: wishlist
Tags: patch

Hi maintainer

Elpa FTBFS on Ubuntu builders as it fails the blacs link test in 
configure with the following output:

configure:6376: checking for library containing blacs_gridinit
configure:6394: mpif90 -o conftest -g -O2 -ffree-form 
-lblacsCinit-openmpi -lblacs-openmpi -lscalapack-openmpi  conftest.f 
-llapack -lblas  >&5
/tmp/ccgbFmtZ.o: In function `MAIN__':
/build/buildd/elpa-2013.11.008/conftest.f:2: undefined reference to 
`blacs_gridinit_'
collect2: error: ld returned 1 exit status
configure:6394: $? = 1
configure: failed program was:
|       program main
|       call blacs_gridinit
|       end
...
configure:6411: result: no
configure:6421: checking whether we can link a program with a blacs lib
configure:6423: result: no
configure:6427: error: could not link with blacs: specify path

It seems the linker in Ubuntu is much stricter than the one in Debian.
I was able to get it to build successfully by reversing the order of the 
blacs and scalapack libraries, and inserting them after 'conftest.f' (as 
LIBS) instead of before 'conftest.f' (as LDFLAGS), as follows:

mpif90 -o conftest -g -O2 -ffree-form conftest.f -llapack -lblas 
-lscalapack-openmpi -lblacs-openmpi -lblacsCinit-openmpi

Please consider the attached patch.

Regards
Graham

-------------- next part --------------
A non-text attachment was scrubbed...
Name: elpa-fix-ubuntu-ftbfs.diff
Type: text/x-diff
Size: 3007 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debichem-devel/attachments/20150305/d7d2e88c/attachment.diff>


More information about the Debichem-devel mailing list