The compiler error about modifying libcrypto

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The compiler error about modifying libcrypto

Nan Xiao
Hi misc@,

Greeting from me!

My OS is OpenBSD 6.3. Since now the -current modify the interface of
libcrypto, there is error in "make":
......
===> lib/libcrypto
cc -O2 -pipe -g -Wall -Wundef -Werror -DLIBRESSL_INTERNAL -DDSO_DLFCN
-DHAVE_DLFCN_H -DHAVE_FUNOPEN -DOPENSSL_NO_HW_PADLOCK
-I/usr/src/lib/libcrypto -I/usr/src/lib/libcrypto/asn1
-I/usr/src/lib/libcrypto/bn -I/usr/src/lib/libcrypto/evp
-I/usr/src/lib/libcrypto/modes -I/usr/src/lib/libcrypto/obj -DAES_ASM
-DBSAES_ASM -DVPAES_ASM -DOPENSSL_IA32_SSE2 -DRSA_ASM
-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
-DMD5_ASM -DGHASH_ASM -DRC4_MD5_ASM -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DWHIRLPOOL_ASM -DOPENSSL_CPUID_OBJ  -MD -MP  -MD -MP  -c
/usr/src/lib/libcrypto/evp/p_lib.c -o p_lib.o
/usr/src/lib/libcrypto/evp/p_lib.c:96:1: error: conflicting types for
'EVP_PKEY_size'
EVP_PKEY_size(const EVP_PKEY *pkey)
^
/usr/include/openssl/evp.h:871:5: note: previous declaration is here
int EVP_PKEY_size(EVP_PKEY *pkey);
    ^
1 error generated.
*** Error 1 in lib/libcrypto (<bsd.lib.mk>:41 'p_lib.o': @cc -O2 -pipe
-g -Wall -Wundef -Werror -DLIBRESSL_INTERNAL -DDSO_DLFCN
-DHAVE_DLFCN...)
*** Error 1 in lib (<bsd.subdir.mk>:48 'all')
*** Error 1 in /usr/src (<bsd.subdir.mk>:48 'all')
......

The compiler searches "/usr/include/openssl" first, so is there any
method to let compiler uses "/usr/src/lib/libcrypto/evp" as first
search path?

Thanks in advance!

Best Regards
Nan Xiao

Reply | Threaded
Open this post in threaded view
|

Re: The compiler error about modifying libcrypto

Theo Buehler-5
On Thu, May 31, 2018 at 10:50:35AM +0800, Nan Xiao wrote:
> My OS is OpenBSD 6.3.

-current?

If not, please install the latest snapshot before trying to build
-current from source.

See also https://www.openbsd.org/faq/current.html

>                       Since now the -current modify the interface of
> libcrypto, there is error in "make":
> ......
> ===> lib/libcrypto

Don't do "make" from /usr/src.

Please read https://man.openbsd.org/release.8 and follow at least
up through step 3.

If you have things prepared as described in release(8) and you do
"make build", it will do "make includes" and install the current
headers, thus preventing the compilation failure you ran into.

Reply | Threaded
Open this post in threaded view
|

Re: The compiler error about modifying libcrypto

Nan Xiao
Hi Theo,

Thanks for your kind reply!
Best Regards
Nan Xiao


On Thu, May 31, 2018 at 7:24 PM, Theo Buehler <[hidden email]> wrote:

> On Thu, May 31, 2018 at 10:50:35AM +0800, Nan Xiao wrote:
>> My OS is OpenBSD 6.3.
>
> -current?
>
> If not, please install the latest snapshot before trying to build
> -current from source.
>
> See also https://www.openbsd.org/faq/current.html
>
>>                       Since now the -current modify the interface of
>> libcrypto, there is error in "make":
>> ......
>> ===> lib/libcrypto
>
> Don't do "make" from /usr/src.
>
> Please read https://man.openbsd.org/release.8 and follow at least
> up through step 3.
>
> If you have things prepared as described in release(8) and you do
> "make build", it will do "make includes" and install the current
> headers, thus preventing the compilation failure you ran into.