[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] trouble with mintlib + gcc 4.4.2
Miro Kropacek a écrit :
./rpcgen `gcc -print-file-name=cpp | sed -e "s,/cpp$,," -e "s,^cpp$,,"
-e "s,^..*,-Y &,"` -h bootparam_prot.x -o bootparam_prot.T
cannot find any C preprocessor (cpp)
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
See the rpcgen sources, in function find_cpp():
http://www.atariforge.net/cgi-bin/cvsweb/mintlib/sunrpc/rpc_main.c?rev=1.3&content-type=text/x-cvsweb-markup
The gcc -print-file-name command line you hit seem bogus to me and
probably turns into an empty option in any case. So it works only if gcc
is installed in /usr.
As rpcgen is a standard tool we should avoid to change its behaviour.
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.
--
Vincent Rivière