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

update from 10.1 to 11.1 unresolved external symbol ___intel_sse2_strlen

neallee
Beginner
1,397 Views
Afteri have upgraded the compiler from intel 10.1 to 11.1.038, in the linking stage, the programe generates the errors like this:

unresolved external symbol ___intel_sse2_strlen

why?

Thanks.
0 Kudos
1 Solution
Om_S_Intel
Employee
1,397 Views

The symbol is defined in libirc.lib.

$nm /opt/intel/Compiler/11.1/038/lib/intel64/libirc.a | grep strlen
U strlen
U strlen
faststrlen.o:
0000000000000000 T __intel_sse2_strlen
0000000000000030 T __intel_sse4_strlen

Intel compiler driver will automatically include this. If you are not using icc or icpc then please include above library in linker command.

View solution in original post

0 Kudos
13 Replies
Om_S_Intel
Employee
1,398 Views

The symbol is defined in libirc.lib.

$nm /opt/intel/Compiler/11.1/038/lib/intel64/libirc.a | grep strlen
U strlen
U strlen
faststrlen.o:
0000000000000000 T __intel_sse2_strlen
0000000000000030 T __intel_sse4_strlen

Intel compiler driver will automatically include this. If you are not using icc or icpc then please include above library in linker command.
0 Kudos
smithpd
Beginner
1,397 Views
I have the same problem. I am using the Windows version 11.1 of the complier. I do not understand this reply.

What is icc or icpc? I do not have that path (intel64) in my install, and why would I need it when targeting an IA32 machine? strlen() is a standard library function. Why is strlen not available in the standard libraries in folder C:Program FilesIntelCompiler11.1�38libia32 ? And, more to the point, what detemines the paths that are searched for include and lib? Why is it looking for an sse2 version?

Quoting - Om Sachan (Intel)

The symbol is defined in libirc.lib.

$nm /opt/intel/Compiler/11.1/038/lib/intel64/libirc.a | grep strlen
U strlen
U strlen
faststrlen.o:
0000000000000000 T __intel_sse2_strlen
0000000000000030 T __intel_sse4_strlen

Intel compiler driver will automatically include this. If you are not using icc or icpc then please include above library in linker command.

0 Kudos
JenniferJ
Moderator
1,397 Views
Hi smithpd,
on Windows, if you build from the build environment from "start -> intel software development tools ....", your lib path is set automatically.

Try to add "libirc.lib" to the linker explicitly.
The dir to "libirc.lib" is "C:Program FilesIntelCompiler11.1�38libia32".

Jennifer
0 Kudos
smithpd
Beginner
1,397 Views
Jennifer,

Unfortunately, your advice did not solve the problem. I put the dir string in the field Additional Library Directories in the Liniker's General Tab. Same error. Then I also added libirc.lib to the Additional Dependencies in theLiniker's Input tab (which seems redundant to me). Same error.

It looks to me like maybe the ia32 libraries do not contain ___intel_sse2_strlen, but the compiler is requesting it without my consent. Is there any way to force the compiler to user the version of strlen that is part of the standard C library and not require finding Intel's sse2 version of it?

If the paths are defined automatically in the command line implementation but not in the MSVC++ 2008 IDE integration, then clearly this would be a bug in the Intel compiler installation procedure. There is no reason that the IDE user should have to do more to make it work than the command line user. I am not sure this is the case, though. It worked just as well without putting the path explicitly into the linker parameters. I think something else is going on.

It would help me if someone from Intel would take the MSVC++ 2008 IDE integration as installed and get a program containing strlen to work and tell me how they did it.

By the way, I replaced strlen and its calls with my own implementation called strlen_pds. This did not help. Some other function is evidently calling strlen. Could it be strcpy or sprintf?. I don't think I should have to rewrite the standard C library to get my code to work.

Quoting - Jennifer Jiang (Intel)
Hi smithpd,
on Windows, if you build from the build environment from "start -> intel software development tools ....", your lib path is set automatically.

Try to add "libirc.lib" to the linker explicitly.
The dir to "libirc.lib" is "C:Program FilesIntelCompiler11.1�38libia32".

Jennifer

0 Kudos
TimP
Honored Contributor III
1,397 Views
Your 11.1 compiler upgrade brought in updated libraries, which you must use. You would have to avoid linking against the older libraries. Your old objects should work compatibly with the new libraries, provided you haven't static linked the old ones. This can't be taken care of by the IDE directly, but it should be taken care of by correctly integrating the new compiler and using it for all links. If you have set PATH variables for the old compiler in the general Windows environment, it may be useful to remove them.
0 Kudos
JenniferJ
Moderator
1,397 Views
Yes, it's there.

C:Program FilesIntelCompiler11.1�38libia32
>>dumpbin /symbols libirc.lib|find /I "strlen"
faststrlen.c
005 00000000 SECT1 notype () External | ___intel_sse2_strlen
008 00000000 SECT2 notype () External | ___intel_sse4_strlen
027 00000000 UNDEF notype () External | _strlen
007 00000000 UNDEF notype () External | _strlen
017 00000000 UNDEF notype () External | _strlen

C:Program FilesIntelCompiler11.1�38libia32


Could you copy/paste your link command lines here?
Also paste the error msg.

Jennifer
0 Kudos
smithpd
Beginner
1,397 Views
Yes, it's there.

Could you copy/paste your link command lines here?
Also paste the error msg.

Jennifer


Jennifer,

OK. Command Line is below. But first....

