automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does 'configure' look for localhost-g++ ???


From: Dr. David Kirkby
Subject: Why does 'configure' look for localhost-g++ ???
Date: Fri, 18 Apr 2003 03:25:15 +0100

I have written a script (~280 lines):

http://www.medphys.ucl.ac.uk/~davek/teston

to check portability of software. The script takes a package (default
extension .tar.gz) and copies this via secure copy (scp) to a remote
machine. It also copies a small (~10 lines) script over to the remote
machine and executes that script. The small script decompresses the
.tar.gz, extracts it with tar, runs configure, then make. This does
really help find portability bugs quickly.

Usage: teston [options] host package

A typical usage might be:

teston some_remote_host    my_package

This works fine if the files are copied to a remote machine, but the
configure script fails if done on the localhost, with it suggesting I
might be cross-compiling, as it can't run C++ programs. It would
appear from config.log
http://www.medphys.ucl.ac.uk/~davek/config.log
it's looking for the localhost-g++, so not surprisingly it can't
compile with that!!!

You might well argue there is no need to use such a script on
localhost, but I'd be interested if anyone can point it why it fails
locally, but works remotely. 

The script below is what is produced (but configure fails) if run on
the local host sparrow. ssh has already made the directories and scp
has copied atlc-4.3.1.tar.gz and this small script. 

#! /bin/sh
# Script created on sparrow at Fri Apr 18 02:33:47 BST 2003 using
'teston' 
# to run on the remote host sparrow 
cd /export/home/davek/sparrow/
gzip -d /export/home/davek/sparrow/atlc-4.3.1.tar.gz
tar xf /export/home/davek/sparrow/atlc-4.3.1.tar
mkdir /export/home/davek/sparrow/atlc-4.3.1-build
cd /export/home/davek/sparrow/atlc-4.3.1-build
/export/home/davek/sparrow/atlc-4.3.1/configure --host=sparrow
time make

Here's the output. You see the scp printing a row of stars to indicate
it copied the files over. You don't see the output from gzip or tar,
but then you see the configure output. 

sparrow % teston sparrow atlc-4.3.1  # sparrow is the local host. 
atlc-4.3.1.tar.gz    100%
|***************************************************************| 
2531 KB    00:00    
remote-test.sparrow  100%
|***************************************************************|  
412       00:00    
checking for a BSD-compatible install... /usr/local/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... a.out
configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
checking whether the C++ compiler works... make: *** No targets
specified and no makefile foundselect: Bad file number
Script finished at Fri Apr 18 02:23:42 BST 2003 using 'teston'


The config.log is intersting
http://www.medphys.ucl.ac.uk/~davek/config.log
as it seem to find things like /usr/local/bin/gawk,
/usr/local/bin/install, but then looks for sparrow-g++, sparrow-c++
etc. 

If instead I run on a remote host (woodpecker), it produces an almost
identical script, but this time it works. 

teston woodpecker atlc-4.3.1   # where woodpecker is a remote machine. 

#! /bin/sh
# Script created on sparrow at Fri Apr 18 01:29:05 BST 2003 using
'teston' 
# to run on the remote host woodpecker 
cd /export/home/davek/woodpecker/
gzip -d /export/home/davek/woodpecker/atlc-4.3.1.tar.gz
tar xf /export/home/davek/woodpecker/atlc-4.3.1.tar
mkdir /export/home/davek/woodpecker/atlc-4.3.1-build
cd /export/home/davek/woodpecker/atlc-4.3.1-build
/export/home/davek/woodpecker/atlc-4.3.1/configure
time make


The output this time is


sparrow /export/home/davek/atlc % teston woodpecker atlc-4.3.1
atlc-4.3.1.tar.gz    100% |**********************************|  2531
KB    00:02    
remote-test.woodpeck 100% |**********************************|  
433       00:00    
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc
checking for gcc... gcc

etc etc etc and works fine. 


I've put the script at 
http://www.medphys.ucl.ac.uk/~davek/teston
Someone might hopefully see the problem, or if not it might be useful
in its current state to others. 

-- 
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6408 Fax: 020 7679 6269
Internal telephone: ext 46408
e-mail address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]