Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Why is libcxa linked dynamically?

mbkennel
Beginner
405 Views

If you do not specify the -static option, then according to the Intel documentation, libcxa will nevertheless be linked in dynamically.

This is a significnatly problem if I want to run binaries on another machine. In particular, it makes it much more difficult to run on our MOSIX cluster where Intel Fortran isn't installed (too much administrative hassle).

But adding -static links in everything statically including libc and libm. That is silly too.

In addition it makes it very hard to use ifc to compile MEX files for direct linking into MATLAB, where using -static is not going to work. I eventually hacked my mexopts.sh into doing this but it was a real pain as I had to guess what .a files to link in manually in what order. Oy vey.

In my opinion the right answer is to have three modes (as I believe NAG does).

1. Link all libraries, including Intel supplied libraries, dynamically.

2. Link dynamically ONLY those operating-system provided standard libraries which are universally available, i.e. libc and libm.

3. Link everything statically.

0 Kudos
1 Reply
Intel_C_Intel
Employee
405 Views

-static-libcxa: Link the libcxa library statically.

This will avoid linking libcxa dynamically.

I pulled this answer out of a previous forum post.

I believe this option was not in the initial 7 release, but added later.

Hope this helps.
0 Kudos
Reply