Re: Undefined reference to 'FIPS_text_start()'
I have seen Dr. Stephen's reply in this thread http://www.mail-archive.com/openssl-users@openssl.org/msg63620.html, that fipsld can be modified as long as it follows rules in the security policy. On 11/26/12 4:30 PM, "Santhosh Kokala" wrote: >Thanks Dr. Stephen and Andy for helping me resolve this issue. I modified >fipsld script to use gcc for compiling fips_premain.c and it worked. > >On 11/25/12 1:42 PM, "Andy Polyakov" wrote: > >>Santhosh Kokala wrote: >>> I would really appreciate, if someone helps me with this issue. >> >>Why not just think for a second? >> >>>>> export FIPSLD_CC=g++ >>>>> export CC=gcc >> >>means that it's using g++ to compile fips_premain.c. FIPSLD_CC takes >>precedence over CC in fipsld: CC=${FIPSLD_CC:-${CC}} >> >>>>> export CXX=/usr/local/ssl/fips-2.0/bin/fipsld >>>>> >>>>> Build Errors: >>>>> >>>>> >>>>> /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': >>>>> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined >>>>> reference >>>>> to `FIPS_text_start()' >>>>> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined >>>>> reference >>>>> to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' >> >>So try to compile fips_premain.c manually with g++ and run 'nm >>fips_premain.o'. Note undefined symbols and try to find them in >>fipscanister.o. This answers question what's going on. With this answer >>you can also determine what to do. Setting FIPSLD_CC to gcc shall >>compile fips_premain.c correctly, but it might fail to link with rest of >>your code, because g++ driver adds language-specific libraries [and >>linker options]. Therefore there are two options. a) Set FIPSLD_CC to >>gcc, figure out language-specific libraries [and linker options] and >>explicitly add them to fipsld command line. b) Make g++ treat >>fips_premain.c as C and not C++, e.g. by setting FIPSLD_CC to "g++ -x c". >>__ >>OpenSSL Project http://www.openssl.org >>Development Mailing List openssl-...@openssl.org >>Automated List Manager majord...@openssl.org > >__ >OpenSSL Project http://www.openssl.org >Development Mailing List openssl-...@openssl.org >Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Undefined reference to 'FIPS_text_start()'
Thanks Dr. Stephen and Andy for helping me resolve this issue. I modified fipsld script to use gcc for compiling fips_premain.c and it worked. On 11/25/12 1:42 PM, "Andy Polyakov" wrote: >Santhosh Kokala wrote: >> I would really appreciate, if someone helps me with this issue. > >Why not just think for a second? > >>>> export FIPSLD_CC=g++ >>>> export CC=gcc > >means that it's using g++ to compile fips_premain.c. FIPSLD_CC takes >precedence over CC in fipsld: CC=${FIPSLD_CC:-${CC}} > >>>> export CXX=/usr/local/ssl/fips-2.0/bin/fipsld >>>> >>>> Build Errors: >>>> >>>> >>>> /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': >>>> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined >>>> reference >>>> to `FIPS_text_start()' >>>> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined >>>> reference >>>> to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' > >So try to compile fips_premain.c manually with g++ and run 'nm >fips_premain.o'. Note undefined symbols and try to find them in >fipscanister.o. This answers question what's going on. With this answer >you can also determine what to do. Setting FIPSLD_CC to gcc shall >compile fips_premain.c correctly, but it might fail to link with rest of >your code, because g++ driver adds language-specific libraries [and >linker options]. Therefore there are two options. a) Set FIPSLD_CC to >gcc, figure out language-specific libraries [and linker options] and >explicitly add them to fipsld command line. b) Make g++ treat >fips_premain.c as C and not C++, e.g. by setting FIPSLD_CC to "g++ -x c". >__ >OpenSSL Project http://www.openssl.org >Development Mailing List openssl-...@openssl.org >Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Undefined reference to 'FIPS_text_start()'
Santhosh Kokala wrote: I would really appreciate, if someone helps me with this issue. Why not just think for a second? export FIPSLD_CC=g++ export CC=gcc means that it's using g++ to compile fips_premain.c. FIPSLD_CC takes precedence over CC in fipsld: CC=${FIPSLD_CC:-${CC}} export CXX=/usr/local/ssl/fips-2.0/bin/fipsld Build Errors: /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined reference to `FIPS_text_start()' /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined reference to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' So try to compile fips_premain.c manually with g++ and run 'nm fips_premain.o'. Note undefined symbols and try to find them in fipscanister.o. This answers question what's going on. With this answer you can also determine what to do. Setting FIPSLD_CC to gcc shall compile fips_premain.c correctly, but it might fail to link with rest of your code, because g++ driver adds language-specific libraries [and linker options]. Therefore there are two options. a) Set FIPSLD_CC to gcc, figure out language-specific libraries [and linker options] and explicitly add them to fipsld command line. b) Make g++ treat fips_premain.c as C and not C++, e.g. by setting FIPSLD_CC to "g++ -x c". __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Undefined reference to 'FIPS_text_start()'
On Sat, Nov 24, 2012, Santhosh Kokala wrote: > I would really appreciate, if someone helps me with this issue. Firstly if your application can use the shared library then just link against that: there is no need to use fipsld at all. If you must use static libraries then you should ensure that the linker phase is calling fipsld. How you do that depends on the application, if it is using g++ then you call fipsld instead, if you are using gcc for the linking you'd use it there. So perhaps CC=fipsld will work for you? Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
RE: Undefined reference to 'FIPS_text_start()'
I would really appreciate, if someone helps me with this issue. From: owner-openssl-...@openssl.org [owner-openssl-...@openssl.org] on behalf of Santhosh Kokala [santhosh.kok...@riverbed.com] Sent: Wednesday, November 21, 2012 11:33 AM To: openssl-users@openssl.org Cc: openssl-...@openssl.org Subject: Re: Undefined reference to 'FIPS_text_start()' Jeffrey, This still did not fix my issue. Any other ideas? Santhosh On 11/20/12 4:14 PM, "Jeffrey Walton" wrote: >On Tue, Nov 20, 2012 at 6:16 PM, Santhosh Kokala > wrote: >> Hi, >> I am trying to build an application with the FIPS Object module. I >>followed >> the build instructions mentioned in FIPS User Guide 2.0. >> >> FIPS Object Module: >> >> ./config >> Make >> make install >> >> Open SSL: >> >> ./config fips >> make depend >> Make >> >> My Application: >> >> export FIPSLD_CC=g++ >> export CC=gcc >> export CXX=/usr/local/ssl/fips-2.0/bin/fipsld >> >> Build Errors: >> >> >> /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': >> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined >>reference >> to `FIPS_text_start()' >> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined >>reference >> to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' >Add fipscanister.o to the link phase/ > >Jeff >__ >OpenSSL Project http://www.openssl.org >User Support Mailing Listopenssl-users@openssl.org >Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-...@openssl.org Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Undefined reference to 'FIPS_text_start()'
Jeffrey, This still did not fix my issue. Any other ideas? Santhosh On 11/20/12 4:14 PM, "Jeffrey Walton" wrote: >On Tue, Nov 20, 2012 at 6:16 PM, Santhosh Kokala > wrote: >> Hi, >> I am trying to build an application with the FIPS Object module. I >>followed >> the build instructions mentioned in FIPS User Guide 2.0. >> >> FIPS Object Module: >> >> ./config >> Make >> make install >> >> Open SSL: >> >> ./config fips >> make depend >> Make >> >> My Application: >> >> export FIPSLD_CC=g++ >> export CC=gcc >> export CXX=/usr/local/ssl/fips-2.0/bin/fipsld >> >> Build Errors: >> >> >> /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': >> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined >>reference >> to `FIPS_text_start()' >> /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined >>reference >> to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' >Add fipscanister.o to the link phase/ > >Jeff >__ >OpenSSL Project http://www.openssl.org >User Support Mailing Listopenssl-users@openssl.org >Automated List Manager majord...@openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Undefined reference to 'FIPS_text_start()'
On Tue, Nov 20, 2012 at 6:16 PM, Santhosh Kokala wrote: > Hi, > I am trying to build an application with the FIPS Object module. I followed > the build instructions mentioned in FIPS User Guide 2.0. > > FIPS Object Module: > > ./config > Make > make install > > Open SSL: > > ./config fips > make depend > Make > > My Application: > > export FIPSLD_CC=g++ > export CC=gcc > export CXX=/usr/local/ssl/fips-2.0/bin/fipsld > > Build Errors: > > > /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': > /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined reference > to `FIPS_text_start()' > /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined reference > to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' Add fipscanister.o to the link phase/ Jeff __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Undefined reference to 'FIPS_text_start()'
Hi, I am trying to build an application with the FIPS Object module. I followed the build instructions mentioned in FIPS User Guide 2.0. FIPS Object Module: ./config Make make install Open SSL: ./config fips make depend Make My Application: export FIPSLD_CC=g++ export CC=gcc export CXX=/usr/local/ssl/fips-2.0/bin/fipsld Build Errors: /tmp/cczHeW7i.o: In function `FINGERPRINT_premain()': /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:103: undefined reference to `FIPS_text_start()' /usr/local/ssl/fips-2.0/bin/../lib/fips_premain.c:116: undefined reference to `FIPS_incore_fingerprint(unsigned char*, unsigned int)' So my question is, How to fix these errors? Santhosh