NetBSD Problem Report #38371

From cheusov@tut.by  Sat Apr  5 16:23:43 2008
Return-Path: <cheusov@tut.by>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 5457263BBD5
	for <gnats-bugs@gnats.netbsd.org>; Sat,  5 Apr 2008 16:23:43 +0000 (UTC)
Message-Id: <s93wsncxoc9.fsf@chen.chizhovka.net>
Date: Sat, 05 Apr 2008 19:23:34 +0300
From: cheusov@tut.by
Reply-To:
To: gnats-bugs@gnats.NetBSD.org
Subject: building math/lapack hangs on Linux (unfinite loop)
X-Send-Pr-Version: 3.95

>Number:         38371
>Category:       pkg
>Synopsis:       building math/lapack hangs on Linux (unfinite loop)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tnn
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 05 16:25:00 +0000 2008
>Closed-Date:    Tue Oct 20 14:01:56 +0000 2009
>Last-Modified:  Tue Oct 20 14:05:01 +0000 2009
>Originator:     cheusov@tut.by
>Release:        NetBSD 4.0_STABLE
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 4.0_STABLE NetBSD 4.0_STABLE (GENERIC) #2: Tue Dec 25 17:42:38 EET 2007 cheusov@chen.chizhovka.net:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
building math/lapack hangs on Linux (It look like an infinite loop).
testdlamch application eats tons of CPU.

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND 
 3246 root      25   0  1688  348  268 R   98  0.0 920:48.01 testdlamch 

>How-To-Repeat:

>Fix:

Unknown
>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sun, 06 Apr 2008 00:32:27 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Tobias Nygren <tnn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38371 CVS commit: pkgsrc
Date: Mon, 26 May 2008 22:25:25 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tnn
 Date:		Mon May 26 22:25:25 UTC 2008

 Modified Files:
 	pkgsrc/devel/ldapsdk: Makefile
 	pkgsrc/emulators/xm7: Makefile
 	pkgsrc/math/lapack: Makefile
 	pkgsrc/net/netsaint-plugin-snmp: Makefile
 	pkgsrc/net/netsaint-plugins: Makefile

 Log Message:
 Mark some packages as NOT_FOR_BULK_PLATFORM= Linux-*-*
 Addresses PR pkg/38368 and PR pkg/38371


 To generate a diff of this commit:
 cvs rdiff -r1.29 -r1.30 pkgsrc/devel/ldapsdk/Makefile
 cvs rdiff -r1.23 -r1.24 pkgsrc/emulators/xm7/Makefile
 cvs rdiff -r1.24 -r1.25 pkgsrc/math/lapack/Makefile
 cvs rdiff -r1.17 -r1.18 pkgsrc/net/netsaint-plugin-snmp/Makefile
 cvs rdiff -r1.31 -r1.32 pkgsrc/net/netsaint-plugins/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Aleksey Cheusov <cheusov@tut.by>
