in reply to abort while installing perl in Tru64

Hi,

I don't really know much about Configure scripts, but it looks to me that Configure tests for the compiler by running:
$cc -o try $ccflags $ldflags try.c
If that fails, then Configure concludes that a C compiler is not available.

However, a failure could conceivably arise for other reasons - perhaps try.c is not a valid C file, or perhaps one (or more) of $cc, $ccflags and $ldflags has not been set appropriately and is screwing up the works.

What does try.c contain ? I think it ought to be:
int main(int argc, char *argv[]) { return 0; }
Can you successfully run 'cc -o try try.c' ? (I'm assuming that try.c did not cleaned up when Configure aborted.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: abort while installing perl in Tru64
by xiaoyafeng (Deacon) on Oct 23, 2007 at 09:29 UTC
    Thanks!

    Yes, I can! Although I can't find try.c in perl install directory, I note below command in Configure:
    cat <<'EOSC' >>trygcc case "$cc" in '') ;; *) $rm -f try try.* $cat >try.c <<EOM int main(int argc, char *argv[]) { return 0; } EOM if $cc -o try $ccflags $ldflags try.c; then : else echo "Uh-oh, the C compiler '$cc' doesn't seem to be working." + >&4
    So I create a new try.cc and run cc -o try try.c successfully. It seem $cc, $ccflags and $ldflags has not been set appropriately. uh? How can I do next?

    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
      .. I can't find try.c in perl install directory

      Aaah ... I believe it should still be there. Perhaps there's some problem with "write" permissions in that build directory. I just tried running sh Configure -des -Dcc=crap and the process (as expected) died with the same message as you got. But try.c was still there !!

      I also got a message Configure: line 10: crap: command not found but you didn't get any message about cc not being found. I'm becoming more and more convinced that your problem is *not* that cc can't be found, but that try.c can't be created.

      Cheers,
      Rob