Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Why icpc need the library file crtxi.o

harleylg
Beginner
435 Views
I've installed Intel C++ Compiler 11.1 on Gentoo Linux, icc works well. But when a package use icpc to compile a test program, it failed.

The test program is very simple, code is:

[cpp]       /* confdefs.h.  */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
/* end confdefs.h.  */


int main() {
  return 0;
}

[/cpp]


Compile with command:icpc -o conftest -O2 -xSSE4.2 -ip -gcc -Wl,-O1 conftest.cpp >&5

icpc give 2 warning and one error:
icpc: warning #10001: could not find directory in which the set of libstdc++ include files resides
icpc: warning #10047: reverting to Intel libraries and includes
ld: //opt/intel/Compiler/11.1/046/lib/ia32/crtxi.o: No such file: No such file or directory

I've install libstdc++ 3.3, and the file libstdc++.so.5 in directory /usr/lib/; I couldn't find the crtxi.o in the icc installation directory.
0 Kudos
4 Replies
Om_S_Intel
Employee
435 Views

I can compile and run on Ubuntu 8.x and RHLES 5.xwithout any issue. It could be that the compiler is not installed properly.

Could you compile a "hello world" program?

Om
0 Kudos
TimP
Honored Contributor III
435 Views

Could you compile a "hello world" program?

Under both g++ and icpc? I suppose icpc may be depending on g++ to show where libstdc++ is installed. Do you set the environment variables in the supported way, using the iccvars script, or do you skip some of that?
0 Kudos
harleylg
Beginner
435 Views
Quoting - tim18
Under both g++ and icpc? I suppose icpc may be depending on g++ to show where libstdc++ is installed. Do you set the environment variables in the supported way, using the iccvars script, or do you skip some of that?

I call the shell file with ia32 parameter in my profile. Since icc works well, I don't think that's the point.

And yesterday I reinstall a "clean" Gentoo and icc, but still the same error.

I test a very simple program, named it as empty.cpp with this code
[cpp]int main() {
    return 0;
}[/cpp]

Complied without any flags using "icpc empty.cpp" or "icc empty.cpp", I got the same error. But if I rename it to "empty.c", compile is ok.
0 Kudos
harleylg
Beginner
435 Views
I wonder 2 things:

1.Where the icc find the "libstdc++ include files"?

2.Why it request the file crtxi.o? I googled, it seems it's a library file in Intel Fortran Compiler or old version icc, but not in my install directory.
0 Kudos
Reply