Topic
  • 2 replies
  • Latest Post - ‏2012-11-09T11:40:18Z by 78GF_Pavaman_Subramaniyam
GS97_Sujatha_Kashyap
1 Post

Pinned topic Problem with openssl header files with gcc (AT5.0) on SLES11.2

‏2012-11-07T19:22:53Z |
 Hi all,
     Wondering if anyone has encountered this issue before. This is from a customer I'm working with...any pointers would be appreciated.
 
As discussed, this is the problem we’re seeing when using the gcc in sles11.2:
 
-I/home/db2inst1/sqllib/include -c -o obj/ppc64-o/main.o main.cpp
In file included from /usr/include/openssl/objects.h:960,
                 from /usr/include/openssl/evp.h:98,
                 from /home/alext/mitsrc/mitsrc.git/Source/mtech_1/src/tech/Secure/libs/MCrypt/MD5Impl.h:35,
                 from main.cpp:6:
/usr/include/openssl/asn1.h:516: error: multiple types in one declaration
/usr/include/openssl/asn1.h:516: error: declaration does not declare anything
make[1]: *** [obj/ppc64-o/main.o] Error 1
make[1]: Leaving directory `/home/alext/mitsrc/mitsrc.git/Source/exch_7/src/app/TOOLS/components/ResetPassword'
make: *** [component.exch_7.app.TOOLS.ResetPassword] Error 2
 
The problem seems to be with the ASN1_BOOLEAN use at line 516 in asn1.h, and it seems that AS1_BOOLEAN has multiple declarations.  That type is either #defined or typedefed to an int depending on whether NO_ASN1_TYPEDEFS is set (choice in ossl_typ.h).  We do not set that def.   It’s strange that this is not a problem on x86 which has the same header files (I believe).
 
I tried with at5.0 as well, and get the same error. :
from /home/alext/mitsrc/mitsrc.git/Source/mtech_1/src/tech/Secure/libs/MCrypt/MD5Impl.h:35,
                 from main.cpp:6:
/opt/at5.0/include/openssl/asn1.h:527:17: error: multiple types in one declaration
/opt/at5.0/include/openssl/asn1.h:527:17: error: declaration does not declare anything [-fpermissive]
 
 
If I define “, NO_ASN1_TYPEDEFS 1”, I get more errors:
from /home/alext/mitsrc/mitsrc.git/Source/mtech_1/src/tech/Secure/libs/MCrypt/MD5Impl.h:36,
                 from main.cpp:6:
/opt/at5.0/include/openssl/asn1.h:520:1: error: redefinition of âstruct stack_st_ASN1_STRINGâ
/opt/at5.0/include/openssl/asn1.h:517:1: error: previous definition of âstruct stack_st_ASN1_STRINGâ
/opt/at5.0/include/openssl/asn1.h:527:17: error: multiple types in one declaration
/opt/at5.0/include/openssl/asn1.h:527:17: error: declaration does not declare anything [-fpermissive]
make: *** [obj/ppc64-o/main.o] Error 1
 
Updated on 2012-11-09T11:40:18Z at 2012-11-09T11:40:18Z by 78GF_Pavaman_Subramaniyam
  • pthaugen
    pthaugen
    1 Post

    Re: Problem with openssl header files with gcc (AT5.0) on SLES11.2

    ‏2012-11-08T19:46:11Z  
     Can you add "-save-temps" option to the compile command and look at the preprocessed .ii closer to see if that sheds any light. Or post the .ii here if possible. I've seen some posts that suggest it may be an issue with missing semicolon after a class/struct declaration. For example:
    class Foo{
    ...
    }
    int bar;
       
  • 78GF_Pavaman_Subramaniyam
    2 Posts

    Re: Problem with openssl header files with gcc (AT5.0) on SLES11.2

    ‏2012-11-09T11:40:18Z  
     Hi Sujatha,
     
    Could you try compiling the Main.cpp file with g++ compiler and check if this compiler gives the same error.
    As mentioned by Pat Haugen, may be there are missing semi-colons in some class declaration or structure declarations being used in the application headers.
     
    Also, could you try if there is a missing semi colon at the end of a forward declaration can cause this error:
    Ex:
    class A
    class B {}; 
     
    Regards,
    Pavaman.S