-Wl,-rpath crashes icpc

-Wl,-rpath crashes icpc

ICC 10.1.013 on Linux x86_64

To replicate problem:

$ cat > scratch.cpp
int main() {}


$ icpc scratch.o -o scratch
$ icpc scratch.o -Wl,-rpath /usr/local/lib -o scratch
(0): internal error: backend signals

icpc: error #10014: problem during multi-file optimization compilation (code 4)

Note that `/usr/local/lib' was just for demonstration; any directory (that exists) has the same effect. Using alternative options to pass -rpath to the linker (e.g. -Qoption,link -Xlinker) doesn't help.

If the compile and link are specified on one line this does not happen:

$ icpc scratch.cpp -Wl,-rpath /usr/local/lib -o scratch

is OK.

This problem goes back to ver 9.0 (and possibly earlier) as I recall.

Any help appreciated,

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Nobody seen anything like this before?

Any ideas what could cause errors like

(0): internal error: backend signals

icpc: error #10014: problem during multi-file optimization compilation (code 4)

Any suggested workarounds (setting LD_LIBRARY_PATH won't do it for my current setup)?

It's a total show-stopper for me... due to my system setup I need to be able to use -rpath.

You're right, it's easy to reproduce the problem. I'll look into it and let you know what I find.


OK there are at least two problems. One is that we fail with an internal error. I've been assured that this will be fixed in a future release.

The second problem is a problem with the command line as it is written. When using the -Wl to pass things to the linker, the separate elements need to be comma delimited, i.e. instead of this:

icpc scratch.o -Wl,-rpath /usr/local/lib -o scratch

it should be this:

icpc scratch.o -Wl,-rpath,/usr/local/lib -o scratch

That seems to work for me. Let me know if your results differ.



Dale, at least in Windows "," is a valid filename character (and so is ";"). What happens to your command line parser if one has a filename with "," in it?

Igor Levicki

I believe that the -Wl switch is specific to Linux and Mac, at least for our compiler. I believe this is consistent with gcc. I don't think I've ever seen a library name or path with a comma or semicolon in it, but there are many life experiences I have yet to enjoy.

If you really need a library path with a ',' or ';' in it, we can burn that bridge when we come to it :-)


There is an equivalent in Windows in the form of "-Qlocation,link" switch. Of course, one can always rename the file later if they need "," in the name, I was just pointing out that the separator character should not be a valid filename character or someone sometimes might complain about it.

Igor Levicki

This issue has been fixed in 11.0.069. Just FYI.
$ icc -V
Intel C Compiler Professional for applications running on IA-32, Version 11.0 Build 20080930 Package ID: l_cproc_p_11.0.069
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
$ icpc hello.o -Wl,-rpath /usr/local/lib -o hello

Leave a Comment

Please sign in to add a comment. Not a member? Join today