Norihiko Murase
2005-Aug-09 00:43 UTC
(4.1p1) Building failure with libedit on FreeBSD 4.x-RELEASE
Hi, I've noticed that building 4.1p1 fails on FreeBSD 4.x if the libedit support is enabled by the "--with-libedit" configure option. I tried to build OpenSSH-4.1p1 under the following environment: CPU: i386 family OS: FreeBSD 4.11-RELEASE Compiler: gcc-2.95.4 (/usr/bin/gcc) ---- libedit: (located at /usr/lib/) Building fails with the following messages: ---------- gcc -g -O2 -Wall ...... -DHAVE_CONFIG_H -c sftp.c sftp.c: In function `interactive_loop': sftp.c:1247: too many arguments to function `el_init' sftp.c:1251: `H_SETSIZE' undeclared (first use in this function) sftp.c:1251: (Each undeclared identifier is reported only once sftp.c:1251: for each function it appears in.) sftp.c:1251: warning: passing arg 2 of `history' makes integer from pointer without a cast sftp.c:1326: warning: passing arg 2 of `history' makes integer from pointer without a cast gmake: *** [sftp.o] Error 1 ---------- This is because of the spec-differences between the following types of the libedit: [1] the version attached to FreeBSD-4.x [2] the version distributed at http://www.thrysoee.dk/editline/ # The version attached to FreeBSD-5.x is the same as [2], # I think. I think that it is no problem that you require the libedit distributed at http://www.thrysoee.dk/editline/ ; however, I would like to suggest that you should improve the configure script. The configure script should check whether the libedit on the system can be used or not --- concretely, * the number of the arguments of el_init() * whether the macro H_SETSIZE is defined or not Best Regards, --- Norihiko Murase <skeleten at shillest.net>
Darren Tucker
2005-Aug-09 09:56 UTC
(4.1p1) Building failure with libedit on FreeBSD 4.x-RELEASE
On Tue, Aug 09, 2005 at 09:43:09AM +0900, Norihiko Murase wrote:> I've noticed that building 4.1p1 fails on FreeBSD 4.x if the > libedit support is enabled by the "--with-libedit" configure > option.Could you please test this patch? You will need to run "autoreconf" after applying the patch to rebuild configure. Thanks. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement. -------------- next part -------------- Index: configure.ac ==================================================================RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v retrieving revision 1.282 diff -u -p -r1.282 configure.ac --- configure.ac 2 Aug 2005 14:20:15 -0000 1.282 +++ configure.ac 9 Aug 2005 09:42:52 -0000 @@ -1023,6 +1023,19 @@ AC_ARG_WITH(libedit, [ AC_MSG_ERROR(libedit not found) ], [ -lcurses ] ) + AC_MSG_CHECKING(if libedit version is compatible) + AC_TRY_COMPILE([#include <histedit.h>], + [ +int main(void) +{ + el_init("", NULL, NULL, NULL); + exit(0); +} + ], + [ AC_MSG_RESULT(yes) ], + [ AC_MSG_RESULT(no) + AC_MSG_ERROR(libedit version is not compatible) ] + ) fi ] )