xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

As title, I encounter an error at the very beginning:
Beginning of configuration questions for perl5. Checking echo to see how to suppress newlines... ...using \c The star should be here-->* First let's make sure your kit is complete. Checking... Looks good... Would you like to see the instructions? [n] Locating common programs... awk is in /usr/bin/awk. cat is in /sbin/cat. chmod is in /sbin/chmod. comm is in /usr/bin/comm. cp is in /sbin/cp. echo is in /usr/bin/echo. expr is in /sbin/expr. grep is in /sbin/grep. ls is in /sbin/ls. mkdir is in /sbin/mkdir. rm is in /sbin/rm. sed is in /usr/bin/sed. sort is in /sbin/sort. touch is in /usr/bin/touch. tr is in /usr/bin/tr. uniq is in /usr/bin/uniq. Don't worry if any of the following aren't found... I don't see Mcc out there, offhand. ar is in /usr/bin/ar. I don't see bison out there, either. I don't see byacc out there, either. cpp is in /usr/bin/cpp. csh is in /usr/bin/csh. date is in /sbin/date. egrep is in /usr/bin/egrep. I don't see gmake out there, either. gzip is in /usr/bin/gzip. I don't see less out there, either. ln is in /sbin/ln. make is in /sbin/make. more is in /usr/bin/more. nm is in /usr/bin/nm. I don't see nroff out there, either. pg is in /usr/bin/pg. test is in /usr/bin/test. uname is in /usr/bin/uname. I don't see zip out there, either. Using the test built into your sh. Checking compatibility between /usr/bin/echo and builtin echo (if any) +... They are compatible. In fact, they may be identical. Symbolic links are supported. Checking how to test for symbolic links... You can test for symbolic links with 'test -h'. Good, your tr supports [:lower:] and [:upper:] to convert case. Using [:upper:] and [:lower:] to convert case. First time through, eh? I have some defaults handy for some systems that need some extra help getting the Configure answers right: 3b1 dos_djgpp irix_6_0 nonstopux sunos_ +4_0 aix dynix irix_6_1 openbsd sunos_ +4_1 aix_3 dynixptx isc opus super- +ux aix_4 epix isc_2 os2 svr4 + altos486 esix4 linux os390 svr5 + amigaos fps lynxos os400 ti1500 + apollo freebsd machten posix-bc titano +s atheos genix machten_2 powerux ultrix +_4 aux_3 gnu mint qnx umips + beos gnukfreebsd mips rhapsody unicos + bsdos gnuknetbsd mpc sco unicos +mk convexos greenhills mpeix sco_2_3_0 unisys +dynix cxux hpux ncr_tower sco_2_3_1 utekv + cygwin i386 netbsd sco_2_3_2 uts darwin interix newsos4 sco_2_3_3 uwin + dcosx irix_4 next_3 sco_2_3_4 vmesa + dec_osf irix_5 next_3_0 solaris_2 vos dgux irix_6 next_4 stellar You may give one or more space-separated answers, or "none" if appropr +iate. A well-behaved OS will have no hints, so answering "none" or just "Pol +icy" is a good thing. DO NOT give a wrong version or a wrong OS. Which of these apply, if any? [dec_osf] /usr/lib/cmplrs/cc/ftoc: No such file or directory /usr/lib/cmplrs/cc/cord: No such file or directory Appending /usr/local/lib to LD_LIBRARY_PATH. LD_LIBRARY_PATH is now /usr/local/lib. Configure uses the operating system name and version to set some defau +lts. The default value is probably right if the name rings a bell. Otherwis +e, since spelling matters for me, either accept the default or answer "no +ne" to leave it blank. Operating system name? [dec_osf] Operating system version? [4.0g] Perl can be built to use the SOCKS proxy protocol library. To do so, Configure must be run with -Dusesocks. If you use SOCKS you also need to use the PerlIO abstraction layer, this will be implicitly selected. If this doesn't make any sense to you, just accept the default 'n'. Build Perl for SOCKS? [n] Previous version of perl5 used the standard IO mechanisms as defined in <stdio.h>. Versions 5.003_02 and later of perl5 allow alternate IO mechanisms via the PerlIO abstraction layer, but the stdio mechanism is still available if needed. The abstraction layer can use AT&T's sfio (if you already have sfio installed) or regular st +dio. Using PerlIO with sfio may cause problems with some extension modules. If this doesn't make any sense to you, just accept the default 'y'. Use the PerlIO abstraction layer? [y] Perl can be built to take advantage of threads on some systems. To do so, Configure can be run with -Dusethreads. Note that Perl built with threading support runs slightly slower and uses more memory than plain Perl. The current implementation is believed to be stable, but it is fairly new, and so should be treated with caution. If this doesn't make any sense to you, just accept the default 'n'. Build a threading Perl? [n] Your platform has some specific hints regarding threaded builds, using + them... Perl can be built so that multiple Perl interpreters can coexist within the same Perl executable. If this doesn't make any sense to you, just accept the default 'n'. Build Perl for multiplicity? [n] Hmm... Looks kind of like an OSF/1 system, but we'll see... Congratulations. You aren't running Eunice. It's not Xenix... Nor is it Venix... Use which C compiler? [cc] ld: -no_ansi_alias: Unknown flag ld: Usage: ld [options] file [...] Uh-oh, the C compiler 'cc' doesn't seem to be working. Configure: gcc: not found ld: -no_ansi_alias: Unknown flag ld: Usage: ld [options] file [...] Uh-oh, the C compiler 'cc' doesn't seem to be working. You need to find a working C compiler. Either (purchase and) install the C compiler supplied by your OS vendo +r, or for a free C compiler try http://gcc.gnu.org/ I cannot continue any further, aborting.
What's wrong? This is my first time install perl in Tru64. So I have no any idea to resolve its issue.

