Bug 162706 - math/suitesparse port does not properly detect or link atlas
Summary: math/suitesparse port does not properly detect or link atlas
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Maho Nakata
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-20 22:20 UTC by Don Lewis
Modified: 2013-10-21 22:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer freebsd_triage 2011-11-20 22:20:10 UTC
	The math/suitesparse port looks for and tries to link to
 	libatlas_r.so, which is no longer installed by the math/atlas port.

Fix: According to math/atlas/pkg-descr, it is no longer necessary
	to explictly link with -latlas.  The following patch works for me:



Because the Makefiles for arpack++, arpack, blocksolve95,
	fflas-ffpack, freemat, lapack++, lapack95, lapacke, levmar,
	libtsnnls, mumps, petsc, scalapack, suitesparse, and taucs
	share similar code for selecting the desired libraryies, it
	would probably be better to move it to common location like
	ports/Mk/bsd.blas.mk that could be included in the individual
	port Makefiles to make future maintenance easier.

	Something like this (though the library selection probably
	requires more thought):

.if exists(${LOCALBASE}/lib/libgoto2.so)
WITH_BLAS?=     gotoblas
.elif exists(${LOCALBASE}/lib/libatlas.so)
WITH_BLAS?=     atlas
.else
WITH_BLAS?=     reference
.endif

.if ${WITH_BLAS} == reference
LIB_DEPENDS+=	blas.2:${PORTSDIR}/math/blas
LIB_DEPENDS+=	lapack.4:${PORTSDIR}/math/lapack
BLAS_ST_C=	-lblas
BLAS_ST_F77=	-lblas
BLAS_MT_C=	-lblas
BLAS_MT_F77=	-lblas
LAPACK=         -llapack
.elif ${WITH_BLAS} == gotoblas
LIB_DEPENDS+=   goto2:${PORTSDIR}/math/gotoblas
LIB_DEPENDS+=   lapack.4:${PORTSDIR}/math/lapack
BLAS_ST_C=	-lgoto2p ${PTHREAD_LIBS}
BLAS_ST_F77=	-lgoto2p ${PTHREAD_LIBS}
BLAS_MT_C=	-lgoto2p ${PTHREAD_LIBS}
BLAS_MT_F77=	-lgoto2p ${PTHREAD_LIBS}
LAPACK =        -lgoto2p ${PTHREAD_LIBS}
.elif ${WITH_BLAS} == atlas
LIB_DEPENDS+=   atlas:${PORTSDIR}/math/atlas
BLAS_ST_C=	-lcblas
BLAS_ST_F77=	-lf77blas
BLAS_MT_C=	-lptcblas ${PTHREAD_LIBS}
BLAS_MT_F77=	-lptf77blas ${PTHREAD_LIBS}
LAPACK =        -lalapack ${PTHREAD_LIBS}
.endif--zAsrycek5yqard4enCpVckTd00w35PmwD07yV2fUszT2MkpW
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: math/suitesparse/Makefile
===================================================================
RCS file: /home/ncvs/ports/math/suitesparse/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- math/suitesparse/Makefile	20 Jul 2011 16:17:35 -0000	1.38
+++ math/suitesparse/Makefile	20 Nov 2011 19:37:28 -0000
@@ -30,7 +30,7 @@
 
 .if exists(${LOCALBASE}/lib/libgoto2.so)
 WITH_BLAS?=	gotoblas
-.elif exists(${LOCALBASE}/lib/libatlas_r.so)
+.elif exists(${LOCALBASE}/lib/libatlas.so)
 WITH_BLAS?=	atlas
 .else
 WITH_BLAS?=	reference
@@ -51,8 +51,8 @@
 LAPACK =	-lgoto2p ${PTHREAD_LIBS}
 .elif ${WITH_BLAS} == atlas
 LIB_DEPENDS+=	atlas:${PORTSDIR}/math/atlas
-BLAS=		-lptf77blas -lptcblas -latlas_r ${PTHREAD_LIBS}
-LAPACK =	-lalapack_r ${PTHREAD_LIBS}
+BLAS=		-lptf77blas -lptcblas ${PTHREAD_LIBS}
+LAPACK =	-lalapack ${PTHREAD_LIBS}
 .endif
 
 .if ${ARCH} == "sparc64"
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-11-20 22:20:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->maho

Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162706 

