[OpenAFS] AKLOG build error...
Fri, 28 Apr 2006 19:37:33 -0400
On Friday, April 28, 2006 04:49:57 PM -0400 "Halter, Jonathan"
>> -----Original Message-----
>> Yes, that's not surprising. There are autoconf macros
>> (src/cf/solaris-cc.m4, i think) which could be hooked in, or
>> better yet a
>> test which tries to determine if a gcc which supports
>> compiling Solaaris
>> kernel modules (and uses the requisite flags instead of cc flags in
>> libafs/MakefileProto.SOLARIS.in) would be nice, if someone
>> wants to do the
>> work on that and contribute it I will certainly find some
>> time to work
>> with them on it, but at the moment I don't have time to just
>> do the work.
>> There's no point in testing. We know it really wants
>> If you want it to not want that, it's going to need some help.
> I am not necessarily interested in using gcc to compile openafs on
> I just wanted to point out that since our Sun Studio compilers are not
> located in /opt/SUNWspro, I am used to explicitly setting
> CC=/apps/coe/bin/cc for configuring a package to use Sun's cc on our
> system. This does not seem to work for openafs's configure. It insists
> on using /opt/SUNWspro/bin/cc instead of obeying the location (
> CC=/apps/coe/bin/cc ) that I've tried to set.
Ok; it boils down to this...
The build process currently uses one compiler for everything.
To build the kernel, that compiler _must_ be Sun's CC; gcc won't work.
Unfortunately, configure is often overly agressive about finding a gcc
instead of the compiler we want, especially since it likes to look in
/usr/local, and likes to look for 'gcc', and the Sun compiler is generally
someplace that configure won't find on its own.
So, we completely ignore configure and use a compiler of our choosing. At
present, this is hard-coded; there is no way to override it from the
command line. In the long run, we'd like to compile user-mode code with
the compiler configure finds, and kernel code with the Sun compiler, and
give you a way to tell configure where the latter is located. For the
moment, none of the code required to do that has been written, so until
someone who understands the problem (or can gain an understanding) has some
time to spend on it, we're stuck with things the way they are now.
To work around the problem, you will want to edit src/cf/osconf.m4, find
the stanza for sun4x_59 or whatever Solaris you're using, and change the
definitions of CC, CCOBJ, and MT_CC to point to whereever your compiler
really is. Then rebuild the configure script by running regen.sh in the
top level (for that you'll need autoconf and automake installed). You may
_also_ have to set CC in configure's environment or on the command line, to
make the tests work.
Yes, this sucks. That's what you get for not installing the compiler where
Sun thinks you should. I have the same problem, and I patch around it in
the same way every time.
-- Jeffrey T. Hutzelman (N3NHS) <email@example.com>
Sr. Research Systems Programmer
School of Computer Science - Research Computing Facility
Carnegie Mellon University - Pittsburgh, PA