Problem : /bin/sh: line 1: icc: command not found :Error “make” for a Installing a Perl Module

Problem : /bin/sh: line 1: icc: command not found :Error “make” for a Installing a Perl Module

Hello one of my application that I have installed requires teh XML::Xerces module .I downloaded the module form the cpan org

http://cpan.uwinnipeg.ca/module/XML%3A%3AXerces

and followed the instructions.According to which I needed to have the binary Xerces-C for that to work.
Following the instructions  I set the envorment variaraible pointing to the root directory
export XERCESCROOT=/permanant/xerces/

I am using RedHatLinux 9

Then I installed the XML::Xerces module
and tried

I did the Makefile.pl  : Which seemed to work fne

[root@name XML-Xerces-2.5.0-0]# perl Makefile.PL
Using XERCES_LIB = /temporary/xerces-c_2_5_0-redhat_72-icc_71//lib
Using XERCES_INCLUDE = /temporary/xerces-c_2_5_0-redhat_72-icc_71//include
using config file: /temporary/xerces-c_2_5_0-redhat_72-icc_71//src/xercesc/confi
g.status

Found CXX      = icc
Found CXXFLAGS =  -w -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER –
DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET
Found LDFLAGS  =
Using Xerces-C version info from /temporary/xerces-c_2_5_0-redhat_72-icc_71//inc
lude/xercesc/util/XercesVersion.hpp
Checking to see if libxerces is in your library path…Success!!
Using Xerces-C version: 2.5.0
Processing hints file hints/linux.pl
Writing Makefile for Handler
Writing Makefile for XML::Xerces
********************************************************************************************************
The problem arises when I try to make the file
********************************************************************************************************
[root@nameXML-Xerces-2.5.0-0]# make
make[1]: Entering directory `/downloads/XML-Xerces-2.5.0-0/Handler’
make[1]: Leaving directory `/downloads/XML-Xerces-2.5.0-0/Handler’
icc -c  -I. -IHandler -I/temporary/xerces-c_2_5_0-redhat_72-icc_71//include -w –
DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXM
L_USE_NETACCESSOR_SOCKET -D_REENTRANT -DDEBIAN -D_GNU_SOURCE -O   -DVERSION=\”2.
5.0-0\” -DXS_VERSION=\”2.5.0-0\” -fPIC “-I/usr/lib/perl5/5.8.0/i386-linux-thread
-multi/CORE”   Xerces.cpp
/bin/sh: line 1: icc: command not found
make: *** [Xerces.o] Error 127
**********************************************************************************************************


Solution: /bin/sh: line 1: icc: command not found    :Error “make” for a Installing a Perl Module

Hi 🙂

ICC is the Intel compiler for linux http://www.intel.com/software/products/compilers/clin/

The module installer detected that instead of gcc (GNU C Compiler) which is what you should have.

You should check if you have GCC installed, if you do not, then install it first.

When you DO have GCC installed:

1. Try issuing the command:
export CC=gcc
before you run the makefile.
2. How about a nice, ugly symlink?
ln -s /usr/bin/gcc /usr/bin/icc
This will give the build script a fake icc that actually points to gcc. I didn’t see any parameters that gcc does not support, so it should work.
3. Edit Makefile.PL and /temporary/xerces-c_2_5_0-redhat_72-icc_71//src/xercesc/config.status .
Look for lines that mention icc and see why it detected it instead of gcc
4. Make an alias
alias icc=gcc

One of them should work.

Enjoy!

PS: To install GCC – get the RPM file from the CD (called gcc-x.xx.-…rpm  x’s are version numbers).
Issue: rpm -Uvh gcc-xx.xx.x.xx.x.x..
It will probably compain about dependencies – you should copy and install them in the same manner.