NetBSD Problem Report #42506

From kre@munnari.OZ.AU  Wed Dec 23 16:53:52 2009
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 6682063C3A9
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 23 Dec 2009 16:53:52 +0000 (UTC)
Message-Id: <200912231652.nBNGqWpp010316@jade.coe.psu.ac.th>
Date: Wed, 23 Dec 2009 23:52:32 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: math/R-randomForest requires fortran but doesn't say so (+FIX)
X-Send-Pr-Version: 3.95

>Number:         42506
>Category:       pkg
>Synopsis:       math/R-randomForest requires fortran but doesn't say so (+FIX)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 23 16:55:01 +0000 2009
>Closed-Date:    Thu Dec 24 11:17:47 +0000 2009
>Last-Modified:  Thu Dec 24 11:25:01 +0000 2009
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   (pksrc current as of 2009-12-22)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 kre@jade.coe.psu.ac.th:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
	math/R-randomForest (R-randomForest-4.5.34) includes fortran
	source but doesn't sayit needs a fortran compiler

>How-To-Repeat:
	I use pkg_comp with libkver and NetBSD 4.0 release sets installed
	(with X11_TYPE=modular instead of thye x* sets).
	Of all of that, the relevant factor here is using pkg_comp with
	an almost empty sandbox to start - most people building math/R*
	packages are going to end up with f2c (or some other) fortran
	compiler installed, and then probably never see this problem.
	I start each compile with a nearly empty sandbox, nothing installed
	(almost) beyond standard NetBSD.

	Duplicate the above environment (no fortran compiler installed)
	and attempt to build math/R-randomForest -- expect to see:

cc -std=gnu99 -I/usr/pkg/lib/R/include  -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2    -fpic  -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -c rf.c -o rf.o
f77   -fPIC  -O -c rfsub.f -o rfsub.o
PKGSRC-WARNING: Something is trying to run the fortran compiler,
PKGSRC-WARNING: but it is not added to USE_LANGUAGES in the package Makefile.
*** Error code 1

Stop.
make: stopped in /pkg_comp/obj/pkgsrc/math/R-randomForest/4x/randomForest/src
ERROR: compilation failed for package 'randomForest'
* removing '/usr/pkg/lib/R/library/randomForest'
*** Error code 1

Stop.

>Fix:
	The following patch fixed it for me,   I am fairly sure that no
	revbump is needed for this one - this is a build time only problem.

Index: Makefile
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/math/R-randomForest/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	11 Dec 2009 19:45:46 -0000	1.2
+++ Makefile	23 Dec 2009 16:42:17 -0000
@@ -10,5 +10,7 @@
 R_PKGNAME=	randomForest
 R_PKGVER=	4.5-34

+USE_LANGUAGES+=	fortran
+
 .include "../../math/R/Makefile.extension"
 .include "../../mk/bsd.pkg.mk"

>Release-Note:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42506 CVS commit: pkgsrc/math/R-randomForest
Date: Wed, 23 Dec 2009 23:38:46 +0000

 Module Name:	pkgsrc
 Committed By:	joerg
 Date:		Wed Dec 23 23:38:46 UTC 2009

 Modified Files:
 	pkgsrc/math/R-randomForest: Makefile

 Log Message:
 Needs C and Fortran. From PR 42506.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/math/R-randomForest/Makefile

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

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 24 Dec 2009 11:17:47 +0000
State-Changed-Why:
Fixed by joerg.


From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/42506 CVS commit: pkgsrc/math/R-randomForest
Date: Thu, 24 Dec 2009 18:21:48 +0700

     Date:        Wed, 23 Dec 2009 23:40:05 +0000 (UTC)
     From:        Joerg Sonnenberger <joerg@NetBSD.org>
     Message-ID:  <20091223234005.51A3063C4E1@www.NetBSD.org>

   |  Needs C and Fortran. From PR 42506.

 That fixed it, thanks, please close the PR.

 kre

>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.