Subject: FVWM: Help, newbie drowning !

From: Paul Hurley <[email-masked]>
Date: Fri, 21 May 1999 10:40:29 +0100

I am trying to install fvwm-2.2.1 on my Redhat 5.1 linux box, I've
downloaded the tar.gz file, unzipped it and everything, waded through he
INSTALL and INSTALL.fvwm,

I have run ./configure, and it goes, and goes, and then comes up with
Error: Can't run test program while cross compiling
or something similar.  I can't find any mention of this and without the
needed makefile, can't finish the install

Can anyone help ??

BP
< [email-masked]   /   www.aston.ac.uk/~hurleyp/ >

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Fri, 21 May 1999 12:02:36 -0400

> needed makefile, can't finish the install

Probably, but not without the exact error message, and a few of the
lines leading up to the message.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Paul Hurley <[email-masked]>
Date: Fri, 21 May 1999 18:37:39 +0100

Dan Espen wrote:

> <snip>
> </snip>

Okay, here we go. fvwm-2.2.1.tar.gz downloaded and unzipped, wasn't sure
where
to put it (is this important ??) so put it in /usr/X11R6 . Then ran
./configure from /usr/X11R6/fvwm-2.2.1/ . This gave many lines of checks
(almost all - yes) then these lines at the end

<quote>
checking for strchr... yes
checking for sysconf... yes
checking for uname... yes
checking for div... yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sig_atomic_t... yes
checking whether setvbuf arguments are reversed... configure: error: can
not
run test program while cross compiling
</quote>

I presume this error stops configure from generating the makefile needed
for
make install.

BP

PS When I say does this matter above, I sound awfully like some girl who
says
' is it important to put oil in the engine then ?? !!  (sorry for being
very
un PC !)
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Adam Rice <[email-masked]>
Date: Fri, 21 May 1999 20:58:09 +0100

Quoting Paul Hurley ([email-masked]):
> to put it (is this important ??) so put it in /usr/X11R6 .