Date: Tue, 22 Nov 2011 12:21:02 +0900 (JST)
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-11-22 11:14:24 UTC
bf          2011-11-22 11:14:10 UTC

  FreeBSD ports repository

  Modified files:
    cad/calculix         Makefile 
    cad/pdnmesh          Makefile 
    cad/tochnog          Makefile 
    french/aster         Makefile 
    graphics/cimg        Makefile 
    math/R               Makefile 
    math/arpack          Makefile 
    math/arpack++        Makefile 
    math/blocksolve95    Makefile 
    math/freemat         Makefile 
    math/gretl           Makefile 
    math/jags            Makefile 
    math/lapack++        Makefile 
    math/lapack95        Makefile 
    math/lapacke         Makefile 
    math/levmar          Makefile 
    math/libtsnnls       Makefile 
    math/mumps           Makefile 
    math/octave          Makefile 
    math/octave-devel    Makefile 
    math/petsc           Makefile 
    math/py-numpy        Makefile 
    math/py-symeig       Makefile 
    math/scalapack       Makefile 
    math/scalapack/files Makefile 
    math/scilab          Makefile 
    math/sdpa            Makefile 
    math/sdpara          Makefile 
    math/suitesparse     Makefile 
    math/superlu         Makefile 
    math/superlu_mt      Makefile 
    science/2dhf         Makefile 
    science/abinit       Makefile 
    science/elmer-hutiter Makefile 
    science/gamess       Makefile 
    science/mbdyn        Makefile 
    science/mpb          Makefile 
    science/mpqc         Makefile 
    science/ncs          Makefile 
    science/psi3         Makefile 
    science/py-scipy     Makefile 
  Log:
  adjust linking and comments in dependent ports after the math/atlas update;
  math/atlas-devel will be updated to use the same constructs at a later date
  
  PR:             162706
  Approved by:    miwi (portmgr)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.37      +2 -2      ports/cad/calculix/Makefile
  1.25      +2 -2      ports/cad/pdnmesh/Makefile
  1.19      +2 -2      ports/cad/tochnog/Makefile
  1.88      +2 -2      ports/french/aster/Makefile
  1.73      +3 -3      ports/graphics/cimg/Makefile
  1.105     +1 -1      ports/math/R/Makefile
  1.9       +3 -3      ports/math/arpack++/Makefile
  1.28      +1 -1      ports/math/arpack/Makefile
  1.17      +6 -6      ports/math/blocksolve95/Makefile
  1.37      +3 -3      ports/math/freemat/Makefile
  1.102     +1 -1      ports/math/gretl/Makefile
  1.27      +1 -1      ports/math/jags/Makefile
  1.32      +5 -5      ports/math/lapack++/Makefile
  1.13      +2 -2      ports/math/lapack95/Makefile
  1.4       +2 -2      ports/math/lapacke/Makefile
  1.6       +2 -2      ports/math/levmar/Makefile
  1.2       +4 -5      ports/math/libtsnnls/Makefile
  1.23      +3 -3      ports/math/mumps/Makefile
  1.106     +10 -10    ports/math/octave-devel/Makefile
  1.135     +10 -10    ports/math/octave/Makefile
  1.37      +5 -5      ports/math/petsc/Makefile
  1.36      +1 -1      ports/math/py-numpy/Makefile
  1.5       +1 -1      ports/math/py-symeig/Makefile
  1.27      +2 -2      ports/math/scalapack/Makefile
  1.2       +2 -2      ports/math/scalapack/files/Makefile
  1.85      +1 -1      ports/math/scilab/Makefile
  1.44      +10 -9     ports/math/sdpa/Makefile
  1.30      +10 -9     ports/math/sdpara/Makefile
  1.39      +5 -5      ports/math/suitesparse/Makefile
  1.42      +9 -9      ports/math/superlu/Makefile
  1.29      +9 -9      ports/math/superlu_mt/Makefile
  1.20      +2 -2      ports/science/2dhf/Makefile
  1.31      +3 -3      ports/science/abinit/Makefile
  1.30      +3 -3      ports/science/elmer-hutiter/Makefile
  1.16      +10 -10    ports/science/gamess/Makefile
  1.30      +4 -4      ports/science/mbdyn/Makefile
  1.20      +1 -1      ports/science/mpb/Makefile
  1.62      +3 -3      ports/science/mpqc/Makefile
  1.18      +2 -2      ports/science/ncs/Makefile
  1.26      +10 -10    ports/science/psi3/Makefile
  1.31      +1 -1      ports/science/py-scipy/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Don Lewis freebsd_committer freebsd_triage 2013-10-21 22:40:20 UTC
State Changed
From-To: open->closed

Fixed by maho on Tue, 22 Nov 2011 11:14:24 +0000 (UTC).