Subject: pkg/35937: converters/libiconv fails on Debian/Linux 2.4
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 03/06/2007 21:35:00
>Number:         35937
>Category:       pkg
>Synopsis:       converters/libiconv fails on Debian/Linux 2.4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 06 21:35:00 +0000 2007
>Originator:     Ulrich Habel
>Release:        Linux 2.4 (Debian Sarge)
Linux newton 2.4.27-3-686 #1 Tue Dec 5 21:03:54 UTC 2006 i686 GNU/Linux
converters/libiconv fails on Linux Debian Sarge with the following error:

checking for strip... strip
checking whether make sets $(MAKE)... (cached) yes
checking for i386-debian-linux-gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
*** Error code 77

config.log says:

Reading specs from /usr/pkg/gcc-2.95.3/lib/gcc-lib/i386-debian-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release) (NetBSD nb3)
configure:2309: $? = 0
configure:2311: gcc -V </dev/null >&5
gcc: invalid version number format

[] note: The real command line, after the pkgsrc wrapper, was:
/usr/pkgsrc/converters/libiconv/work/.gcc/bin/gcc -V -std=gnu99 -I/usr/pkgsrc/converters/libiconv/work/.buildlink/include -L/usr/pkgsrc/converters/libiconv/work/.buildlink/lib 
configure:2314: $? = 1
configure:2337: checking for C compiler default output file name
configure:2340: gcc -O2 -I/usr/pkg/include -I/usr/pkg/include -L/usr/pkg/gcc-2.95.3/lib/gcc-lib/i386-debian-linux/2.95.3 -Wl,-R/usr/pkg/gcc-2.95.3/lib/gcc-lib/i386-debian-linux/2.95.3 -L/usr/pkg/gcc-2.95.3/lib -Wl,-R/usr/pkg/gcc-2.95.3/lib -Wl,-R/usr/pkg/lib conftest.c  >&5
cc1: unknown C standard `gnu99'
Try to build converters/libiconv.
It seems that the gcc-2.95 on Sarge doesn't understand the option -c99/-gnu99 as C standard. I used this small patch to check if the current platform is Linux and avoid the term USE_LANGUAGES+= c99 c++. However, I am not sure if the c99 setting is needed on other platforms so I exclude them. The setting of USE_LANGUAGES+= c however is needed to build.

Here is the patch (unified):

--- Makefile.orig	2007-03-06 21:17:13.000000000 +0100
+++ Makefile	2007-03-06 21:17:32.000000000 +0100
@@ -15,8 +15,7 @@
 PKG_INSTALLATION_TYPES=	overwrite pkgviews
 PKG_DESTDIR_SUPPORT=	user-destdir
-USE_LANGUAGES+=		c99 c++
@@ -45,4 +44,13 @@
 	cd ${WRKSRC}/libcharset/lib && ${MAKE} libdir=${EGDIR} DESTDIR=${DESTDIR:Q} \
+.include "../../mk/"
+.if ${OPSYS} != "Linux"
 .include "../../mk/"