Operating System - HP-UX
1819504 Members
3060 Online
109603 Solutions
New Discussion юеВ

C compiler cannot create executables

 
SOLVED
Go to solution
Henk Besseling
Occasional Contributor

C compiler cannot create executables

Hi,

When I want to use configure, I get an error. It's on a hpux 11.
When I use gcc (gcc version 2.95.3 20010315):
# ./configure
loading cache ./config.cache
checking host system type... hppa1.1-hp-hpux11.00
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

When I use cc:
loading cache ./config.cache
checking host system type... hppa1.1-hp-hpux11.00
checking for gcc... cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cc accepts -g... yes
checking for CC... no
checking for C++... no
checking for g++... g++
checking for c++... (cached) g++
checking whether the C++ compiler (g++ ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

When I do the configure on a Linux system, it all works fine, so there is nothing wrong with the package.

Does anyone knows how to solve this??

Thanks.
4 REPLIES 4
Victor BERRIDGE
Honored Contributor

Re: C compiler cannot create executables

Hi,
My advise woul be go and get gcc 2.95.3 binaries, from the porting and archive center...

http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-2.95.3/

Good luck
Victor
Gregory Fruth
Esteemed Contributor

Re: C compiler cannot create executables

Type "which gcc" to make sure you're using the
right gcc.

The directory /opt/softbench/bin (if present) creates
all sorts of entertaining problems by including its own
wrappers for cc, f77, gcc, etc., even if the target program
isn't installed.

If you have /opt/softbench/bin/gcc it might confuse the
configure script. You may want to either change your
PATH or rename those troublesome scripts to gcc.softbench,
etc.

HTH
Henk Besseling
Occasional Contributor

Re: C compiler cannot create executables

When I type which gcc:
/opt/gcc/bin/gcc

And I'm already using the gcc ported for HP.
# gcc -v
Reading specs from /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Rainer von Bongartz
Honored Contributor
Solution

Re: C compiler cannot create executables

Note that you MUST install binutils prior to installing gcc because gcc will NOT work with HP's assembler.

You can download GNU binutils from

http://hpux.cs.utah.edu/hppd/hpux/Gnu/binutils-2.11/
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...