Re: [openssl-dev] Build issue

2017-07-28 Thread Benjamin Kaduk via openssl-dev
On 07/28/2017 01:22 AM, Matthew Stickney wrote:
> With a make distclean, ./config, make depend (didn't appear to do
> anything), and a make, I'm getting the essentially the same thing:
>
> Error: _num does not have a number assigned
> /usr/bin/perl ./util/mkrc.pl libcrypto-1_1-x64.dll | windres 
> --target=pe-x86-64
> -o rc.o
> LD_LIBRARY_PATH=: gcc -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS 
> -DOPENSSL_NO_STATIC
> _ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
> -DOPENSSL_BN_ASM
> _MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM 
> -DMD
> 5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM 
> -DPADLOCK
> _ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" 
> -DENGINESDIR="/usr/local/lib/e
> ngines-1_1" -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall 
> -O3
>  -D_MT -D_WINDLL -static-libgcc -shared -Wl,-Bsymbolic 
> -Wl,--out-implib,libcrypt
> o.dll.a crypto.def rc.o -o libcrypto-1_1-x64.dll -Wl,--whole-archive 
> libcrypto.a
>  -Wl,--no-whole-archive -lws2_32 -lgdi32 -lcrypt32
> Cannot export MD2: symbol not defined
> Cannot export MD2_Final: symbol not defined
> Cannot export MD2_Init: symbol not defined
> Cannot export MD2_Update: symbol not defined
> Cannot export MD2_options: symbol not defined
> Cannot export RC5_32_cbc_encrypt: symbol not defined
> Cannot export RC5_32_cfb64_encrypt: symbol not defined
> Cannot export RC5_32_decrypt: symbol not defined
> Cannot export RC5_32_ecb_encrypt: symbol not defined
> Cannot export RC5_32_encrypt: symbol not defined
> Cannot export RC5_32_ofb64_encrypt: symbol not defined
> Cannot export RC5_32_set_key: symbol not defined
> collect2.exe: error: ld returned 1 exit status
>

MD2 and RC5 are disabled by default, so it is expected that they will
not be defined.  It is hard to say whether those messages are the source
of the error exit status or just warnings, though.

It's certainly plausible that there are further mkdef.pl issues
responsible, though. Since mkdef.pl generates the crypto.def file
referenced on your link line, maybe you could post that somewhere and
link to it?  (mkdef.pl can also be used to generate .map files, but it
seems like the .def file is the relevant one at the moment.)

But I may have to defer to Richard for the workings of mkdef.pl itself...

-Ben
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] Build issue

2017-07-28 Thread Matthew Stickney
With a make distclean, ./config, make depend (didn't appear to do
anything), and a make, I'm getting the essentially the same thing:

Error: _num does not have a number assigned
/usr/bin/perl ./util/mkrc.pl libcrypto-1_1-x64.dll | windres --target=pe-x86-64
-o rc.o
LD_LIBRARY_PATH=: gcc -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC
_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM
_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD
5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK
_ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/e
ngines-1_1" -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall -O3
 -D_MT -D_WINDLL -static-libgcc -shared -Wl,-Bsymbolic -Wl,--out-implib,libcrypt
o.dll.a crypto.def rc.o -o libcrypto-1_1-x64.dll -Wl,--whole-archive libcrypto.a
 -Wl,--no-whole-archive -lws2_32 -lgdi32 -lcrypt32
Cannot export MD2: symbol not defined
Cannot export MD2_Final: symbol not defined
Cannot export MD2_Init: symbol not defined
Cannot export MD2_Update: symbol not defined
Cannot export MD2_options: symbol not defined
Cannot export RC5_32_cbc_encrypt: symbol not defined
Cannot export RC5_32_cfb64_encrypt: symbol not defined
Cannot export RC5_32_decrypt: symbol not defined
Cannot export RC5_32_ecb_encrypt: symbol not defined
Cannot export RC5_32_encrypt: symbol not defined
Cannot export RC5_32_ofb64_encrypt: symbol not defined
Cannot export RC5_32_set_key: symbol not defined
collect2.exe: error: ld returned 1 exit status

On Thu, Jul 27, 2017 at 11:54 PM, Blumenthal, Uri - 0553 - MITLL
 wrote:
> Instead of "make clean" try "make distclean", then reconfigure and rebuild 
> (don't forget "make depend").
>
> Regards,
> Uri
>
> Sent from my iPhone
>
>> On Jul 27, 2017, at 23:24, Matthew Stickney  wrote:
>>
>>> On Thu, Jul 27, 2017 at 3:29 PM, Richard Levitte  
>>> wrote:
>>> Have you tried a 'make clean' and then rebuild?
>>
>> Yep, and building from the 1.1.0 stable branch (failed with different
>> errors), and from a new master.
>>
>>> On Thu, Jul 27, 2017 at 3:24 PM, Benjamin Kaduk  wrote:
>>> Can you paste the actual linker invocation that is failing?
>>
>> I can certainly try. 'make 2>&1 1>build.log' doesn't seem to work
>> quite correctly under MSYS2, so I have a build log, and errors,
>> separately. This looks like the relevant part of the build log:
>> make -f ./Makefile.shared -e \
>>ECHO=echo \
>>PLATFORM=mingw64 \
>>PERL="/usr/bin/perl" SRCDIR='.' DSTDIR="." \
>>INSTALLTOP='/usr/local' LIBDIR='lib' \
>>LIBDEPS=' '""' -lws2_32 -lgdi32 -lcrypt32 ' \
>>LIBNAME=crypto SHLIBVERSION=1.1 \
>>STLIBNAME=libcrypto.a \
>>SHLIBNAME=libcrypto.dll.a SHLIBNAME_FULL=libcrypto-1_1-x64.dll \
>>CC='gcc' CFLAGS='-DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS
>> -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2
>> -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
>> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM
>> -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM
>> -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\""
>> -DENGINESDIR="\"/usr/local/lib/engines-1_1\"" -DL_ENDIAN
>> -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall -O3 -D_MT
>> -D_WINDLL' \
>>LDFLAGS='' SHARED_LDFLAGS='-static-libgcc ' \
>>RC='windres' SHARED_RCFLAGS='--target=pe-x86-64' \
>>link_shlib.mingw-shared
>> make[2]: Entering directory '/c/Users/mts/Desktop/openssl'
>> /usr/bin/perl ./util/mkrc.pl libcrypto-1_1-x64.dll | windres
>> --target=pe-x86-64 -o rc.o
>> LD_LIBRARY_PATH=: gcc -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS
>> -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2
>> -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
>> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM
>> -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM
>> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl"
>> -DENGINESDIR="/usr/local/lib/engines-1_1" -DL_ENDIAN
>> -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall -O3 -D_MT
>> -D_WINDLL -static-libgcc -shared -Wl,-Bsymbolic
>> -Wl,--out-implib,libcrypto.dll.a crypto.def rc.o -o
>> libcrypto-1_1-x64.dll -Wl,--whole-archive libcrypto.a
>> -Wl,--no-whole-archive -lws2_32 -lgdi32 -lcrypt32
>>
>> The error messages also contain these, which seem interesting:
>> Error: _num does not have a number assigned
>> Cannot export MD2: symbol not defined
>> Cannot export MD2_Final: symbol not defined
>> Cannot export MD2_Init: symbol not defined
>> Cannot export MD2_Update: symbol not defined
>> Cannot export MD2_options: symbol not defined
>> Cannot export RC5_32_cbc_encrypt: symbol not defined
>> Cannot export RC5_32_cfb64_encrypt: symbol not defined
>> Cannot export RC5_32_decrypt: symbol not