Linking the FIPS capable libraries to our code is proving to be a real pain
in the butt. The problem stems from the fact that long before I arrived it
was decided that everything is to be linked statically. So that means that
fipsld is needed. To compound things our code is c++ and compiled using g++,
but the fipspre_main.c has that wonderful little char array initialization
bug that g++ complains about. As a result I have had to run fipsld with gcc
and include all the c++ libraries to successfully compile and link the FIPS
libraries to our code. So far I have been successful only on my Mac using
"-lstdc++ " as gcc flags. On Linux I just can't seem to figure
out what libraries I am missing or if something else is at play.

So...

1) Has anyone else had experience needing to use gcc to link FIPS to c++
code and been successful and have insight into the issue.

2) Does fipsld have to be used or could I, within the spirit of the security
policy, make my own fipsld of sorts that compiles fipspre_main.c with gcc
and links with g++?

3) Am I better off compiling the FIPS capable libraries as shared and
re-working our code to work with those?

Here is a snippet of the errors I get. I have tried combinations of -lstdc++
-lm -lc -shared-libgcc. None of these fix the problem.

xxx.cpp:138: undefined reference to `__dynamic_cast'
xxx.cpp:172: undefined reference to `__dynamic_cast'
xxx.cpp:1282: undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string()'
xxx.cpp:1286: undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::operator+=(char const*)'
xxx.cpp:763: undefined reference to `operator delete(void*)'

Reply via email to