Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl/asn1.h header redefinitions in Storm C 4 #47

Open
ThoughtCheese72 opened this issue Nov 30, 2020 · 5 comments
Open

openssl/asn1.h header redefinitions in Storm C 4 #47

ThoughtCheese72 opened this issue Nov 30, 2020 · 5 comments
Labels

Comments

@ThoughtCheese72
Copy link

Hi all,
When including openssl/asn1.h from AmiSSL 4.6 in a project, the compilation fails with many errors "Identifier... redefined". This is using the Stormc 4 compiler with the target as AmigaOS3. I also have errors using their GCC mode

11.Workbench:> stormc:stormsys/stormc webclientclass.c
StormC:include/openssl/asn1.h, Line 482, Col. 1:
Fehler 50: Identifier "ASN1_SEQUENCE_ANY" redefined.
StormC:include/openssl/asn1.h, Line 521, Col. 1:
Fehler 50: Identifier "ASN1_TYPE" redefined.
StormC:include/openssl/asn1.h, Line 521, Col. 1:
Fehler 50: Identifier "ASN1_TYPE" redefined.
StormC:include/openssl/asn1.h, Line 537, Col. 1:
Fehler 50: Identifier "ASN1_OBJECT" redefined.
StormC:include/openssl/asn1.h, Line 560, Col. 1:
Fehler 50: Identifier "ASN1_BIT_STRING" redefined.
StormC:include/openssl/asn1.h, Line 560, Col. 1:
Fehler 50: Identifier "ASN1_BIT_STRING" redefined.
StormC:include/openssl/asn1.h, Line 560, Col. 1:
Fehler 50: Identifier "ASN1_BIT_STRING" redefined.
StormC:include/openssl/asn1.h, Line 573, Col. 1:
Fehler 50: Identifier "ASN1_INTEGER" redefined.
StormC:include/openssl/asn1.h, Line 573, Col. 1:
Fehler 50: Identifier "ASN1_INTEGER" redefined.
StormC:include/openssl/asn1.h, Line 573, Col. 1:
Fehler 50: Identifier "ASN1_INTEGER" redefined.
StormC:include/openssl/asn1.h, Line 579, Col. 1:
Fehler 50: Identifier "ASN1_ENUMERATED" redefined.
StormC:include/openssl/asn1.h, Line 579, Col. 1:
Fehler 50: Identifier "ASN1_ENUMERATED" redefined.
StormC:include/openssl/asn1.h, Line 579, Col. 1:
Fehler 50: Identifier "ASN1_ENUMERATED" redefined.
StormC:include/openssl/asn1.h, Line 599, Col. 1:
Fehler 50: Identifier "ASN1_OCTET_STRING" redefined.
StormC:include/openssl/asn1.h, Line 599, Col. 1:
Fehler 50: Identifier "ASN1_OCTET_STRING" redefined.
StormC:include/openssl/asn1.h, Line 599, Col. 1:
Fehler 50: Identifier "ASN1_OCTET_STRING" redefined.
StormC:include/openssl/asn1.h, Line 606, Col. 1:
Fehler 50: Identifier "ASN1_VISIBLESTRING" redefined.
StormC:include/openssl/asn1.h, Line 606, Col. 1:
Fehler 50: Identifier "ASN1_VISIBLESTRING" redefined.
StormC:include/openssl/asn1.h, Line 606, Col. 1:
Fehler 50: Identifier "ASN1_VISIBLESTRING" redefined.
StormC:include/openssl/asn1.h, Line 607, Col. 1:
Fehler 50: Identifier "ASN1_UNIVERSALSTRING" redefined.

Is there a fix or workaround for it?

Thanks!

@Futaura
Copy link
Collaborator

Futaura commented Nov 30, 2020

First, ensure you don't have any conflicting includes installed - if regular OpenSSL includes are in the include search path, as well as the AmiSSL variants, this will cause problems.

Also, try including openssl/ossl_typ.h first or including amissl/amissl.h instead of individual includes.

@ThoughtCheese72
Copy link
Author

Hi, I used the includes in the same was as the example https.c - I think there were three of them and the first was amissl.h. By experience, I included asn1.h on its' own just to see if there were conflicting definitions. I have not had any other implementation of openSSL before this one and the includes folder contained strictly the "shipped" StormC includes. I think I had to drop an inttypes.h in from a previous project to get to this point.

@Futaura
Copy link
Collaborator

Futaura commented Dec 14, 2020

Hmmm... I've been looking into this, but don't really know what to suggest as I don't have StormC. All I know is that I have the AmiSSL includes working fine with GCC and SAS/C. For SAS/C I think I had to modify or replace sys/types.h with something newer.

@ThoughtCheese72
Copy link
Author

Hmmm... I've been looking into this, but don't really know what to suggest as I don't have StormC. All I know is that I have the AmiSSL includes working fine with GCC and SAS/C. For SAS/C I think I had to modify or replace sys/types.h with something newer.

Thanks for looking, everyone. I thought Storm was the default platform for Amiga development, but I think it may be fun and profitable to cross-compile in VBCC or give GCC a try. It never occurred to me how different the all of these compilers and pre-processors are with respect to the format and syntax they'll accept.

@Futaura
Copy link
Collaborator

Futaura commented Dec 17, 2020

@ThoughtCheese72 Well, if there is anything I can do to make the AmiSSL includes more compatible with StormC, I'm happy to do so. It's just the the error messages given don't seem to point to the root cause, so it is a little hard to debug without owning it. It could be something as simple as a missing type. I would have thought StormC in GCC mode would be fine with the includes, assuming there are no missing types in the standard StormC includes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants