NERSCPowering Scientific Discovery Since 1974

The cce/8.3.0 C++ compiler may run into a linking error on Edison

July 1, 2014

You may run into the following linking error with C++ codes using cce/8.3.0, the default Cray compiler, on Edison.

zz217@edison02:~/tests/codes> CC phello.C
/opt/cray/cce/8.3.0/CC/x86-64/lib/x86-64/libcray-c++-rts.a(rtti.o): In function `__cxa_bad_typeid':
/ptmp/ulib/buildslaves/cfe-83-edition-build/tbs/cfe/lib_src/rtti.c:1062: multiple definition of `__cxa_bad_typeid'
/opt/cray/cce/8.3.0/CC/x86-64/lib/x86-64/libcraystdc++.a(eh_aux_runtime.o):eh_aux_runtime.cc:(.text.__cxa_bad_typeid+0x0): first defined here
/opt/cray/cce/8.3.0/CC/x86-64/lib/x86-64/libcray-c++-rts.a(rtti.o): In function `__cxa_bad_cast':
/ptmp/ulib/buildslaves/cfe-83-edition-build/tbs/cfe/lib_src/rtti.c:1042: multiple definition of `__cxa_bad_cast'
/opt/cray/cce/8.3.0/CC/x86-64/lib/x86-64/libcraystdc++.a(eh_aux_runtime.o):eh_aux_runtime.cc:(.text.__cxa_bad_cast+0x0): first defined here
/opt/cray/cce/8.3.0/cray-binutils/bin/ld: link errors found, deleting executable `a.out'

We have filed a bug with Cray. Until Cray fixes this, please add the following option in your compile line,

-Wl,-zmuldefs