From truckman@FreeBSD.org  Mon Mar 25 07:01:54 2013
Return-Path: <truckman@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 7AB728E3
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 25 Mar 2013 07:01:54 +0000 (UTC)
	(envelope-from truckman@FreeBSD.org)
Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242])
	by mx1.freebsd.org (Postfix) with ESMTP id 3EB20F55
	for <FreeBSD-gnats-submit@FreeBSD.org>; Mon, 25 Mar 2013 07:01:53 +0000 (UTC)
Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2])
	by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id r2P6bICb038898
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 24 Mar 2013 22:37:18 -0800 (PST)
	(envelope-from truckman@FreeBSD.org)
Received: from mousie.catspoiler.org (localhost.catspoiler.org [127.0.0.1])
	by mousie.catspoiler.org (8.14.5/8.14.5) with ESMTP id r2P6bIrK082849
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 24 Mar 2013 23:37:18 -0700 (PDT)
	(envelope-from truckman@FreeBSD.org)
Received: (from dl@localhost)
	by mousie.catspoiler.org (8.14.5/8.14.5/Submit) id r2P6bIlT082848;
	Sun, 24 Mar 2013 23:37:18 -0700 (PDT)
	(envelope-from truckman@FreeBSD.org)
Message-Id: <201303250637.r2P6bIlT082848@mousie.catspoiler.org>
Date: Sun, 24 Mar 2013 23:37:18 -0700 (PDT)
From: Don Lewis <truckman@FreeBSD.org>
Reply-To: Don Lewis <truckman@FreeBSD.org>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:
Subject: [patch] math/scilab port build fails configuration step
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         177364
>Category:       ports
>Synopsis:       [patch] math/scilab port build fails configuration step
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 25 07:10:02 UTC 2013
>Closed-Date:    Thu Oct 24 16:52:25 UTC 2013
>Last-Modified:  Thu Oct 24 16:52:25 UTC 2013
>Originator:     Don Lewis
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
FreeBSD project
>Environment:
System: FreeBSD scratch.catspoiler.org 10.0-CURRENT FreeBSD 10.0-CURRENT #23 r248434: Sun Mar 17 14:56:39 PDT 2013     dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB  i386


>Description:
	When attempting to build the math/scilab port, if fails the
	configuration step because it doesn't think it can find the
	umfpack library even though suitesparse-4.0.2_1 is installed.

checking for suitesparse/umfpack.h... yes
checking for suitesparse/umfpack.h... (cached) yes
checking for umf_divcomplex in /usr/local/lib... checking for amd_info in -lamd... yes
checking for umf_divcomplex in -lumfpack -lamd -lcholmod -lcolamd -lalapack -lcblas -lcblas -lf77blas -latlas... no
configure: error: libumfpack : Library missing. (Cannot find umf_divcomplex). Check if libumfpack is installed and if the version is correct (also called lib suitesparse)
===>  Script "configure" failed unexpectedly.

	The problem is that the the symbol SuiteSparse_time is undefined
	because it is in a library that is not linked in.

	The relevant section of config.log:

configure:22350: checking for umf_divcomplex in -lumfpack -lamd -lcholmod -lcola
md -lalapack -lcblas -lcblas -lf77blas -latlas
configure:22383: gcc46 -o conftest -O2 -pipe -march=athlon64 -Wl,-rpath=/usr/loc
al/lib/gcc46 -fno-strict-aliasing -DNDEBUG -I$(top_srcdir)/modules/core/includes
/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/inc
ludes/ -I/usr/local/include  -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc46 co
nftest.c -lumfpack -lamd -lcholmod -lcolamd -lalapack -lcblas -lcblas -lf77blas
-latlas  -lcblas -lf77blas -latlas -L/usr/local/lib -lm -pthread  -lcurses  -lm
>How-To-Repeat:
	Attempt to build the math/scilab port.
>Fix:

	The following patch fixes the problem for me:


Index: Makefile
===================================================================
--- Makefile	(revision 314476)
+++ Makefile	(working copy)
@@ -202,7 +202,7 @@
 post-patch:
 	@# Configure fixes
 	@${REINPLACE_CMD} -e 's|-ldl | |' ${WRKSRC}/configure