It isn't important where you put it, as when you do the "make install" step
all files are put in their correct locations. If you don't want to keep the
source around (I don't), /tmp would be a sensible place to unpack it, otherwise
/usr/src is the usual place to put sources.

> I presume this error stops configure from generating the makefile needed

Yes. The error means that the ./configure script couldn't execute a small
test program that it compiled (and assumed that it meant the compiler was
compiling for a different architecture). The ./configure script should have
created a config.log file with more information about what went wrong. If
you post it (or the relevant portions), I/we may be able to provide more
help.

-- 
Adam Rice -- [email-masked] -- Blackburn, Lancashire, England

---

From: [email-masked] (Paul D. Smith)
Date: 21 May 1999 17:05:31 -0400

%% Regarding FVWM: Help, newbie drowning !;
%% Paul Hurley <[email-masked]> writes:

  ph> I am trying to install fvwm-2.2.1 on my Redhat 5.1 linux box, I've
  ph> downloaded the tar.gz file, unzipped it and everything, waded
  ph> through he INSTALL and INSTALL.fvwm,

  ph> I have run ./configure, and it goes, and goes, and then comes up
  ph> with Error: Can't run test program while cross compiling or
  ph> something similar.

This means your compiler is installed incorrectly somehow.  I've seen it
many times.

Thanks for providing those bits of the configure output, but the output
you want is further up, nearer the start, where fvwm looks for the C and
C++ compilers (the latter is much further down than the former).

Go back up and look, and you'll see it says "looking for C
compiler... ok" then it'll say "Checking if it's a cross
compiler... yes".  That "yes" is wrong, it should be a "no".

What this means is that configure found the compiler and it seems to run
OK, _BUT_ when it tried to link and execute a small program, the program
didn't run.  Thus, configure assumes it's cross-compiling.

Go into the config.log file and find the part where it's testing the C
compiler or C++ compiler (whichever one it says is a cross-compiler) and
find out what error it got when trying to run the program.  If you don't
understand the error, post it here so we can see it.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Paul Hurley <[email-masked]>
Date: Sat, 22 May 1999 00:30:38 +0100

Heres the full reply from ./configure

<quote>
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable modal dialogs for applications... yes
checking whether to enable saveunders for pop-up menus... yes
checking whether to enable shape extensions... yes
checking whether to enable ActiveDown button state... yes
checking whether to enable Inactive button state... yes
checking whether to enable MiniIcon style option... yes
checking whether to enable vector button style... yes
checking whether to enable pixmap button style... yes
checking whether to enable gradient button style... yes
checking whether to enable stacked button styles... yes
checking whether to enable styled title-bars... yes
checking whether to enable BorderStyle command... yes
checking whether to enable UseDecor style option... yes
checking whether to enable WindowShade function... yes
checking whether to enable debugging messages... no
checking iconpath... /usr/include/X11/bitmaps:/usr/include/X11/pixmaps
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for POSIXized ISC... no
checking for minix/config.h... no
checking for stdarg.h... yes
checking for vfprintf... yes
checking for waitpid... yes
checking for c++... c++
Using c++ to compile C++ programs
checking for c++... (cached) c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... yes
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking for X... libraries /usr/X11/lib, headers
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for cpp... /lib/cpp
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets ${MAKE}... (cached) yes
checking for ranlib... ranlib
checking for flex... flex
checking for flex... (cached) flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for stdlib.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for unistd.h... yes
checking for getopt.h... yes
checking for sys/select.h... no
checking for sys/systeminfo.h... no
checking for working const... yes
checking for inline... inline
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for gettimeofday... yes
checking for mkfifo... yes
checking for putenv... yes
checking for select... yes
checking for setvbuf... yes
checking for socket... yes
checking for waitpid... (cached) yes
checking for strdup... yes
checking for strstr... yes
checking for strtol... yes
checking for memmove... yes
checking for memcpy... yes
checking for strchr... yes
checking for sysconf... yes
checking for uname... yes
checking for div... yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sig_atomic_t... yes
checking whether setvbuf arguments are reversed...

</quote>

Okay, I think this is the affected parts from config.log

<quote>
configure:1183: checking whether to enable debugging messages
configure:1204: checking iconpath
configure:1231: checking for gcc
configure:1344: checking whether the C compiler (gcc  ) works
configure:1360: gcc -o conftest    conftest.c  1>&5
configure:1386: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1391: checking whether we are using GNU C
configure:1400: gcc -E conftest.c
configure:1419: checking whether gcc accepts -g
configure:1451: checking how to run the C preprocessor
configure:1472: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1532: checking for POSIXized ISC
configure:1554: checking for minix/config.h
configure:1564: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1560: minix/config.h: No such file or directory
configure: failed program was:
#line 1559 "configure"
#include "confdefs.h"
#include <minix/config.h>
configure:1607: checking for stdarg.h
configure:1617: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1646: checking for vfprintf
configure:1674: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1706: checking for waitpid
configure:1734: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1873: checking for c++
configure:1911: checking for c++
configure:1943: checking whether the C++ compiler (c++  ) works
configure:1959: c++ -o conftest    conftest.C  1>&5
/usr/bin/ld: warning: libm.so.6, needed by /usr/lib/libstdc++.so, may conflict with
libm.so.5
/usr/bin/ld: warning: libc.so.6, needed by /usr/lib/libstdc++.so, may conflict with
libc.so.5
configure:1985: checking whether the C++ compiler (c++  ) is a cross-compiler
configure:1990: checking whether we are using GNU C++
configure:1999: c++ -E conftest.C
configure:2018: checking whether c++ accepts -g
configure:2057: checking for X
configure:2124: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:2200: gcc -o conftest -g -O2   conftest.c -lXt  1>&5
ld: cannot open -lXt: No such file or directory
configure: failed program was:
#line 2193 "configure"
#include "confdefs.h"
int main() {
XtMalloc()
; return 0; }
configure:2371: checking for dnet_ntoa in -ldnet
configure:2390: gcc -o conftest -g -O2   conftest.c -ldnet   1>&5
ld: cannot open -ldnet: No such file or directory
configure: failed program was:
#line 2379 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
configure:2412: checking for dnet_ntoa in -ldnet_stub
configure:2431: gcc -o conftest -g -O2   conftest.c -ldnet_stub   1>&5
ld: cannot open -ldnet_stub: No such file or directory
configure: failed program was:
#line 2420 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
configure:2460: checking for gethostbyname
configure:2488: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2558: checking for connect
configure:2586: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2650: checking for remove
configure:2678: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2742: checking for shmat
configure:2770: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2843: checking for IceConnectionNumber in -lICE
configure:2862: gcc -o conftest -g -O2   -L/usr/X11/lib conftest.c -lICE   1>&5
ld: warning: libc.so.6, needed by /usr/X11/lib/libICE.so, may conflict with
libc.so.5
configure:2890: checking for cpp
configure:2940: checking for a BSD compatible install
configure:2993: checking whether ln -s works
configure:3014: checking whether make sets ${MAKE}
configure:3043: checking for ranlib
configure:3076: checking for flex
configure:3109: checking for flex
configure:3143: checking for yywrap in -lfl
configure:3162: gcc -o conftest -g -O2   conftest.c -lfl   1>&5
configure:3185: checking lex output file root
configure:3206: checking whether yytext is a pointer
configure:3225: gcc -o conftest -g -O2   conftest.c  -lfl 1>&5
configure:3251: checking for bison
configure:3284: checking for ANSI C header files
configure:3297: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3388: checking for sys/wait.h that is POSIX.1 compatible
configure:3409: gcc -c -g -O2  conftest.c 1>&5
configure:3433: checking for stdlib.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3433: checking for fcntl.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3433: checking for limits.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3433: checking for malloc.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3433: checking for string.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3433: checking for memory.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3433: checking for unistd.h
configure:3443: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3473: checking for getopt.h
configure:3483: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3473: checking for sys/select.h
configure:3483: gcc -E  conftest.c >/dev/null 2>conftest.out
In file included from /usr/include/sys/select.h:31,
                 from configure:3479:
/usr/include/selectbits.h:30: warning: `__FD_ZERO' redefined
/usr/include/asm/posix_types.h:61: warning: this is the location of the previous
definition
/usr/include/selectbits.h:35: warning: `__FD_SET' redefined
/usr/include/asm/posix_types.h:41: warning: this is the location of the previous
definition
/usr/include/selectbits.h:40: warning: `__FD_CLR' redefined
/usr/include/asm/posix_types.h:46: warning: this is the location of the previous
definition
/usr/include/selectbits.h:49: warning: `__FD_ISSET' redefined
/usr/include/asm/posix_types.h:54: warning: this is the location of the previous
definition
In file included from configure:3479:
/usr/include/sys/select.h:60: warning: `FD_SET' redefined
/usr/include/linux/time.h:30: warning: this is the location of the previous
definition
/usr/include/sys/select.h:61: warning: `FD_CLR' redefined
/usr/include/linux/time.h:31: warning: this is the location of the previous
definition
/usr/include/sys/select.h:62: warning: `FD_ISSET' redefined
/usr/include/linux/time.h:32: warning: this is the location of the previous
definition
/usr/include/sys/select.h:63: warning: `FD_ZERO' redefined
/usr/include/linux/time.h:33: warning: this is the location of the previous
definition
configure: failed program was:
#line 3478 "configure"
#include "confdefs.h"
#include <sys/select.h>
configure:3473: checking for sys/systeminfo.h
configure:3483: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:3479: sys/systeminfo.h: No such file or directory
configure: failed program was:
#line 3478 "configure"
#include "confdefs.h"
#include <sys/systeminfo.h>
configure:3511: checking for working const
configure:3565: gcc -c -g -O2  conftest.c 1>&5
configure:3586: checking for inline
configure:3600: gcc -c -g -O2  conftest.c 1>&5
configure:3626: checking for off_t
configure:3659: checking for pid_t
configure:3692: checking for size_t
configure:3726: checking return type of signal handlers
configure:3748: gcc -c -g -O2  conftest.c 1>&5
configure:3767: checking for strftime
configure:3795: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for gettimeofday
configure:3893: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for mkfifo
configure:3893: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for putenv
configure:3893: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for select
configure:3893: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for setvbuf
configure:3893: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for socket
configure:3893: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3865: checking for waitpid
configure:3920: checking for strdup
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for strstr
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for strtol
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for memmove
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for memcpy
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3932: warning: conflicting types for built-in function `memcpy'
configure:3920: checking for strchr
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for sysconf
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for uname
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3920: checking for div
configure:3948: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3975: checking for sigaction
configure:4003: gcc -o conftest -g -O2   conftest.c  1>&5
configure:3975: checking for siginterrupt
configure:4003: gcc -o conftest -g -O2   conftest.c  1>&5
configure:4029: checking for sig_atomic_t
configure:4065: checking whether setvbuf arguments are reversed

</quote>

Sorry about the extreme length but can't really understand it. (never did like C,
much prefer VB !)

For info sake this was done on a linux box with Redhat 5.2 (all packages installed)
and running bash.

Hope you can help

---

From: [email-masked] (Paul D. Smith)
Date: 22 May 1999 02:10:32 -0400

ph> Heres the full reply from ./configure

  ph> checking for gcc... gcc
  ph> checking whether the C compiler (gcc  ) works... yes
  ph> checking whether the C compiler (gcc  ) is a cross-compiler... yes

Yep, right here, just as I said: configure decides that GCC is a
cross-compiler.  This is quite obviously The Wrong Thing To Do.

  ph> Okay, I think this is the affected parts from config.log

  ph> configure:1231: checking for gcc
  ph> configure:1344: checking whether the C compiler (gcc  ) works
  ph> configure:1360: gcc -o conftest    conftest.c  1>&5
  ph> configure:1386: checking whether the C compiler (gcc  ) is a cross-compiler

Hmm.  It doesn't, though, seem to give any error messages which might
help us understand the problem :(

We'll just have do it ourselves.  Go to about line 1360 in your
configure script, and change the if-statement from this:

  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
> if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi

To this:

  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
> if (./conftest; exit); then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi

The ">" shouldn't really go in the code, of course.  E.g., remove the
2>/dev/null from the if-statement.

Now delete config.cache and re-run the configure.  It should then show
some kind of error message when it checks to see if the compiler is a
cross-compiler.  Send that error message.

  ph> Sorry about the extreme length but can't really understand
  ph> it. (never did like C, much prefer VB !)

Ah.  Okay... :)

---

From: [email-masked] (Paul D. Smith)
Date: Mon, 24 May 1999 11:24:08 -0400

Gulp.  Your compiler/shared libraries are seriously whacked.  I suggest
you reinstall at least the compiler from scratch.

HTH.

PS. Oh, I just saw your post about reinstalling Linux--OK, that's
    another way to go :)