Unable to compile OneStep plugin on Solaris with error 'gcc: fatal: /usr/local/lib/libiconv.so.2: wrong ELF data format: ELFDATA2LSB'
2 years ago
Originally Published: 2008-09-10
Article Number
000043936
Applies To
RSA Certificate Manager 6.8
RSA Certificate Manager OneStep 6.8
Sun Solaris 10
GCC
Issue
Unable to compile OneStep plugin on Solaris with error "gcc: fatal: /usr/local/lib/libiconv.so.2: wrong ELF data format: ELFDATA2LSB"
The following error shows when attempting to compile a custom OneStep plug-in on Solaris:

ld.so.1: gcc: fatal: /usr/local/lib/libiconv.so.2: wrong ELF data format: ELFDATA2LSB
Cause
Solaris x86 version of the gcc libraries were loaded on Solaris UltraSparc machine
Resolution
Ensure that the correct version of the gcc libraries are loaded on Solaris UltraSparc machine.  Also note that gcc version 2.95.2 is supported with OneStep libraries.
Workaround
Used the following gcc command to compile custom plugin:

#/usr/local/bin/gcc -fPIC -c -g -DUNIX -DSOLARIS -DPSODEBUG -I. -I/opt/mywork/OneStep/include -I/opt/mywork/OneStep/myonestep/source/rcm_api/include -c mycode.c -o mycode.o