-	@${REINPLACE_CMD} -e 's|-lumfpack|-lumfpack -lamd -lcholmod -lcolamd $$LAPACK_LIBS $$BLAS_LIBS|g' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|-lumfpack|-lumfpack -lsuitesparseconfig -lamd -lcholmod -lcolamd $$LAPACK_LIBS $$BLAS_LIBS|g' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|TCLTK_LIBS=" -ldl"|TCLTK_LIBS=" "|' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|"x=" ==|"x" =|g' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e 's|"x" ==|"x" =|g' ${WRKSRC}/configure

>Release-Note:
>Audit-Trail:

From: Don Lewis <truckman@FreeBSD.org>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: freebsd-ports-bugs@FreeBSD.org
Subject: Re: ports/177364: [patch] math/scilab port build fails
 configuration step
Date: Sun, 31 Mar 2013 16:31:35 -0700 (PDT)

 This problem only occurs if the UMFPACK option is enabled.  UMFPACK is
 not enabled by default, which is why the pointyhat build doesn't fail.
 

From: Don Lewis <truckman@FreeBSD.org>
To: undisclosed-recipients:;
Cc:  
Subject: Re: ports/177364: [patch] math/scilab port build fails
 configuration step
Date: Sun, 31 Mar 2013 17:35:24 -0700 (PDT)

 To: bug-followup@FreeBSD.org, truckman@FreeBSD.org
 MIME-Version: 1.0
 Content-Type: TEXT/plain; charset=us-ascii
 
 This problem only occurs if the UMFPACK option is enabled.  UMFPACK is
 not enabled by default, which is why the pointyhat build doesn't fail.

From: Don Lewis <truckman@FreeBSD.org>
To: bug-followup@FreeBSD.org, truckman@FreeBSD.org
Cc:  
Subject: Re: ports/177364: [patch] math/scilab port build fails
 configuration step
