From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 13 14:40:03 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64DED1065674 for ; Tue, 13 Mar 2012 14:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 403F88FC17 for ; Tue, 13 Mar 2012 14:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2DEe3d4061676 for ; Tue, 13 Mar 2012 14:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2DEe3f3061675; Tue, 13 Mar 2012 14:40:03 GMT (envelope-from gnats) Resent-Date: Tue, 13 Mar 2012 14:40:03 GMT Resent-Message-Id: <201203131440.q2DEe3f3061675@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oliver Hartmann Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 871F1106566B for ; Tue, 13 Mar 2012 14:34:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 74DE08FC19 for ; Tue, 13 Mar 2012 14:34:43 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DEYh2x005642 for ; Tue, 13 Mar 2012 14:34:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q2DEYhtj005641; Tue, 13 Mar 2012 14:34:43 GMT (envelope-from nobody) Message-Id: <201203131434.q2DEYhtj005641@red.freebsd.org> Date: Tue, 13 Mar 2012 14:34:43 GMT From: Oliver Hartmann To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/166010: math/superlu: also build shared object instead of only the static archive X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 14:40:03 -0000 >Number: 166010 >Category: ports >Synopsis: math/superlu: also build shared object instead of only the static archive >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Mar 13 14:40:02 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Oliver Hartmann >Release: FreeBSD 9.0-STABLE/amd64, FreeBSD 10.0-CURRENT/amd64 >Organization: FU Berlin >Environment: >Description: Trying to do some ports (AMES stereopipeline, ASP) for FreeBSD ports, I ran into the issue that math/superlu isn't providing a suitable shared object to compile ASP against. It seems that Linux folks deal with teh problem providing the shared object, so I looked for a general solution on FreeBSD. Since I felt better having math/superlu building a shared object than fiddling around with the build environment provided by NASA's stereopipeline, I' like to provide hereby some patches. Please revise and merge them, if valuable. Regards, Oliver >How-To-Repeat: >Fix: Attached, you'll find a SHAR archive of the recent port. Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # . # ./Makefile # ./distinfo # ./pkg-descr # ./pkg-plist # ./files # ./files/patch-SRC+sp_coletree.c # ./files/patch-make.inc # ./files/patch-SRC-Makefile # echo c - . mkdir -p . > /dev/null 2>&1 echo x - ./Makefile sed 's/^X//' >./Makefile << '464ef7c6571951809b23e262cbe26e19' X# New ports collection makefile for: SuperLU X# Date created: 31 Oct 97 X# Whom: Pedro Giffuni X# X# $FreeBSD: ports/math/superlu/Makefile,v 1.42 2011/11/22 11:14:08 bf Exp $ X# X XPORTNAME= superlu XPORTREVISION= 3 XDISTVERSION= ${P_VERSION}.20060201 XCATEGORIES= math XMASTER_SITES= http://crd.lbl.gov/~xiaoye/SuperLU/ \ X http://crd.lbl.gov/~xiaoye/:doc XDISTNAME= ${PORTNAME}_${P_VERSION} X.ifndef NOPORTDOCS XDISTFILES= ${DISTNAME}${EXTRACT_SUFX} superlu_ug.pdf SLU_general.ps.gz:doc simax95.ps.gz:doc X.endif XDIST_SUBDIR= ${PORTNAME} XEXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} X XMAINTAINER= maho@FreeBSD.org XCOMMENT= A library of routines for performing sparse factorization X X.include X X.if exists(${LOCALBASE}/lib/libgoto2.so) XWITH_BLAS?= gotoblas X.elif exists(${LOCALBASE}/lib/libatlas.so) XWITH_BLAS?= atlas X.else XWITH_BLAS?= reference X.endif X X. if ${WITH_BLAS} == reference XLIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas XBLAS= -lblas X.elif ${WITH_BLAS} == gotoblas XLIB_DEPENDS+= goto2:${PORTSDIR}/math/gotoblas XBLAS= -lgoto2p X.elif ${WITH_BLAS} == atlas XLIB_DEPENDS+= atlas:${PORTSDIR}/math/atlas XBLAS= -lptf77blas X.endif X XUSE_FORTRAN= yes XUSE_LDCONFIG= yes X XP_VERSION= 3.0 XWRKSRC= ${WRKDIR}/SuperLU_${P_VERSION} XALL_TARGET= lib X XARCH2FIX= SRC/Makefile TESTING/MATGEN/Makefile CBLAS/Makefile make.inc \ X MAKE_INC/make.alpha MAKE_INC/make.inc X Xpre-build: X @${REINPLACE_CMD} -e 's+%%BLAS%%+-L${LOCALBASE}/lib ${BLAS}+ ; \ X s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \ X s+%%CFLAGS%%+${CFLAGS}+; \ X s+%%FFLAGS%%+${FFLAGS}+' \ X ${WRKSRC}/make.inc X.for fmk in ${ARCH2FIX} X @${REINPLACE_CMD} -e 's|^ARCH *.= ar|ARCMD = ar| ; \ X s|\$$(ARCH)|$$(ARCMD)|' ${WRKSRC}/${fmk} X.endfor X Xdo-install: X ${INSTALL_DATA} ${WRKSRC}/libsuperlu_${P_VERSION}.a \ X ${PREFIX}/lib/libsuperlu.a X ${INSTALL_DATA} ${WRKSRC}/libsuperlu_${P_VERSION}.so \ X ${PREFIX}/lib/libsuperlu.so.${PORTREVISION} X ${LN} -s ${PREFIX}/lib/libsuperlu.so.${PORTREVISION} \ X ${PREFIX}/lib/libsuperlu.so X @${MKDIR} ${PREFIX}/include/superlu X ${INSTALL_DATA} ${WRKSRC}/SRC/*.h ${PREFIX}/include/superlu X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/SLU_general.ps.gz ${DOCSDIR} X ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/simax95.ps.gz ${DOCSDIR} X ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/superlu_ug.pdf ${DOCSDIR} X.endif X Xregression-test: build X @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} testing ) X @(cd ${WRKSRC}/TESTING && ${CAT} *.out ) X X.include 464ef7c6571951809b23e262cbe26e19 echo x - ./distinfo sed 's/^X//' >./distinfo << 'aec8793adfd5b7c3f00e62ae41a09ac2' XSHA256 (superlu/superlu_3.0.tar.gz) = d0132a3a2fb6269dc8faa0b9ea9611764e8ca31265441f64cfc80485a86d5784 XSIZE (superlu/superlu_3.0.tar.gz) = 1134160 XSHA256 (superlu/superlu_ug.pdf) = 4657e60fb7832465b60e208613992d29b6bbd8110103bfe0f5cee0ab79b67766 XSIZE (superlu/superlu_ug.pdf) = 458405 XSHA256 (superlu/SLU_general.ps.gz) = 00d00cedfadd96a42014d22b30c0cc451a575d8d309774519068b11d4be1ebe5 XSIZE (superlu/SLU_general.ps.gz) = 89463 XSHA256 (superlu/simax95.ps.gz) = b7e7705a280336474a25b0a1aef57226d81ea0dc6f18728b7347cb1726f91d2a XSIZE (superlu/simax95.ps.gz) = 138096 aec8793adfd5b7c3f00e62ae41a09ac2 echo x - ./pkg-descr sed 's/^X//' >./pkg-descr << '0e313719ff012ceaf97a028d51caa8f5' X SuperLU (Version 3.0) X ===================== X XSuperLU is a general purpose library for the direct solution of large, Xsparse, nonsymmetric systems of linear equations on high performance Xmachines. The library is written in C and is callable from either C or XFortran. The library routines will perform an LU decomposition with Xpartial pivoting and triangular system solves through forward and back Xsubstitution. The LU factorization routines can handle non-square matrices Xbut the triangular solves are performed only for square matrices. The Xmatrix columns may be preordered (before factorization) either through Xlibrary or user supplied routines. This preordering for sparsity is Xcompletely separate from the factorization. Working precision iterative Xrefinement subroutines are provided for improved backward stability. XRoutines are also provided to equilibrate the system, estimate the Xcondition number, calculate the relative backward error, and estimate Xerror bounds for the refined solutions. X XWWW: http://crd.lbl.gov/~xiaoye/SuperLU/ X XDevelopers: Sherry Li X Jim Demmel X John Gilbert XNOTE: This library has to be linked with BLAS or a compatible library. 0e313719ff012ceaf97a028d51caa8f5 echo x - ./pkg-plist sed 's/^X//' >./pkg-plist << 'ef3e7f63841ae908ba397c2bef1fbad6' Xinclude/superlu/colamd.h Xinclude/superlu/old_colamd.h Xinclude/superlu/slu_Cnames.h Xinclude/superlu/slu_cdefs.h Xinclude/superlu/slu_dcomplex.h Xinclude/superlu/slu_ddefs.h Xinclude/superlu/slu_scomplex.h Xinclude/superlu/slu_sdefs.h Xinclude/superlu/slu_util.h Xinclude/superlu/slu_zdefs.h Xinclude/superlu/supermatrix.h Xlib/libsuperlu.a X@dirrm include/superlu X%%PORTDOCS%%%%DOCSDIR%%/SLU_general.ps.gz X%%PORTDOCS%%%%DOCSDIR%%/simax95.ps.gz X%%PORTDOCS%%%%DOCSDIR%%/superlu_ug.pdf X%%PORTDOCS%%@dirrm %%DOCSDIR%% ef3e7f63841ae908ba397c2bef1fbad6 echo c - ./files mkdir -p ./files > /dev/null 2>&1 echo x - ./files/patch-SRC+sp_coletree.c sed 's/^X//' >./files/patch-SRC+sp_coletree.c << 'e83dfe18c1d85c6574b6b73a9f0cc262' X--- SRC/sp_coletree.c.orig Fri Sep 26 08:22:05 2003 X+++ SRC/sp_coletree.c Thu Apr 1 20:29:10 2004 X@@ -2,6 +2,9 @@ X /* Elimination tree computation and layout routines */ X X #include X+#ifndef __STDC__ X+#include X+#endif X #include X #include "dsp_defs.h" X e83dfe18c1d85c6574b6b73a9f0cc262 echo x - ./files/patch-make.inc sed 's/^X//' >./files/patch-make.inc << '650cc8fcfb41dfc9614199c32fdf2980' X--- make.inc.orig 2006-01-02 00:52:00.000000000 +0100 X+++ make.inc 2012-03-13 14:59:15.000000000 +0100 X@@ -19,22 +19,23 @@ X # X TMGLIB = libtmglib.a X SUPERLULIB = libsuperlu_3.0.a X-BLASLIB = ../libblas.a X+SUPERLULIB_SHARED = libsuperlu_3.0.so X+BLASLIB = -L/usr/local/lib -lblas X X # X # The archiver and the flag(s) to use when building archive (library) X # If your system has no ranlib, set RANLIB = echo. X # X-ARCH = ar X+ARCMD = ar X ARCHFLAGS = cr X RANLIB = ranlib X X-CC = cc X-CFLAGS = -xO3 -xcg92 X-FORTRAN = f77 X-FFLAGS = -O X-LOADER = cc X-LOADOPTS = -xO3 X+CC ?= gcc46 X+CFLAGS ?= -O2 -pipe -O2 -fno-strict-aliasing -pipe -O3 -pipe -fno-strict-aliasing -march=native -Wl,-rpath=/usr/local/lib/gcc46 X+FORTRAN ?= gfortran46 X+FFLAGS ?= -O -Wl,-rpath=/usr/local/lib/gcc46 X+LOADER ?= gfortran46 X+LOADOPTS = X X # X # C preprocessor defs for compilation (-DNoChange, -DAdd_, or -DUpCase) 650cc8fcfb41dfc9614199c32fdf2980 echo x - ./files/patch-SRC-Makefile sed 's/^X//' >./files/patch-SRC-Makefile << '69c59906d11ae90b6b88c4e4f5f8dbd1' X--- SRC/Makefile.orig 2006-01-06 00:09:14.000000000 +0100 X+++ SRC/Makefile 2012-03-13 15:14:50.000000000 +0100 X@@ -89,28 +89,31 @@ X zcolumn_dfs.o zcolumn_bmod.o zpivotL.o zpruneL.o \ X zmemory.o zutil.o zmyblas2.o X X-all: single double complex complex16 X+all: single double complex complex16 shared X X single: $(SLUSRC) $(ALLAUX) $(LAAUX) $(SLASRC) $(SCLAUX) X- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \ X+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \ X $(SLUSRC) $(ALLAUX) $(LAAUX) $(SLASRC) $(SCLAUX) X $(RANLIB) ../$(SUPERLULIB) X X double: $(DLUSRC) $(ALLAUX) $(LAAUX) $(DLASRC) $(DZLAUX) X- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \ X+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \ X $(DLUSRC) $(ALLAUX) $(LAAUX) $(DLASRC) $(DZLAUX) X $(RANLIB) ../$(SUPERLULIB) X X complex: $(CLUSRC) $(ALLAUX) $(LAAUX) $(CLASRC) $(SCLAUX) X- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \ X+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \ X $(CLUSRC) $(ALLAUX) $(LAAUX) $(CLASRC) $(SCLAUX) X $(RANLIB) ../$(SUPERLULIB) X X complex16: $(ZLUSRC) $(ALLAUX) $(LAAUX) $(ZLASRC) $(DZLAUX) X- $(ARCH) $(ARCHFLAGS) ../$(SUPERLULIB) \ X+ $(ARCMD) $(ARCHFLAGS) ../$(SUPERLULIB) \ X $(ZLUSRC) $(ALLAUX) $(LAAUX) $(ZLASRC) $(DZLAUX) X $(RANLIB) ../$(SUPERLULIB) X X+shared: single double complex complex16 X+ $(CC) -shared -Wl,-soname=$(SUPERLULIB_SHARED) -o ../$(SUPERLULIB_SHARED) ../$(SUPERLULIB) X+ X X ################################## X # Do not optimize these routines # X@@ -125,3 +128,4 @@ X X clean: X rm -f *.o ../libsuperlu_3.0.a X+ rm -f *.o ../libsuperlu_3.0.so 69c59906d11ae90b6b88c4e4f5f8dbd1 exit >Release-Note: >Audit-Trail: >Unformatted: