Date: Sun, 20 Nov 2011 14:13:08 -0800 (PST) From: Don Lewis <truckman@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: maho@FreeBSD.org, bf@FreeBSD.org Subject: ports/162706: math/suitesparse port does not properly detect or link atlas Message-ID: <201111202213.pAKMD8n5012713@mousie.catspoiler.org> Resent-Message-ID: <201111202220.pAKMKBpN003589@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 162706 >Category: ports >Synopsis: math/suitesparse port does not properly detect or link atlas >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 20 22:20:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Don Lewis >Release: FreeBSD 9.9-CURRENT i386 >Organization: none >Environment: System: FreeBSD scratch.catspoiler.org 9.9-CURRENT FreeBSD 10.0-CURRENT #64: Mon Nov 14 15:09:48 PST 2011 dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB i386 atlas-3.8.4,1 >Description: The math/suitesparse port looks for and tries to link to libatlas_r.so, which is no longer installed by the math/atlas port. >How-To-Repeat: >Fix: According to math/atlas/pkg-descr, it is no longer necessary to explictly link with -latlas. The following patch works for me: 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" 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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111202213.pAKMD8n5012713>