ssh, sshd, ssh-add, ssh-keygen, ssh-keyscan, ssh-keysign, and ssh-agent appear to compile fine. Here's where it fails: cc -g -I. -I. -I/usr/local/ssl/include -I/usr/local/include -DSSHDIR=\" /usr/local/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" -D_PATH_SSH_ASKPAS S_DEFAULT=\"/usr/local/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/local/l ibexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" - D_PATH_SSH_PIDDIR=\"/usr/local/etc\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/local/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c ssh -rand-helper.c E "ssh-rand-helper.c",L252/C16(#444): ru | Type `double stir_rusage(int who,double entropy_estimate)::struct rusage' ( "ssh-rand-helper.c",L252/C9) of variable is a yet undefined struct/union. E "ssh-rand-helper.c",L257/C23(#80): ru | sizeof can't be applied to an incomplete struct/union. w "ssh-rand-helper.c",L712/C30(#257): '=' encountered where '==' may have been intended. 2 user errors 1 warning *** Error code 2 (bu21) make: fatal error. I will add the config.log file as an attachment.
Created attachment 331 [details] Contains the output of ./configure
I would guess that "struct rusage" is defined in a header file that is not included. Try grepping /usr/include to find which header it is, then try #include'ing it in ssh-rand-helper.c to see if it fixes the problem. Then tell us which one it is :-)
I found rusage in /usr/include/sys/resource.h I tried to add the following just after the first "#include" statement in ssh-rand-helper.c. Still getting the same error: 1. #include "sys/resource.h" 2. #include <resource.h> 3. I even copied /usr/include/sys/resource.h into /usr/local/include (make shows "-I/usr/local/include" somewhere in the compilation) That didn't work either. I also modified config.h and changed HAS_GETRUSAGE(?) from 1 to 0. Still the same problem. In the end, I just commented the following code starting in line 252 in ssh-rand-helper.c: struct rusage ru; if (getrusage(who, &ru) == -1) return 0; RAND_add(&ru, sizeof(ru), entropy_estimate); return entropy_estimate; and replaced it with "return 0", just like in the "#else" part of the "#ifdef" statement. All the rest of the programs compiled fine. I didn't run "make install" yet though because I'm not sure what the effect of changing the code above to just one line (return 0) would do. Pls. let me know if it's fine to run "make install" even though I changed my version of ssh-rand-helper.c. Just a reminder, this is the newest source: 3.6.1p2. Thanks!
1. Changing the HAS_GETRUSAGE to 0 will not help, you need to comment out the #define altogether 2. For some reason, configure is finding rusage but it is not in the headers that we are including. Please try the following command (or equivalent): find /usr/include -type f -exec grep rusage {} /dev/null \; and report which files are matched. Your system probably has what we need tucked away in some weird header file.
Hi, The rusage function(?) is in /usr/include/sys/resource.h. I'll comment the whole HAS_GETRUSAGE section in config.h and will recompile. I also had problems about "no controlling tty". I found another post that says to add "#...CTTY 1". After I did that, ssh worked. JohnF
> The rusage function(?) is in /usr/include/sys/resource.h. We are after the definition of "struct rusage", not so much the functions. Try manually adding '#include <sys/resource.h>' to ssh-rand-helper.c just before the '#include "misc.h"' line near the top of the file. If that doesn't work, try the find command I mentioned and attach the results to this bug.
Hi, Adding "#include <sys/resource.h>" didn't help. Got the same error. Here's the output of the "find" command: /usr/include/sys/resource.h:struct rusage { /usr/include/sys/resource.h:extern int getrusage(int, struct rusage *); /usr/include/sys/wait.h:extern pid_t wait3(int *, int, struct rusage *); Commenting the whole "#define HAVE_GETRUSAGE 1" line in config.h succeeds and compilation goes ok all the way with no problems. JohnF
Created attachment 343 [details] configure.gz: rebuilt with extra defines for NCR MP-RAS Should have remembered this earlier (this was added after 3.6.1p2): $ cvs log configure.ac [snip] revision 1.124 date: 2003/05/30 07:43:42; author: dtucker; state: Exp; lines: +3 -1 - (dtucker) Define SSHD_ACQUIRES_CTTY for NCR MP-RAS and Reliant Unix. I'm pretty sure these are required. I also want to add -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 to CPPFLAGS for MP-RAS but I haven't had confirmation that it will not break anything else. [end quote] Please try the attached (gzip'ed) configure file, which is from 3.6.1p2 with both sets of defines added. You shouldn't need any other flags or changes, hopefully configure will get it right.
Created attachment 345 [details] output of 'make' after running the new attachment 'configure.gz' on 3.6.1p2
Comment on attachment 345 [details] output of 'make' after running the new attachment 'configure.gz' on 3.6.1p2 Using the configure.gz that was attached here breaks the compilation real bad. Just commenting "HAVE_GETRUSAGE" and adding the "#define ....CTTY 1" makes everything work"
Created attachment 346 [details] Attempt to fix configure for NCR MP-RAS Ouch. You appear to have system headers that blow up when those XOPEN defines are defined. We can try only defining HAVE_GETRUSAGE if getrusage() is defined AND can be linked, as opposed to just if it can be linked (patch attached). I'll attach a new configure rebuilt with this patch to test in a few minutes.
Created attachment 347 [details] New (gzip'ed) configure for MP-RAS made with previous attachment.
Created attachment 348 [details] New (gzip'ed) configure for MP-RAS made with previous attachment.
Hi, I'm confused here. Attachment 347 [details] shows a configure.ac patch file while attachment 348 [details] shows a gzipped configure. Anyway, here's what I did: 1. download attachment 348 [details] (the one dated 2003-06-30 19:35 above) 2. extracted openssh-3.6.1p2.tar.gz to another directory 3. replaced the 'configure' file that came with openssh-3.6.1p2 with attachment 348 [details] 4. ./configure 5. make The compilation finished. I haven't run 'make install' yet. JohnF
"configure" is generated by autoconf from "configure.ac", so the changes are made to configure.ac but you need autoconf (I used v2.53) and gnu m4 to rebuild configure. Attachment #346 [details] is the patch, #347 and #348 are the resulting configure file (a network hiccup meant that it was submitted twice). I attached the patch so people could see what was changed and the rebuilt configure so it's easy to test. If it runs OK for you and there are no objections I'll commit patch #346.
Attachment #346 [details] applied. Please reopen if this is not resolved or a new bug if there are further problems.
Mass change of RESOLVED bugs to CLOSED