To: tnn@netbsd.org, obache@NetBSD.org, adam@NetBSD.org, gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: Re: pkg/38371 building math/lapack hangs on Linux (unfinite loop)
Date: Fri, 16 Oct 2009 01:14:53 +0300

 First of all, I'd like to say that this problem is not specific to Linux
 and is reproducible on other OSes and non-gcc compilers too.

 This problems is caused by incorrect optimization flags passed to
 fortran compiler for dlamch.f and slamch.f source files.

 In upstream these files are compiled without optimization and this is
 correct. The error is introduced by pkgsrc's buggy patches/patch-ad
 where ${NOOPT} is removed.

 The following patch solves the problem.
 Also it makes sense to explicitely
 set NOOPT to -O0 or something similar.

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/math/lapack/Makefile,v
 retrieving revision 1.27
 diff -u -r1.27 Makefile
 --- Makefile	22 Feb 2009 14:15:28 -0000	1.27
 +++ Makefile	15 Oct 2009 22:15:42 -0000
 @@ -13,7 +13,6 @@

  PKG_INSTALLATION_TYPES=	overwrite pkgviews
  PKG_DESTDIR_SUPPORT=	user-destdir
 -NOT_FOR_BULK_PLATFORM=	Linux-*-*

  USE_LANGUAGES=		c fortran
  USE_LIBTOOL=		YES
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/math/lapack/distinfo,v
 retrieving revision 1.11
 diff -u -r1.11 distinfo
 --- distinfo	12 Aug 2008 21:32:04 -0000	1.11
 +++ distinfo	15 Oct 2009 22:15:42 -0000
 @@ -6,4 +6,4 @@
  SHA1 (patch-aa) = 75671f2cc3233241f03ecab5a5d79cb505eece15
  SHA1 (patch-ab) = fd5989eaafc622f29284759f538ccc0f11dfe624
  SHA1 (patch-ac) = 649f7e40142936af49c8c9dbec376bdd1a11b05a
 -SHA1 (patch-ad) = e727bd3e83351f03c3a6cf2b8d5f33d5cbbc37da
 +SHA1 (patch-ad) = 52e3974be46c9dec983d2b56d769efe3d7d3eda5
 Index: patches/patch-ad
 ===================================================================
 RCS file: /cvsroot/pkgsrc/math/lapack/patches/patch-ad,v
 retrieving revision 1.1
 diff -u -r1.1 patch-ad
 --- patches/patch-ad	10 Dec 2007 17:50:31 -0000	1.1
 +++ patches/patch-ad	15 Oct 2009 22:15:42 -0000
 @@ -1,14 +1,17 @@
 -$NetBSD: patch-ad,v 1.1 2007/12/10 17:50:31 adam Exp $
 -
 ---- INSTALL/Makefile.orig	2007-11-22 18:51:41.000000000 +0100
 -+++ INSTALL/Makefile
 -@@ -29,7 +29,6 @@ testversion: ilaver.o LAPACK_version.o
 +--- /tmp/obj_pkgsrc/math/lapack/work/lapack-lite-3.1.1/INSTALL/Makefile.orig	2007-02-26 20:19:47.000000000 +0200
 ++++ /tmp/obj_pkgsrc/math/lapack/work/lapack-lite-3.1.1/INSTALL/Makefile	2009-10-16 00:59:42.534270840 +0300
 +@@ -29,7 +29,10 @@
   clean:
   	rm -f *.o

  -slamch.o: slamch.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
  -dlamch.o: dlamch.f ; $(FORTRAN) $(NOOPT) -c $< -o $@
 - 
 +-
  -.f.o: ; $(FORTRAN) $(OPTS) -c $< -o $@
 ++slamch.o: slamch.f
 ++	${LIBTOOL} --mode=compile --tag=CC $(FC) $(NOOPT) -c $< -o $@
 ++dlamch.o: dlamch.f
 ++	${LIBTOOL} --mode=compile --tag=CC $(FC) $(NOOPT) -c $< -o $@
 ++ 
  +.f.o:
  +	${LIBTOOL} --mode=compile --tag=CC ${FC} ${FFLAGS} -c $<

 -- 
 Best regards, Aleksey Cheusov.

Responsible-Changed-From-To: adam->tnn
Responsible-Changed-By: tnn@NetBSD.org
Responsible-Changed-When: Tue, 20 Oct 2009 13:49:01 +0000
Responsible-Changed-Why:
take


State-Changed-From-To: open->closed
State-Changed-By: tnn@NetBSD.org
State-Changed-When: Tue, 20 Oct 2009 14:01:56 +0000
State-Changed-Why:
I committed your fix. Many thanks for tracking down this annoying
bug!


From: Tobias Nygren <tnn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38371 CVS commit: pkgsrc/math/lapack
Date: Tue, 20 Oct 2009 14:00:23 +0000

 Module Name:	pkgsrc
 Committed By:	tnn
 Date:		Tue Oct 20 14:00:23 UTC 2009

 Modified Files:
 	pkgsrc/math/lapack: Makefile distinfo
 	pkgsrc/math/lapack/patches: patch-ad

 Log Message:
 patch-ad: Don't remove the $(NOOPT) for slamch.f and dlamch.f
 Was probably done unintentionally and caused infinite loops on some platforms.
 Patch from Aleksey Cheusov in PR pkg/38371.


 To generate a diff of this commit:
 cvs rdiff -u -r1.27 -r1.28 pkgsrc/math/lapack/Makefile
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/math/lapack/distinfo
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/math/lapack/patches/patch-ad

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.