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

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  : 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

Found CXX      = icc
Found LDFLAGS  =
Using Xerces-C version info from /temporary/xerces-c_2_5_0-redhat_72-icc_71//inc
Checking to see if libxerces is in your library path…Success!!
Using Xerces-C version: 2.5.0
Processing hints file hints/
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 –
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

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.


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.