[Bug 601] configure script doesen't setup preprocessor flags properly

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Jun 26 17:25:33 EST 2003


http://bugzilla.mindrot.org/show_bug.cgi?id=601





------- Additional Comments From openssh at roumenpetrov.info  2003-06-26 17:25 -------
Hi Ted

>[SNIP]
> A subsequent run of configure was made with the following invocation:
> CFLAGS="-I/usr/local/ssl/include/openssl"
> LDFLAGS="-L/usr/local/lib:/usr/local/ssl/lib" ./configure ...
>[SNIP]
> configure did properly detect openssl and completed it's run, however it
> produced the following output, note the correct compiler flag and the
> differing and incorrect C preprocessor flag:
>[SNIP]
> also on Solaris pid files normally go in /var/run
> [SNIP]
> Thus the -R flag is unneeded because [SNIP]

correct command is ( when you don't use --with-ssl-dir=... and don't like -R):
CPPFLAGS=-I/usr/local/ssl/include \
LDFLAGS=-L/usr/local/ssl/lib \
.../configure \
  --with-pid-dir=/var/run \
  --without-rpath \
  <OTHER_OPTIONS> \
  [--build=<BUILD>]
, where BUILD is sparc-sun-solaris2.5.1, but you can skip --build because is
deteted correctly.

Take note about CFLAGS vs CPPFLAGS.


Only one problem is piddir: When OpenSSH is configured with
--with-pid-dir=/path/to/missing/dir
make install don't create piddir and sshd don't complain that cannot create pid
file.


Only for infomation! Next lines are from "X.509 v3 certificate support in
OpenSSH" patch:
diff -ruN openssh-3.6.1p2/Makefile.in openssh-3.6.1p2+x509g2/Makefile.in
--- openssh-3.6.1p2/Makefile.in	2003-04-29 12:12:08.000000000 +0300
+++ openssh-3.6.1p2+x509g2/Makefile.in	2003-04-30 09:06:01.000000000 +0300
@@ -233,6 +244,8 @@
 	$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5
 	$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
 	$(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
+	$(srcdir)/mkinstalldirs $(DESTDIR)$(sshcadir)
+	$(srcdir)/mkinstalldirs $(DESTDIR)$(piddir)
 	(umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH))
 	$(INSTALL) -m 0755 $(STRIP_OPT) ssh $(DESTDIR)$(bindir)/ssh
 	$(INSTALL) -m 0755 $(STRIP_OPT) scp $(DESTDIR)$(bindir)/scp
@@ -359,3 +372,23 @@
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
diff -ruN openssh-3.6.1p2/sshd.c openssh-3.6.1p2+x509g2/sshd.c
--- openssh-3.6.1p2/sshd.c	2003-03-10 02:38:10.000000000 +0200
+++ openssh-3.6.1p2+x509g2/sshd.c	2003-06-12 09:06:01.000000000 +0300
@@ -1224,6 +1244,8 @@
 			if (f) {
 				fprintf(f, "%ld\n", (long) getpid());
 				fclose(f);
+			} else {                                
+				error("Could not create pid file: %.400s", options.pid_file);
 			}
 		}
 

In conclusion:
  LD_LIBRARY_PATH is not solution because OpenSSL can be in default library
search path and this path take precedence over LD_LIBRARY_PATH (at least on
linux) and in this case command like this:
CPPFLAGS=-I/usr/local/ssl/include \
LD_LIBRARY_PATH=/usr/local/ssl/lib \
.../configure .....
MUST produce error: Your OpenSSL headers do not match your library


I hope that my comment will help you.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list