Please help! Any replies are appreciated.!!

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re: abort while installing perl in Tru64
by moritz (Cardinal) on Oct 22, 2007 at 07:33 UTC

    Read the output, it says

    Uh-oh, the C compiler 'cc' doesn't seem to be working. You need to find a working C compiler. Either (purchase and) install the C compiler supplied by your OS vendo +r, or for a free C compiler try http://gcc.gnu.org/ I cannot continue any further, aborting.

    Well, you need a C compiler. Do you have one? If so, how is it called?

      Thank you for your reply. Strangely, cc compiler in system works!
      I can compile a a.out file to print "Hello World!!"(just in perl install directory type cc test.c)
      I doubt %ENV lead to this issue. But How can I prove my suspicion?

      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

        Most likely, cc is a shell alias. You can check that by typing:

        alias cc

        This should tell you what cc expands to. You can check whether there is a program cc in your path by typing which cc - most likely that will fail for you too.

        I think you can tell Configure which cc to use by giving the cc as a parameter:

        ./Configure cc=/home/xiaoyafeng/bin/cc

        ... but likely it's better to set up your $ENV{PATH} so that cc is found directly by Configure.

Re: abort while installing perl in Tru64
by shmem (Chancellor) on Oct 23, 2007 at 09:44 UTC
    It is 'ld' that bails out
    Use which C compiler? [cc] ld: -no_ansi_alias: Unknown flag ld: Usage: ld [options] file [...]

    because it doesn't grok the -no_ansi_alias flag.

    To get you going you could try the following: the perl distribution contains a directory named 'hints' which contains hint files for various systems; in there is a file named 'dec_osf.sh' which is sourced by 'Configure' for the 'dec_osf' type system. Look for the above flag there and comment it out.

    That might help. I've never seen a Tru64 system, so I can't tell you whether 'ld' should know about that flag. Browse that hint file, something might ring a bell.

    But in the output you've posted more errors are showing up:

    Which of these apply, if any? [dec_osf] /usr/lib/cmplrs/cc/ftoc: No such file or directory /usr/lib/cmplrs/cc/cord: No such file or directory

    Is your Tru64 system sane?

    update: you might want to check whether the right ld is first in your path.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      thank you! according to your reply, install make much progress! ;)
      Now, I can complete sh Configure -de just with below messages:
      ./makedepend: makefile: cannot open cp makefile: No such file or directory
      But I've chmod -R install directory permission to 777, and I could create file successfully. How will I do next? Thanks in advance!

      update: What does *right* ld mean, and how do I check? I reinstall C library files, and now Configure script doesn't throw the warning messages like /usr/lib/cmplrs/cc/ftoc: No such file or directory .

      I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
Re: abort while installing perl in Tru64
by syphilis (Archbishop) on Oct 23, 2007 at 06:11 UTC
    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
      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