Gssapi Questions
Allen McWongahey
allenmcw at comcast.net
Thu Aug 25 00:39:26 EDT 2011
Hi Marcus,
Sorry, I should have specified more how I fixed the compile flags which
caused gcc to fail. I did indeed go through the Config.cache and figured out
the right variables to set and "configure" no longer set those flags in the
first place. E.g., I had done exactly what you responded with.
The problem about the error with <sys/stat.h> is a complete mystery though.
This occurs when compiling Kerberos (NOT OpenSSH) and note the error below
which is in a Kerberos source file:
prof_file.c: In function `profile_update_file_data_locked':
prof_file.c:330: structure has no member named `st_mtim'
make[3]: *** [prof_file.so] Error 1
Now as I understand it "--oldincludedir" should specify the location of the
system header files, correct? I set this variable to "/usr/include" and
there IS a "sys/stat.h" header file off of /usr/include. This should be the
header file that "prof_file.c" is including. Please note that the above
error says that there is no member named "st_mtim" so it obviously found the
stat.h header file.
So I wrote a stand-alone program to include the same header file and that
member (st_mtim) IS present and my stand-alone program compiles with this
and works properly. I accessed the struct member in exactly the same way as
line 330 of "prof_file.c". So I am really baffled how my stand-alone program
compiles and yet prof_file.c does not.
I may well still be missing some argument to "configure" which could be
causing this but I am at a loss to understand how something this simple
could fail. L
Thanks much
Allen
-----Original Message-----
From: Marcus Watts [mailto:mdw at umich.edu]
Sent: Wednesday, August 24, 2011 1:20 PM
To: allenmcw at comcast.net
Cc: kerberos at mit.edu
Subject: Re: Gssapi Questions
> Date: Wed, 24 Aug 2011 12:03:24 PDT
> To: "'Marcus Watts'" < <mailto:mdw at umich.edu> mdw at umich.edu>
> cc: < <mailto:kerberos at mit.edu> kerberos at mit.edu>
> From: "Allen McWongahey" <allenmcw at comcast.net>
> Subject: RE: Gssapi Questions
>
> Hi Marcus,
>
> Thanks very much. This definitely got me further and I removed all the
> changes I made to configure so it completed as it was designed to do.
>
> Now I'm having a different problem though. The order I should do things
are:
> "configure", "make", "make install" - is this correct?
>
> When I run "make" I am getting the following error:
>
> cc1: unrecognized option `-Wdeclaration-after-statement'
> cc1: unrecognized option `-Wvariadic-macros'
>
> The configure script apparently thinks my compiler supports these
> options but it does not. I am using gcc version 3.2. From comments in
> the configure script I thought I could specify "error=foo" to
> eliminate this CLFAG in the Makefiles This does not work. I also tried
> "Werror=foo" but it does not work either.
>
> If I am understanding your previous message correctly "make install"
> should add all the appropriate header files, correct? But since "make"
> precedes that will make even succeed since those same header files are
> still not there?
>
> Thanks much
> Allen
Your mail doesn't say whether make for openssh or mit kerberos is
complaining.
1. basic sequence
2. ancient gcc bad news
3. openssh shouldn't complain
4. mit can use those - did configure guess wrong?
____ 1. basic sequence
Basic sequence should be:
( supposing that f=<someplace-with-lots-of-tar-files> )
# mit kerberos
tar Oxf $f/krb5-1.9.1-signed.tar krb5-1.9.1.tar.gz | tar xfz - cd
krb5-1.9.1 ./configure ...
make
make install
cd ..
kerberos will use internal logic to find its own headers.
You should not need to do anything to make that work.
*unless*, that is, your cross-compiler tool chain has
problems...
# openssh
tar xf $f/openssh-5.8p2.tar.gz
cd openssh-5.8p2
./configure ...
make
make install
cd ..
openssh should use the just-installed kerberos headers.
Your actual sequence will be complicated by whatever you're doing to
cross-compile, such as setting target prefix &etc.
____ 2. ancient gcc bad news
gcc 3.2 is really ancient. Is there a reason you can't use something newer?
You are likely to run into small language problems if you use that, There's
also the possibility of some larger breakage, which might have been long
fixed.
[ I vaguely recall weirdness with #include <> vs "",
cross-compiling, system headers, and wanting to use -I-
-nostdinc
But your compiler may work totally differently.
]
____ 3. openssh shouldn't complain
openssh has no logic to set the -Wdeclaration-after-statement
-Wvariadic-macros.
If you're getting warnings there, you should look at your build process and
tool chain.
____ 4. mit can use those - did configure guess wrong?
MIT kerberos configure *can* add those options
(r20685 | raeburn)
src/aclocal.m4
It should be testing them first.
It's possible that your tool chain is fooling configure into believing those
options work.
You should look at "config.log" to see why the test thinks your compiler
supports them.
It also appears that you can override those tests with
krb5_cv_cc_flag__dash_Werror_dash_implicit_dash_function_dash_declaration
krb5_cv_cc_flag__dash_Werror_eq_declaration_dash_after_dash_statement
krb5_cv_cc_flag__dash_Werror_eq_variadic_dash_macros
krb5_cv_cc_flag__dash_Wmissing_dash_braces
krb5_cv_cc_flag__dash_Wmissing_dash_format_dash_attribute
krb5_cv_cc_flag__dash_Wmissing_dash_prototypes
krb5_cv_cc_flag__dash_Wnewline_dash_eof
krb5_cv_cc_flag__dash_Wno_dash_format_dash_zero_dash_length
krb5_cv_cc_flag__dash_Woverflow
krb5_cv_cc_flag__dash_Wparentheses
krb5_cv_cc_flag__dash_Wreturn_dash_type
krb5_cv_cc_flag__dash_Wsign_dash_compare
krb5_cv_cc_flag__dash_Wstrict_dash_overflow
krb5_cv_cc_flag__dash_Wswitch
krb5_cv_cc_flag__dash_Wunknown_dash_pragmas
krb5_cv_cc_flag__dash_Wunused_dash_function
krb5_cv_cc_flag__dash_Wunused_dash_label
krb5_cv_cc_flag__dash_Wunused_dash_value
krb5_cv_cc_flag__dash_Wunused_dash_variable
You can't fix unsupported flags by adding options to CFLAGS.
You have to find another way to remove them from the cc line in the first
place, such as using the above configuration variables.
While writing the above, you then sent,
> I figured out how to suppress those two CLFAGS.
>
> Attempting to compile with make I now get:
>
> prof_file.c: In function `profile_update_file_data_locked':
> prof_file.c:330: structure has no member named `st_mtim'
> make[3]: *** [prof_file.so] Error 1
>
> There is not struct definition for "struct stat" which should be in
> "sys/stat.h".
>
> I can't seem to figure what I'm doing wrong as it seems very basic
> header files are missing.
____ 5. system headers
You need system headers. These are NOT part of gcc.
They need to match your target platform.
I think you said something about ppc64. aix, darwin, macosx, openbsd, aix?
Presumably you mean one of the commercial choices. Your vendor should have
those -- possibly as a package your system administrator failed to install.
You'll need to get those. You'll also need a copy of some system libraries
and such.
=>
get "hello world" working.
Then get something small that uses stat (what we call a glp "grungy little
program") to print the right results.
Then go back to k5/ssh.
-Marcus
Watts
More information about the Kerberos
mailing list