Thinking that Tim18 had a point about interference with an older version of the Intel compiler (9.1 in my case), I just did the following to clean it up:
Reverted MSVS 2008 to use the Microsoft compiler;
Deinstalled 9.1 integration with MSVS;
Deinstalled 9.1 compiler;
Deinstalled 11.1 compiler (including integration);
Removed all folders under Program Files that had anything to do with Intel compilers, with the exception of the download extractions used for installing;
Looked at all Environment variables and deleted any items or path components that had anything to do with Intel compilers (in general, include, and link);
Deleted project.icproj from source;
Reinstalled Intel compiler 11.1 for IA32;
Went back into MSCV++;
Changed back to Intel compiler (note that the explicit path and name for libirc.lib were still there;
Rebuilt application, generating all new object files;
Got same error message as before.

The error message is:

Linking... (Intel C++ Environment)
xilink: executing 'link'
sinogram_generation.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
version.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
read_write_data.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
readinput.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
resize.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
sino_center.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
fft_recon.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
helical.obj : error LNK2019: unresolved external symbol ___intel_sse2_strlen referenced in function "public: __thiscall std::ios_base::failure::failure(class std::ios_base::failure const &)" (??0failure@ios_base@std@@QAE@ABV012@@Z)
main_recon.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
process_sino.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
backproject.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
calibrate.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
dualEnergy.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
feldkamp.obj : error LNK2001: unresolved external symbol ___intel_sse2_strlen
.Exes/hybrid_recon.exe : fatal error LNK1120: 1 unresolved externals

My Linker Command Line (with previous explicit references) is

ws2_32.lib mpi.lib libirc.lib sfftw.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /OUT:".Exes/hybrid_recon.exe" /INCREMENTAL:NO /nologo /LIBPATH:"C:Program FilesMPICH2Lib" /LIBPATH:"C:Program FilesIntelCompiler11.1�38libia32" /MANIFEST /MANIFESTFILE:"hybrid_reconhybrid_recon.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:PDS DataVC++ Projectsrecon_2.0k development 2008Exeshybrid_recon.lib" /MACHINE:X86

The above is for a complicated build configuration involving OpenMP and MPI. The Debug configuration below, which uses neither Openmp nor MPI, gives similar errors (fewer of them) and has the following command line (without the explicit references):

ws2_32.lib sfftw.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /OUT:".Exes/debug_recon.exe" /nologo /MANIFEST /MANIFESTFILE:"Debugdebug_recon.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"MSVCRT.LIB" /TLBID:1 /DEBUG /PDB:".Debug/recon.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /IMPLIB:"F:PDS DataVC++ Projectsrecon_2.0k development 2008Exesdebug_recon.lib" /MACHINE:X86

So, I get the same behavior with and without the explicit library entries, as I did before the cleanup.

Peter


0 Kudos
JenniferJ
Moderator
1,397 Views
Try this.

1. Select "Release" config
2. Open the project propety window, select "Link -> General"
2. Set "Show Progress" as "Displays Some Progress Messages (/VERBOSE:LIB)"
3. rebuild

Now please check where the "libirc.lib" is found. is it the same versionas the compiler version?

Jennifer
0 Kudos
smithpd
Beginner
1,397 Views
Try this.

1. Select "Release" config
2. Open the project propety window, select "Link -> General"
2. Set "Show Progress" as "Displays Some Progress Messages (/VERBOSE:LIB)"
3. rebuild

Now please check where the "libirc.lib" is found. is it the same versionas the compiler version?

Jennifer

That got it, Jennifer. :) It was finding two old 9.1 lib files, including"libirc.lib" in the root of the source code. I put them there for some reason a long time ago, and obviously that reason is no longer valid, if it ever was. So I deleted the old files, and now everything works. Thank you ever so much. Thanks also to Tim, who had the right idea.
0 Kudos
Rawlins__David
Beginner
1,397 Views

The symbol is defined in libirc.lib.

$nm /opt/intel/Compiler/11.1/038/lib/intel64/libirc.a | grep strlen
U strlen
U strlen
faststrlen.o:
0000000000000000 T __intel_sse2_strlen
0000000000000030 T __intel_sse4_strlen

Intel compiler driver will automatically include this. If you are not using icc or icpc then please include above library in linker command.

I'm having the same problem upgrading from 11.0.083 to 11.1.046 on a 64 bit Linux machine using icpc on the command line. Do I need to include libirc.a in the link command, and if so, why would I not have to include it in version 11.0.083?

Thanks,

Dave
0 Kudos
TimP
Honored Contributor III
1,397 Views
icc or icpc should include libirc automatically. Try adding the option -# You should be able to see that the library is searched, and whether it is the older version. I suspect you may have inadvertently set a path to the older one.
0 Kudos
Rawlins__David
Beginner
1,397 Views
Quoting - tim18
icc or icpc should include libirc automatically. Try adding the option -# You should be able to see that the library is searched, and whether it is the older version. I suspect you may have inadvertently set a path to the older one.

Thanks. I figured out that I was also linking to the ifcore library in the 11.0.081 version of the fortran compiler, which also has an irc library.

Dave
0 Kudos
max-divulskiy
Beginner
1,397 Views
At transition from 2010 to 2011 the studio, just insert the following pragma

[bash]#pragma comment (lib, "c:\Program Files (x86)\Intel\Parallel Studio 2011\Composer\compiler\lib\ia32\libirc.lib")[/bash]

0 Kudos
Reply