NetBSD Problem Report #35064

From kre@munnari.OZ.AU  Fri Nov 17 14:39:07 2006
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id E854263BAFE
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 17 Nov 2006 14:39:06 +0000 (UTC)
Message-Id: <200611171439.kAHEd3P6027808@jade.coe.psu.ac.th>
Date: Fri, 17 Nov 2006 21:39:03 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@NetBSD.org
Subject: sysutils/apcupsd fails to configure (at build time) (+FIX)
X-Send-Pr-Version: 3.95

>Number:         35064
>Category:       pkg
>Synopsis:       sysutils/apcupsd fails to configure (at build time) (+FIX)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bouyer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 17 14:40:00 +0000 2006
>Closed-Date:    Fri Nov 17 19:52:54 +0000 2006
>Last-Modified:  Fri Nov 17 20:40:00 +0000 2006
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15   (pkgsrc current as of 6-8 hours ago)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 kre@jade.coe.psu.ac.th:/usr/obj/current/kernels/JADE_ASUS i386
Architecture: i386
Machine: i386
>Description:
	First, I am building using pkg_comp with libkver and
	NetNSD 3.0 (RELEASE) sets installed.

	Building sysutils/apcupsd fails at the configure stage,
	complaining that the C compiler cannot create executables

>How-To-Repeat:
	pkg_comp build sysutils/apcupsd

		I doubt that pkg_comp is related to this problem, but
		the use of an uppatched/uupdated NetBSD 3.0 system
		as the (apparent) base system might be (in particular,
		it has gcc 3.3.3)

	What I see is ...


=> Checking for portability problems in extracted files
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for true... /pkg_comp/obj/pkgsrc/sysutils/apcupsd/default/.tools/bin/true
checking for false... /pkg_comp/obj/pkgsrc/sysutils/apcupsd/default/.tools/bin/false
checking build system type... i386-unknown-netbsdelf3.0
checking host system type... i386--netbsdelf
checking for i386--netbsdelf-gcc... cc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
*** Error code 77

Stop.
make: stopped in /usr/pkgsrc/sysutils/apcupsd
WARNING: *** Please consider adding USE_LANGUAGES+=c to the package Makefile.
*** Error code 1

	Checking the (relevant part of) config.log, I see ...

configure:2422: checking for C compiler version
configure:2429: cc --version >&5
configure:2432: $? = 1
configure:2439: cc -v >&5
configure:2442: $? = 1
configure:2449: cc -V >&5
configure:2452: $? = 1
configure:2475: checking for C compiler default output file name
configure:2502: cc -O2 -I/usr/include -I/usr/include -L/usr/lib -Wl,-R/usr/lib -
Wl,-R/usr/pkg/lib conftest.c  >&5
configure:2505: $? = 1
configure: failed program was:

	The "failed program" contents don't seem to be relevant (it was
	about as close to the canonical empty C program as it is possible
	to write with current rules for what C programs must contain...)

	I suspect that the problem is as suggested by the WARNING
	and that there simply is no available C compiler in the
	build envronment (there is certainly no cc nor gcc nor netbsd-elf-gcc
	noe anything else that might plausibly be a C compiled in the
	.tools directory).


>Fix:

Add
	USE_LANGUAGES+=c
as the error messages says (warning).   While that might possibly not
seem to be required for apcupsd itself (a USE_LANGUAGES+=c++ line exists
alreay) it does seem necessary to get past the configure stage.

In any case, with this one line addition, the package builds fine.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->bouyer
Responsible-Changed-By: obache@netbsd.org
Responsible-Changed-When: Fri, 17 Nov 2006 14:58:14 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: open->closed
State-Changed-By: bouyer@netbsd.org
State-Changed-When: Fri, 17 Nov 2006 19:52:54 +0000
State-Changed-Why:
I added 'c' to USE_LANGUAGES; this should fix the problem.


From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/35064 CVS commit: pkgsrc/sysutils/apcupsd
Date: Fri, 17 Nov 2006 19:51:20 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	bouyer
 Date:		Fri Nov 17 19:51:20 UTC 2006

 Modified Files:
 	pkgsrc/sysutils/apcupsd: Makefile

 Log Message:
 Change 'USE_LANGUAGES+= c++' to 'USE_LANGUAGES= c c++'. It seems that
 'c' isn't in USE_LANGUAGES by default, and this cause the configure
 script to fail (I still don't know why it works for me).
 Pointed out by Martti Kuparinen in private mail, and Robert Elz in
 PR pkg/35064.


 To generate a diff of this commit:
 cvs rdiff -r1.45 -r1.46 pkgsrc/sysutils/apcupsd/Makefile

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

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/35064 CVS commit: pkgsrc/sysutils/apcupsd
Date: Fri, 17 Nov 2006 21:11:14 +0100

 On Fri, Nov 17, 2006 at 07:55:02PM +0000, Manuel Bouyer wrote:
 >  Change 'USE_LANGUAGES+= c++' to 'USE_LANGUAGES= c c++'. It seems that
 >  'c' isn't in USE_LANGUAGES by default, and this cause the configure
 >  script to fail (I still don't know why it works for me).

 It is, but you haven't included bsd.prefs.mk at that point.

 Joerg

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