[OpenAFS] Re: openafs on debian with linux 2.6.18 kernel

Jan Pospisil honik@kma.zcu.cz
Wed, 25 Oct 2006 20:25:33 +0200 (CEST)


On Wed, 25 Oct 2006, Jeffrey Hutzelman wrote:

> "I don't believe you".

hmm, in some situations it is good to expect some absolute idiot to be on 
the other side, but in this case you should believe me, I have "some" 
experience and not writing about this problem "just for fun".

> Please send the output of 'dpkg-query -l cpp'

Of course at first I tried different versions of gcc (3.2 to 4.1), but I 
always got the same error, but if you want, at the moment I have:

$ dpkg-query -l cpp
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
uppercase=bad)
||/ Name                    Version                 Description
+++-=======================-=======================-==============================================================
ii  cpp                     4.1.1-11                The GNU C preprocessor (cpp)

$ dpkg-query -L cpp
/.
/lib
/usr
/usr/bin
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man7
/usr/share/doc
/usr/share/doc/cpp
/usr/share/doc/cpp/copyright
/usr/share/doc/cpp/README.Debian.gz
/usr/share/doc/cpp/changelog.Debian.gz
/usr/bin/i486-linux-gnu-cpp
/usr/bin/cpp

$ l /usr/bin/cpp
lrwxrwxrwx 1 root root 7 Oct 25 08:17 /usr/bin/cpp -> cpp-4.1

>> it is not in /lib/cpp, but
>> in /usr/bin/cpp. This is the standard location on all Linuxes I've ever
>> seen (Debian, RH, SuSe, Scientific, ...).
>
> If there's no /lib/cpp, then you have a problem.  Fix the problem, instead of 
> trying to argue with me about filesystem policy or, worse, history.  If your 
> unix experience is limited to four relatively recent Linux distributions, you 
> don't have enough of a sample to say what the "standard location" is of 
> anything as old as the C preprocessor.

My experience is definitely not limited to Linuxes, we were using DEC 
Aplhas, SGI Irixes, HP-UXes, but we stoped using them several years ago, 
for many reasons, and maybe you are right that the preprocessor used to be 
by default in /lib/cpp, this is something I don't remember. However, this 
is not the core of the problem, the problem is that NOW on all linuxes the 
default path to cpp is /usr/bin/cpp and not /lib/cpp and in my opinion, 
this wrong path SHOULD NOT be hardcoded to the OpenAFS code as it is now. 
If you want to make the code portable on Linuxes, either change it to 
/usr/bin/cpp, or even better use autotools to determine where the CPP is.

>>> The AFSFid type is defined in src/fsint/common.xg.
>
> Note that file does not have a name ending in ".h".
> I also explained how afsint.h is generated from afsint.xg, which includes 
> common.xg, and how that's not working because rxgen expects to run /lib/cpp 
> and you don't have one.

Hmm, you are right, the CPP absolute path is hard-coded even in the .c 
source file, namely ./src/rxgen/rpc_main.c, that is even worse than I 
would expect, these settings should in my opinion go at least to .h 
header files and even better to Makefiles.

On Wed, 25 Oct 2006, Wesley Chow wrote:

> If it's any use to know, all of my Debian derived systems (sarge, ubuntu 
> dapper, and ubuntu hoary) have /lib/cpp symlinked to something.  That 
> link must have been created through some deb package.  I'm not sure 
> which one, but it's most likely a standard one, like gcc, g++, cpp, 
> etc..  My guess is that something broke while you were installing cpp.

Hmm, on debians, there are onlu libraires in /lib (as the name suggests), 
not executalbles. But really, creating symling helped. In my opinion this 
is not the standard solution, is it?

What other people think?

Jan

----------------------------------------------------------------------
   Ing. Jan Pospisil, Ph.D.           e-mail: Jan.Pospisil@kma.zcu.cz
   University of West Bohemia         phone:  (+420) 37763-2675
   Department of Mathematics          fax:    (+420) 37763-2602
   Plzen, Czech Republic              address: Univerzitni 22, 306 14
----------------------------------------------------------------------