[Bug 228970] security/krb5: building with libressl 2.7 results in invalid implicit declarations in C99

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jun 12 22:20:15 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228970

            Bug ID: 228970
           Summary: security/krb5: building with libressl 2.7 results in
                    invalid implicit declarations in C99
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: cy at FreeBSD.org
          Reporter: ml+freebsd at vishwin.info
          Assignee: cy at FreeBSD.org
             Flags: maintainer-feedback?(cy at FreeBSD.org)

After bug 228900 was fixed in ports r472227, the following errors are emitted
when building with ssl=libressl or ssl=libressl-devel set in make.conf:

cc -fpic -DSHARED -DHAVE_CONFIG_H  -I../../../include -I../../../include 
-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/usr/local/include -I/usr/local/include
-isystem /usr/local/include -O2 -pipe -march=broadwell  -fstack-protector
-isystem /usr/local/include -fno-strict-aliasing -std=gnu99
-Werror=unknown-warning-option -Wall -Wcast-align -Wshadow -Wmissing-prototypes
-pedantic -Wno-format-zero-length -Woverflow -Wstrict-overflow
-Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces
-Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable
-Wunused-value -Wunknown-pragmas -Wsign-compare -Wnewline-eof
-Werror=uninitialized -Werror=pointer-arith -Werror=int-conversion
-Werror=incompatible-pointer-types -Werror=implicit-int
-Werror=declaration-after-statement -Werror-implicit-function-declaration
-pthread  -c pkinit_crypto_openssl.c -o pkinit_crypto_openssl.so.o && mv -f
pkinit_crypto_openssl.so.o pkinit_crypto_openssl.so
rm -f ../pkinit.so
(cd .. && ln -s `basename plugins/preauth/pkinit`/pkinit.so .)
pkinit_crypto_openssl.c:3119:5: error: implicit declaration of function
'M_ASN1_D2I_vars' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_vars(a, DH *, DH_new);
    ^
pkinit_crypto_openssl.c:3119:24: error: unexpected type name 'DH': expected
expression
    M_ASN1_D2I_vars(a, DH *, DH_new);
                       ^
pkinit_crypto_openssl.c:3119:28: error: expected expression
    M_ASN1_D2I_vars(a, DH *, DH_new);
                           ^
pkinit_crypto_openssl.c:3121:5: error: implicit declaration of function
'M_ASN1_D2I_Init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_Init();
    ^
pkinit_crypto_openssl.c:3121:5: note: did you mean 'M_ASN1_D2I_vars'?
pkinit_crypto_openssl.c:3119:5: note: 'M_ASN1_D2I_vars' declared here
    M_ASN1_D2I_vars(a, DH *, DH_new);
    ^
pkinit_crypto_openssl.c:3122:5: error: implicit declaration of function
'M_ASN1_D2I_start_sequence' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_start_sequence();
    ^
pkinit_crypto_openssl.c:3126:5: error: implicit declaration of function
'M_ASN1_D2I_get_x' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_get_x(ASN1_INTEGER, aip, d2i_ASN1_INTEGER);
    ^
pkinit_crypto_openssl.c:3126:22: error: unexpected type name 'ASN1_INTEGER':
expected expression
    M_ASN1_D2I_get_x(ASN1_INTEGER, aip, d2i_ASN1_INTEGER);
                     ^
pkinit_crypto_openssl.c:3130:9: error: use of undeclared identifier 'ret'
        ret->p = ASN1_INTEGER_to_BN(aip, NULL);
        ^
pkinit_crypto_openssl.c:3131:13: error: use of undeclared identifier 'ret'
        if (ret->p == NULL)
            ^
pkinit_crypto_openssl.c:3139:22: error: unexpected type name 'ASN1_INTEGER':
expected expression
    M_ASN1_D2I_get_x(ASN1_INTEGER, aip, d2i_ASN1_INTEGER);
                     ^
pkinit_crypto_openssl.c:3143:9: error: use of undeclared identifier 'ret'
        ret->g = ASN1_INTEGER_to_BN(aip, NULL);
        ^
pkinit_crypto_openssl.c:3144:13: error: use of undeclared identifier 'ret'
        if (ret->g == NULL)
            ^
pkinit_crypto_openssl.c:3153:5: error: implicit declaration of function
'M_ASN1_D2I_get_opt' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_get_opt(aip, d2i_ASN1_INTEGER, V_ASN1_INTEGER);
    ^
pkinit_crypto_openssl.c:3153:5: note: did you mean 'M_ASN1_D2I_get_x'?
pkinit_crypto_openssl.c:3126:5: note: 'M_ASN1_D2I_get_x' declared here
    M_ASN1_D2I_get_x(ASN1_INTEGER, aip, d2i_ASN1_INTEGER);
    ^
pkinit_crypto_openssl.c:3155:9: error: use of undeclared identifier 'ret'
        ret->q = NULL;
        ^
pkinit_crypto_openssl.c:3157:9: error: use of undeclared identifier 'ret'
        ret->q = ASN1_INTEGER_to_BN(aip, NULL);
        ^
pkinit_crypto_openssl.c:3158:13: error: use of undeclared identifier 'ret'
        if (ret->q == NULL)
            ^
pkinit_crypto_openssl.c:3167:5: error: implicit declaration of function
'M_ASN1_D2I_end_sequence' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_end_sequence();
    ^
pkinit_crypto_openssl.c:3167:5: note: did you mean 'M_ASN1_D2I_start_sequence'?
pkinit_crypto_openssl.c:3122:5: note: 'M_ASN1_D2I_start_sequence' declared here
    M_ASN1_D2I_start_sequence();
    ^
pkinit_crypto_openssl.c:3168:5: error: implicit declaration of function
'M_ASN1_D2I_Finish' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    M_ASN1_D2I_Finish(a, DH_free, 0);
    ^
pkinit_crypto_openssl.c:3168:5: note: did you mean 'M_ASN1_D2I_Init'?
pkinit_crypto_openssl.c:3121:5: note: 'M_ASN1_D2I_Init' declared here
    M_ASN1_D2I_Init();
    ^
18 errors generated.
gmake[2]: *** [Makefile:823: pkinit_crypto_openssl.so] Error 1
gmake[2]: Leaving directory
'/wrkdirs/usr/ports/security/krb5/work/krb5-1.16.1/src/plugins/preauth/pkinit'
gmake[1]: *** [Makefile:1524: all-recurse] Error 1
gmake[1]: Leaving directory
'/wrkdirs/usr/ports/security/krb5/work/krb5-1.16.1/src'

I've produced this error on 12-CURRENT and 11.1-RELEASE, both amd64. Building
with any of the OpenSSL values works as intended.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list