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

I am trying to install Digest MD5 on a Linux box that was just rebuilt, but when I run make test I get the error below. The first line of the output seems to reference gcc, but then it fails the test because gcc can't be found...? Am I reading this right? Or is the first reference setting options for gcc, then going to look for gcc and it can't be found? gcc is present in the path /bin/sh so I am at a loss as to why I'm getting this err msg. Any help/direction/smacks upside the head are appreciated.
[root@]# make test gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdecla +ration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FI +LE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTI +FY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 +-m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERS +ION=\"2.39\" -DXS_VERSION=\"2.39\" -fPIC "-I/usr/lib/perl5/5.8.8/i386 +-linux-thread-multi/CORE" MD5.c /bin/sh: gcc: command not found make: *** [MD5.o] Error 127

Replies are listed 'Best First'.
Re: Digest MD5 not compiling, err msg confusing
by moritz (Cardinal) on Jul 15, 2009 at 15:20 UTC
    What does which gcc print, if you type it in the same shell (as the same user) where you typed make test?

    And yes, you are reading it right, it means that the shell (/bin/sh) couldn't find the program gcc in $PATH.

      Just to expand a bit on moritz's fine answer: the first line that you see is make printing the next command that will be run. The last line is the output of the command, indicating that /bin/sh could not find gcc.

      --MidLifeXis

      The tomes, scrolls etc are dusty because they reside in a dusty old house, not because they're unused. --hangon in this post

      Well, this is interesting. I'm not quite sure how to interpret this...
      $ which gcc /usr/bin/which: no gcc in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/ +bin:/home/racmdb2/sqllib/bin:/home/racmdb2/sqllib/adm:/home/racmdb2/s +qllib/misc:/home/racm/bin)
      In our dev env the cmd outputs one line - /usr/bin/gcc. I've also found some other problems in this rebuilt box, not to be addressed here. But, if someone would explain the above, I'd appreciate it.
        It means that gcc is not installed (most likely, and contrary to what you thought), or is installed in a non-standard location that's not in path, or it's not executable, or there is no symlink to gcc, just a gcc-4.3 or whatever version you use.