Summary:
  This line in ./configure appears to be non-ANSI C++, because it
doesn't
specify a return value:
extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,

gcc-2.95 notices, fails to compile the test, and ./configure defaults
to the wrong guess for the argument types for select().  Lyx then fails
to compile.

I'm not sure how to fix the ./configure script, as it appears to be
machine-generated.  Could someone lend a hand?

--------------------------
Details:

I've downloaded lyx-1.0.3, untarred it, and typed

[lyx-1.0.3]$ ./configure
  ...
  checking for sys/select.h... yes
  ...
  checking types of arguments for select()... int,int *,struct timeval *
  ...
[lyx-1.0.3]$ make
  ...
g++ -c -g -O2 -I. -I. -I../images   -I/usr/X11R6/include spellchecker.C 
spellchecker.C: In function `void create_ispell_pipe(const LString &)':
spellchecker.C:348: passing `int *' as argument 2 of `select(int,
__fd_set *, __fd_set *, __fd_set *, timeval *)'

It seems pretty obvious what the error is: configure is guessing the
wrong argument types for select().  Now why would this be?

I'm running RedHat 5.2, with GCC 2.95 installed.  Let's take a look at
config.log:

configure:5753: checking types of arguments for select()
configure:5786: g++ -c -g -O2   -I/usr/X11R6/include conftest.C 1>&5
configure:5780: ANSI C++ forbids declaration `select' with no type
configure: failed program was:
#line 5767 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern select (int,fd_set *,fd_set *,fd_set *,struct timeval *);
int main() {

; return 0; }

Ahah!  The ./configure test case is busted, so all the compiles fail.
My guess is that the configure script then defaults to some reasonable
guess, which isn't right for Linux, so the compile fails.  I don't know
anything about ./configure except that it's machine-generated.

Help!

-Iain McClatchie
[EMAIL PROTECTED]

Reply via email to