Subject: Re: converters/libiconv breaks on Linux (PR-35937)
To: Joerg Sonnenberger <joerg@britannica.bec.de>
From: Ulrich Habel <uli@habel.name>
List: tech-pkg
Date: 03/07/2007 16:32:32
--=-BE2VNcm06P3pl9WCM5qp
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mi, 2007-03-07 at 14:01 +0100, Joerg Sonnenberger wrote:
> GCC 2.95 has a number of C99 extensions or to be more precise some of
> what later got known as C99 extensions. For that very reason this is
> incorrect. To be frank, I don't like worrying about GCC 2.95 anymore. It
> doesn't mean someone might not fix the c99 option passing but:
> (a) This patch is wrong. The problem is about the compiler and not the
> OS.
> (b) I don't even think that patching gcc.mk is correct either, since GCC
> 2.95 does not support all C99 features. Maybe we should just require
> 3.0+ in that case.

True - it fixes at a wrong position. It's just that the gcc which is
installed when bootstrapping Linux doesn't understand the switch
-std=(gnu99|c99) and this is why the build breaks. I have attached a
patch with require gcc 3+ - I have tested it on Linux and it builds,
however when building the package it says:

=> Registering installation for libiconv-1.10nb3
libiconv-1.10nb3 requires installed package gcc3-c-3.3.6
libiconv-1.10nb3 requires installed package gcc3-c++-3.3.6
===> Building binary package for libiconv-1.10nb3
Creating package /usr/pkgsrc/packages/All/libiconv-1.10nb3.tgz
Using SrcDir value of /usr/pkg
Registering depends: gcc3-c>=3.3.5nb1 gcc3-c++>=3.3.5nb1.

I think that's pretty heavy stuff here for the embedded platforms. iconv
is a handy tool for the shell to convert files, however forcing them to
install a compiler of that size is just maybe not what they want to.
I'll hope I am missing something of the documentation - so I can set gcc
3+ only for building but not as an installation requirement.

What I am still missing - in the original Makefile c99 is specified.
It's not needed on the bootstrap of Linux to build correctly, just c is
needed. Maybe it's a better idea to just skip the c99 - or is it needed
for higher versions of gcc (I am still in the worlds of gcc-2.95, I
suppose)? This might save a horror of dependencies - if I don't missed
parts of the documentation.

Thanks and Regards

Uli

-- 
Ulrich Habel
http://habel.name

--=-BE2VNcm06P3pl9WCM5qp
Content-Disposition: attachment; filename=libiconv.patch
Content-Type: text/x-patch; name=libiconv.patch; charset=utf-8
Content-Transfer-Encoding: 7bit

--- Makefile.orig	2007-03-07 15:18:33.000000000 +0100
+++ Makefile	2007-03-07 15:18:48.000000000 +0100
@@ -15,7 +15,7 @@
 
 PKG_INSTALLATION_TYPES=	overwrite pkgviews
 PKG_DESTDIR_SUPPORT=	user-destdir
-
+GCC_REQD+=		3.0	# see PR 35937
 USE_LANGUAGES+=		c99 c++
 USE_LIBTOOL=		yes
 GNU_CONFIGURE=		yes

--=-BE2VNcm06P3pl9WCM5qp--