From owner-freebsd-ports@FreeBSD.ORG Thu Oct 24 11:43:35 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4BFCC4C4; Thu, 24 Oct 2013 11:43:35 +0000 (UTC) (envelope-from 1wkmmr@gmail.com) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1091F271E; Thu, 24 Oct 2013 11:43:35 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kl14so2961012pab.11 for ; Thu, 24 Oct 2013 04:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=kdOa+4YaNGXtQzDeVbrlz+zX7S4q/IF8BZmJM+bOpTk=; b=HTR+Isdg3zURMXPOM7jaJijJylZCD5pB1yBHvWlA10dlaQpyasksqntLLoeARVl2aG EU3v//7OlZpSCLWpsDpR/8s5aRPwx7y/JMSrSbXiDc62do8kR+ps8ELp0ud6eLZjIfb6 hWPPb0aurHpkxQLN2pzbM2EgVw2Rc/lqLMaEZz5UfAvitZYlhhbbG6JGRqYVPFpQ10oX eq035Pe/jzy19cGB1ALJIJemQ4sr9g+m4Zvym0s+ZfoSmytkb6aYh5y/tvClBrRFTeJe 99wOi1r4ONaSdgk0MHsUSNLkEbnqs82J2PTyG5zSCdB9xoIBaDBw7gco2D/XwGdYNsmY gLog== X-Received: by 10.68.103.34 with SMTP id ft2mr2393178pbb.176.1382615014610; Thu, 24 Oct 2013 04:43:34 -0700 (PDT) Received: from [192.168.0.103] (tf-bsp02.eng.niigata-u.ac.jp. [133.35.85.2]) by mx.google.com with ESMTPSA id q4sm2081242pba.12.2013.10.24.04.43.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Oct 2013 04:43:33 -0700 (PDT) Message-ID: <526907E1.6010207@gmail.com> Date: Thu, 24 Oct 2013 20:43:29 +0900 From: Mamoru Iwaki <1wkmmr@gmail.com> User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Max Brazhnikov , freebsd-ports@freebsd.org Subject: Re: [math/scilab] configuration failure by error in version check of hdf5 References: <201310222319.r9MNJtYs078148@gw.catspoiler.org> <4269055.QsbE8oRuxU@mercury.ph.man.ac.uk> In-Reply-To: <4269055.QsbE8oRuxU@mercury.ph.man.ac.uk> Content-Type: multipart/mixed; boundary="------------070104080201020509010600" Cc: ports@freebsd.org, Don Lewis , iwaki@eng.niigata-u.ac.jp X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 11:43:35 -0000 This is a multi-part message in MIME format. --------------070104080201020509010600 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit (2013/10/23 22:10), Max Brazhnikov wrote: > On Tue, 22 Oct 2013 16:19:55 -0700 Don Lewis wrote: >> On 9 Oct, Mamoru Iwaki wrote: >>> Hi, >>> >>> Re: math/scilab (Revision 327746) >>> >>> I have failed to configure this port in compilation stage these days. >>> It is caused by an error in version check code for hdf5. Because the >>> code writen in Java uses String.compareTo() for numeric comparision, >>> "1.8.10" is not recognized as a newer one than "1.8.4". >>> Could somebody correct this easy bug? >> >> Scilab 5.4.1 is out now, so the port should probably be updated. This >> version of scilab removed the version check for hdf5. >> >> This is the patch that I'm using with the current port. Just drop it in >> the files directory, run "make clean", and then rebuild. >> >> --- configure.orig 2013-10-09 00:04:19.000000000 -0700 >> +++ configure 2013-10-09 10:41:39.000000000 -0700 >> @@ -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); >> } > > I've committed this patch, thanks! > > Max > Thanks, but the committed patch looks different from Don's original patch. Unfortunately, the committed patch still causes version check error in configuration stage, and the patch does not work as expected. We can find two very similar conftest codes around there. The original patch fixed the bug around line 12226 as above, howver the comitted one did around line 12281. I think the conftest around line 12226 (or both conftests around lines 12226 and ass81) should be corrected. The attached patch could be a candidate to correct both conftests. Cheers -- ----- Mamoru Iwaki Japan --------------070104080201020509010600 Content-Type: text/plain; charset=Shift_JIS; name="patch-configure" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-configure" --- ./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 { 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); } --------------070104080201020509010600--