From mint-bounce@lists.fishpool.fi Thu Jan 7 12:31:25 2010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8grFEZng2QEKyObprDqcvwERNu/mNJYwIfVpkF/cYkc=; b=rn1CuY/b/lQiiCeqPltZR/YmcmalmKHZWXz57TaX/8YzdErrZtBnPAFwsHaMn9dlBC po8Nwx0EHUqYu/8ps2Fqt2js1opjf7BxsyY+N1dLfYBbB4sv4zo+o+W+uUYcUss8HDln Ep8vE6Dez9k2oFp3uSM5ipphOdEMnMLY1ItZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lxKNde/5sFJxwjCjQW84LjDiwTRYDIfKgxGF2MZon5GIWZbwFt4+5e5D694Gmw2pNz 57yJtVDthKVz7RZgyUIvKScNDIKk8NOKuuD8GGSUyfIsL1tnSq2Wv/37r4VeSj+MzgZz 6EBvCRmTfJwjpy8j+PyqfRZrNex4n5PFRK1DU= MIME-Version: 1.0 In-Reply-To: <4B45E231.6050006@freesbee.fr> References: <4B45E231.6050006@freesbee.fr> Date: Thu, 7 Jan 2010 18:27:48 +0100 Message-ID: Subject: Re: [MiNT] trouble with mintlib + gcc 4.4.2 From: Miro Kropacek To: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= Cc: MiNT Mailing List Content-Type: multipart/alternative; boundary=00032555bc9ad262e8047c966348 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: miro.kropacek@gmail.com Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: --00032555bc9ad262e8047c966348 Content-Type: text/plain; charset=ISO-8859-1 > The culprit is not gcc 4.4.2, it is... you, of course :-) > Because you have installed gcc in /usr/local instead of /usr. > > rpcgen is stupid and does not look for cpp in the PATH. > Instead it searches it in the following directories: > - /usr/bin > - /usr/ccs/lib > - The directory specified by the -Y argument > True, true, I totally overlooked it. I propose the following change: > In mintlib/sunrpc/Makefile, replace the rpcgen-cmd variable by: > > rpcgen-cmd = $(srcdir)/rpcgen -Y `which cpp | sed -e "s,/cpp$,,"` > > If it works, we should commit it, as it allows to compile the MiNTLib with > gcc (and cpp) installed in any directory. > Hmm, I wanted to make a patch but by testing I've found strange error. After isolation of problem I came with this: file Makefile: all: echo `which cpp | sed -e 's/\/cpp//'` when I run this on easymint as "make all", I get: /bin/sh: alias: command not found /usr/local/bin Does anybody know where that "command not found" comes from? It does not happen in linux. -- MiKRO / Mystic Bytes http://mikro.atari.org --00032555bc9ad262e8047c966348 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable =A0
The culprit is not gcc 4.4.2, it is... you, of course :-)
Because you have installed gcc in /usr/local instead of /usr.

rpcgen is stupid and does not look for cpp in the PATH.
Instead it searches it in the following directories:
- /usr/bin
- /usr/ccs/lib
- The directory specified by the -Y argument
True, tru= e, I totally overlooked it.

I propose the following change:
In mintlib/sunrpc/Makefile, replace the rpcgen-cmd variable by:

rpcgen-cmd =3D $(srcdir)/rpcgen -Y `which cpp | sed -e "s,/cpp$,,"= ;`

If it works, we should commit it, as it allows to compile the MiNTLib with = gcc (and cpp) installed in any directory.
Hmm, I wanted to = make a patch but by testing I've found strange error. After isolation o= f problem I came with this:

file Makefile:

all:
=A0=A0=A0=A0=A0=A0=A0 echo `which cpp | s= ed -e 's/\/cpp//'`

when I run this on easymint as &quo= t;make all", I get:

/bin/sh: alias: command not found
/usr/l= ocal/bin

Does anybody know where that "command not found" comes from? = It does not happen in linux.

--
MiKRO / Mystic Byt= es
http://mikro.ata= ri.org
--00032555bc9ad262e8047c966348--