I need helps and assistance on compiling boringssl for mingw i686 aka x86, the compilation stops at right here :
1 2 3 4 5 6 7 8 9 10 11 12 13
[ 50%] Building C object crypto/x509v3/CMakeFiles/x509v3.dir/v3_purp.c.obj
C:\msys64\home\Jenkins\boringssl\crypto\x509v3\v3_purp.c: In function 'setup_dp':
C:\msys64\home\Jenkins\boringssl\crypto\x509v3\v3_purp.c:376:16: error: 'iname' undeclared (first use in this function)
X509_NAME *iname = NULL;
^~~~~
C:\msys64\home\Jenkins\boringssl\crypto\x509v3\v3_purp.c:376:16: note: each undeclared identifier is reported only once for each function it appears in
C:\msys64\home\Jenkins\boringssl\crypto\x509v3\v3_purp.c: In function 'X509_check_akid':
C:\msys64\home\Jenkins\boringssl\crypto\x509v3\v3_purp.c:860:20: error: 'nm' undeclared (first use in this function)
X509_NAME *nm = NULL;
^~
mingw32-make[2]: *** [crypto\x509v3\CMakeFiles\x509v3.dir\build.make:763: crypto/x509v3/CMakeFiles/x509v3.dir/v3_purp.c.obj] Error 1
mingw32-make[1]: *** [CMakeFiles/Makefile2:2427: crypto/x509v3/CMakeFiles/x509v3.dir/all] Error 2
make: *** [Makefile:85: all] Error 2
which is refering to this code from "v3_purp.c" file :
int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname)
{
size_t i;
STACK_OF(X509_NAME_ENTRY) *frag;
X509_NAME_ENTRY *ne;
if (!dpn || (dpn->type != 1))
return 1;
frag = dpn->name.relativename;
dpn->dpname = X509_NAME_dup(iname);
if (!dpn->dpname)
return 0;
for (i = 0; i < sk_X509_NAME_ENTRY_num(frag); i++) {
ne = sk_X509_NAME_ENTRY_value(frag, i);
if (!X509_NAME_add_entry(dpn->dpname, ne, -1, i ? 0 : 1)) {
X509_NAME_free(dpn->dpname);
dpn->dpname = NULL;
return 0;
}
}
/* generate cached encoding of name */
if (i2d_X509_NAME(dpn->dpname, NULL) < 0) {
X509_NAME_free(dpn->dpname);
dpn->dpname = NULL;
return 0;
}
return 1;
}
the "v3_purp.c" file already include the "openssl/x509v3.h" file which contains the function definition of "int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname)" which defined like this :
OPENSSL_EXPORT int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname);
The compilation made with gcc 6.3.0 and g++ 6.3.0, what i have done wrong?
can't reproduce your issue.
downloaded from https://boringssl.googlesource.com/boringssl 2017/04/15 (master branch), but the line numbers don't match yours. either try latest version or provide a link to yours.
> error: 'iname' undeclared (first use in this function)
> X509_NAME *iname = NULL;
it baffles me that it complains about `iname', but not about `X509_NAME'. So it has a declaration for X509_NAME, but for some reason it is not a class/struct