Date: Sun, 31 Mar 2013 17:35:24 -0700 (PDT)

 This problem only occurs if the UMFPACK option is enabled.  UMFPACK is
 not enabled by default, which is why the pointyhat build doesn't fail.
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/177364: commit references a PR
Date: Thu, 24 Oct 2013 16:45:00 +0000 (UTC)

 Author: makc
 Date: Thu Oct 24 16:44:52 2013
 New Revision: 331500
 URL: http://svnweb.freebsd.org/changeset/ports/331500
 
 Log:
   - Fix build with UMFPACK [1]
   - Update patch to really fix configure after hdf5-18 update [2]
   
   PR:		ports/177364 [1]
   Submitted by:	truckman [1]
   Submitted by:	Mamoru Iwaki <1wkmmr at gmail.com> via ports maillist [2]
 
 Modified:
   head/math/scilab/Makefile
   head/math/scilab/files/patch-configure
 
 Modified: head/math/scilab/Makefile
 ==============================================================================
 --- head/math/scilab/Makefile	Thu Oct 24 16:41:28 2013	(r331499)
 +++ head/math/scilab/Makefile	Thu Oct 24 16:44:52 2013	(r331500)
 @@ -201,7 +201,7 @@ post-extract:
  post-patch:
  	@# Configure fixes
  	@${REINPLACE_CMD} -e 's|-ldl | |' ${WRKSRC}/configure
 -	@${REINPLACE_CMD} -e 's|-lumfpack|-lumfpack -lamd -lcholmod -lcolamd $$LAPACK_LIBS $$BLAS_LIBS|g' ${WRKSRC}/configure
 +	@${REINPLACE_CMD} -e 's|-lumfpack|-lumfpack -lsuitesparseconfig -lamd -lcholmod -lcolamd $$LAPACK_LIBS $$BLAS_LIBS|g' ${WRKSRC}/configure
  	@${REINPLACE_CMD} -e 's|TCLTK_LIBS=" -ldl"|TCLTK_LIBS=" "|' ${WRKSRC}/configure
  	@${REINPLACE_CMD} -e 's|"x=" ==|"x" =|g' ${WRKSRC}/configure
  	@${REINPLACE_CMD} -e 's|"x" ==|"x" =|g' ${WRKSRC}/configure
 
 Modified: head/math/scilab/files/patch-configure
 ==============================================================================
 --- head/math/scilab/files/patch-configure	Thu Oct 24 16:41:28 2013	(r331499)
 +++ head/math/scilab/files/patch-configure	Thu Oct 24 16:44:52 2013	(r331500)
 @@ -1,5 +1,23 @@
  --- ./configure.orig	2011-07-20 08:15:42.000000000 +0000
  +++ ./configure	2013-10-23 11:59:48.722499060 +0000
 +@@ -12226,14 +12226,15 @@
 + 
 + public class conftest {
 +     public static void main(String[] argv) {
 +-        String minVersion="1.8.4";
 ++        int minVersion=10804;
 +                             int[] vers = new int[3];
 +                 try { H5.H5get_libversion(vers); }
 +                 catch (Throwable ex) {System.exit(-1);}
 +                 String ver = vers[0] + "."+ vers[1] +"."+vers[2];
 ++                int Version = 10000*vers[0] + 100*vers[1] + vers[2];
 + 
 +                             System.out.println(ver);
 +-                                  if (minVersion.compareTo(ver) > 0) {
 ++                                  if (minVersion > Version) {
 +                                    System.exit(-1);
 +                                 }
 + 
  @@ -12281,14 +12281,15 @@
   
   public class conftest {
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: makc 
State-Changed-When: Thu Oct 24 16:52:24 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177364 
>Unformatted:
 >&5
 /usr/local/lib/libumfpack.so: undefined reference to `SuiteSparse_time'
 collect2: ld returned 1 exit status
 configure:22383: $? = 1
 configure: failed program was:
 | /* confdefs.h */
 | #define PACKAGE_NAME "Scilab"
 | #define PACKAGE_TARNAME "scilab"
 | #define PACKAGE_VERSION "5"
 | #define PACKAGE_STRING "Scilab 5"
 | #define PACKAGE_BUGREPORT "http://bugzilla.scilab.org/"
 | #define PACKAGE_URL ""
 | #define O_LARGEFILE 0
 | #define INSTALLPREFIX "/usr/local"
 | #define STDC_HEADERS 1
 | #define INSTALLPREFIX "/usr/local"
 | #define STDC_HEADERS 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_MEMORY_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_UNISTD_H 1
 | #define INSTALLPREFIX "/usr/local"
 | #define PACKAGE "scilab"
 | #define VERSION "5"
 | #define G95_FORTRAN /**/
 | #define SIZEOF_INT 4
 | #define SIZEOF_LONG 4
 | #define WTU /**/
 | #define CNAME(name1,name2) name1##name2
 | #define C2F(name) name##_
 | #define F2C(name) name##_
 | #define HAVE_LIBHDF5 1
 | #define WITH_HDF5 /**/
 | #define WITH_HDF5 /**/
 | #define WITH_XCOS /**/
 | #define HAVE_CLOCK_GETTIME 1
 | #define WITH_GUI /**/
 | #define HAVE_SLEEP 1
 | #define HAVE_USLEEP 1
 | #define HAVE_DUP2 1
 | #define HAVE_GETCWD 1
 | #define HAVE_GETPAGESIZE 1
 | #define HAVE_GETPASS 1
 | #define HAVE_RMDIR 1
 | #define HAVE_GETWD 1
 | #define HAVE_REGCOMP 1
 | #define HAVE_ATEXIT 1
 | #define HAVE_PUTENV 1
 | #define HAVE_SETENV 1
 | #define HAVE_BZERO 1
 | #define HAVE_MEMMOVE 1
 | #define HAVE_MEMSET 1
 | #define HAVE_STRCASECMP 1
 | #define HAVE_STRERROR 1
 | #define HAVE_STRCHR 1
 | #define HAVE_STRDUP 1
 | #define HAVE_STRPBRK 1
 | #define HAVE_STRRCHR 1
 | #define HAVE_STRSTR 1
 | #define HAVE_STRTOL 1
 | #define HAVE_SELECT 1
 | #define HAVE_ENDPWENT 1
 | #define HAVE_GETHOSTBYADDR 1
 | #define HAVE_GETHOSTBYNAME 1
 | #define HAVE_GETHOSTNAME 1
 | #define HAVE_GETTIMEOFDAY 1
 | #define HAVE_ISASCII 1
 | #define HAVE_ISWPRINT 1
 | #define HAVE_MKDIR 1
 | #define HAVE_MUNMAP 1
 | #define HAVE_STRSIGNAL 1
 | #define HAVE_POW 1
 | #define HAVE_SQRT 1
 | #define HAVE_FINITE 1
 | #define HAVE_FLOOR 1
 | #define HAVE_SOCKET 1
 | #define HAVE_UNAME 1
 | #define HAVE_SETLOCALE 1
 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
 | #define HAVE_LIMITS_H 1
 | #define HAVE_FCNTL_H 1
 | #define HAVE_FLOAT_H 1
 | #define HAVE_LIBINTL_H 1
 | #define HAVE_LOCALE_H 1
 | #define HAVE_NETDB_H 1
 | #define HAVE_NETINET_IN_H 1
 | #define HAVE_NLIST_H 1
 | #define HAVE_STDDEF_H 1
 | #define HAVE_SYS_FILE_H 1
 | #define HAVE_SYS_IOCTL_H 1
 | #define HAVE_SYS_PARAM_H 1
 | #define HAVE_SYS_SOCKET_H 1
 | #define HAVE_SYS_TIME_H 1
 | #define HAVE_SYS_TIMEB_H 1
 | #define HAVE_SYS_UTSNAME_H 1
 | #define HAVE_SYSLOG_H 1
 | #define HAVE_TERM_H 1
 | #define HAVE_TERMCAP_H 1
 | #define HAVE_TERMIOS_H 1
 | #define HAVE_WCHAR_H 1
 | #define HAVE_WCTYPE_H 1
 | #define HAVE_TIME_H 1
 | #define HAVE_DIRENT_H 1
 | #define TIME_WITH_SYS_TIME 1
 | #define HAVE_SYS_WAIT_H 1
 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
 | #define HAVE_STRUCT_STAT_ST_RDEV 1
 | #define HAVE_ICONV 1
 | #define ENABLE_NLS 1
 | #define HAVE_GETTEXT 1
 | #define HAVE_DCGETTEXT 1
 | #define RETSIGTYPE void
 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1
 | #define HAVE_ST_BLOCKS 1
 | #define HAVE_LIBCURSES 1
 | #define HAVE_NCURSES_H 1
 | #define HAVE_CURSES_H 1
 | #define HAVE_TERMCAP /**/
 | #define HAVE_LIBDL 1
 | #define WITH_FFTW /**/
 | #define HAVE_OMP_H 1
 | #define HAVE_LIBXML2 1
 | #define LIBXML_FLAGS "-I/usr/local/include/libxml2 -I/usr/local/include"
 | #define LIBXML_LIBS "-L/usr/local/lib -lxml2 -lz -L/usr/local/lib -liconv -lm"
 | /* end confdefs.h.  */
 | 
 | /* Override any GCC internal prototype to avoid an error.
 |    Use char because int might match the return type of a GCC
 |    builtin and then its argument prototype would still apply.  */
 | #ifdef __cplusplus
 | extern "C"
 | #endif
 | char umf_divcomplex ();
 | #ifdef F77_DUMMY_MAIN
 | 
 | #  ifdef __cplusplus
 |      extern "C"
 | #  endif
 |    int F77_DUMMY_MAIN() { return 1; }
 | 
 | #endif
 | int
 | main ()
 | {
 | return umf_divcomplex ();
 |   ;
 |   return 0;
 | }
 configure:22392: result: no
 configure:22397: error: libumfpack : Library missing. (Cannot find umf_divcomple
 x). Check if libumfpack is installed and if the version is correct (also called
 lib suitesparse)
 
 
