Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

rpath > 4096 chars causes segmentation fault

I'm trying to compile trilinos from a deep directory heirarchy and I ran into an issue where icpc generates a segmentation fault if the argument to -rpath is longer than 4096 characters.  This occurs with 15.0.5 and 16.0.3 for Linux. This problem can be reproduced with a toycode:

// hw.cc
#include <iostream>
int main() { std::cout << "Hello, world!" << std::endl; return 0; }

and a compile line like this

$ icpc hw.cc -Wl,-rpath,/path1:/path2:/...[4096 chars]
Segmentation fault (core dumped)

In my case the paths given to rpath are about 90 characters each and there are about 55 entries (~5000 chars). Shortening the rpath string to < 4096 eliminates the error. 

This seems like a bug. I think this artificial limitation should be increased or eliminated. 

 

 

0 Kudos
6 Replies
Highlighted
Black Belt
9 Views

Such limitation isn't under the control of Intel developers, as it pertains to the underlying tools provided by your platform.  Likewise, work-around would be the same as for gcc et al.

0 Kudos
Highlighted
Beginner
9 Views

Tim - Thank's for you input.  I'll work with my sysadmin on this issue.

 

0 Kudos
Highlighted
Employee
9 Views

 

I can't reproduce this on the system I am using. Like Tim suggested it could be a limitation of the "ld" on your system. Do you see the same problem is you say "ld -rpath /reallylongfilename hw.o"? If so the problem is the linker not the compiler.

0 Kudos
Highlighted
Employee
9 Views

 

Does your path name have a period in it?

We just got in a bug report with this description:

Compile any file:

$ icc -Wl,-rpath=.01234567891123456789212345678931234567894123456789512345678961234567897 hello.c
icc: internal error: Assertion failed (shared/driver/drvutils.c, line 209)

The combination of initial period and very long directory name causes the error.


Analysis:

The failure is occurring due to a check for an possible filename extension, and not expecting an extension of such great length.  The only options are what you requested and possibly a slight change to the directory.

•         Shorten the name
•         remove the '.'
•         add a '.' towards the end (.<long string>.<short string>)

0 Kudos
Highlighted
Beginner
9 Views

Judith,

My test case has several periods in the middle of a ~140 character path.  For example:

-Wl,-rpath,/usr/projects/draco/vendors/spack.ml.20160803/opt/spack/linux-redhat6-x86_64/intel-16.0.3/boost-1.61.0-bxys3tl5ggpnmrpts5z6inlrzeowo63e/lib:[plus ~40 more similar paths]

I've worked around the problem through the extensive use of symbolic links (not pretty, but it works).

-kt

 

0 Kudos
Highlighted
Employee
9 Views

 

ok  -- sorry for the inconvenience...

Judy

 

0 Kudos