Re: Build issue

Matthew Stickney <[email protected]>
Newsgroups gmane.comp.encryption.openssl.devel
Message-ID <CAKH_Ld5K49i9v5-k_vXTMGREYo5nnaL43hAKuqcUtNLfq6jJpg@mail.gmail.com>
I swear I sent my last reply to the list; either my mail client is
messing with me, or I'm going crazy. There's no reason for this to be
off-list, and that wasn't my intention in the first place.

Anyhow: util/libcrypto.num doesn't seem to have anything unusual in it
associated with '_num', so that's fine, but then neither does
crypto.def, so it seems like it's not an issue with util/mkdef.pl. I
mean, obviously the error is /somewhere/....

-Matt Stickney

On Mon, Jul 31, 2017 at 10:22 AM, Matthew Stickney <[email protected]> wrote:
> Thanks for the suggestion, and my apologies: I didn't intend to take
> this off-list. I'll check libcrypto.num when I get back on the machine
> tonight. If it helps, I am building this with 64-bit mingw, but I
> don't see how that would have an effect (there are build warnings
> earlier in the process, but from what I've seen they look harmless).
>
> -Matt Stickney
>
> On Mon, Jul 31, 2017 at 10:17 AM, Richard Levitte <[email protected]> wrote:
>> util/mkdef.pl picks up all the data from configdata.pm, and regarding
>> options, it looks at $config{options}, which includes everything
>> that's disabled by default.
>>
>> This all is an issue that I'm currently labeling *weird*, 'cause it
>> makes no sense at all.  Most of all, this line really has me gawking,
>> scratching my head and generally looking silly:
>>
>>     Error: _num does not have a number assigned
>>
>> Basically, it looks like *something* is getting ba-a-a-a-dly parsed,
>> and I have no idea if that's in util/libcrypto.num (could you try and
>> grep for '_num' and possibly '^_num' to see if you can find something
>> weird?) or if it's a serious corner case cock up in util/mkdef.pl.
>>
>> Worst thing is, I haven't been able to reproduce...  I am going to try
>> again just now, with the hope that 32-bit mingw doesn't make a
>> difference...
>>
>> Cheers,
>> Richard
>>
>> In message <[email protected]> on Mon, 31 Jul 2017 09:02:15 -0500, Benjamin Kaduk <[email protected]> said:
>>
>> bkaduk> Whoops, I missed that this was unicast when skimming mail over the weekend.
>> bkaduk> Looping back in Richard, at least, though if you don't mind, putting the list back would be best.
>> bkaduk>
>> bkaduk> Richard, my (extremely) quick skim of mkdef.pl is that it is only picking up explicitly set options
>> bkaduk> and not things disabled by default; does that seem plausible?
>> bkaduk>
>> bkaduk> -Ben
>> bkaduk>
>> bkaduk> On 07/28/2017 10:38 PM, Matthew Stickney wrote:
>> bkaduk>
>> bkaduk>  [1] has the contents of my crypto.def file, although I don't see
>> bkaduk> anything especially odd in there (not that I would know, really).
>> bkaduk>
>> bkaduk> I removed the offending symbols from crypto.def, and that caused the
>> bkaduk> previously-failing command to succeed. I added some print statements
>> bkaduk> to mkdef.pl and configured with "./configure mingw64 no-rc5 no-md2",
>> bkaduk> and mkdef.pl appeared to be adding them to its list of disabled
>> bkaduk> algorithms, but the MD2 and RC5 symbols are still in crypto.def. I'm
>> bkaduk> no perl hacker, but I'll play around with it a bit.
>> bkaduk>
>> bkaduk> If I hand-remove the undefined symbols, building libssl fails with
>> bkaduk> undefined references if I run make again, and if I run make again
>> bkaduk> after that, building engines/e_capi.o fails with similar errors
>> bkaduk> (probably related, but seems strange that libssl is ignored after the
>> bkaduk> first failure). Some logs below.
>> bkaduk>
>> bkaduk> -Matt Stickney
>> bkaduk>
>> bkaduk> [1] https://gist.github.com/mtstickney/eac60bb98cafc9b978407cbb0a466cdc
>> bkaduk> [2] http://openssl.6102.n7.nabble.com/Issues-with-latest-snapshot-td36148.html
>> bkaduk>
>> bkaduk> perl ./util/mkrc.pl libssl-1_1-x64.dll | windres --target=pe-x86-64 -o rc.o
>> bkaduk> LD_LIBRARY_PATH=.: gcc -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATI
>> bkaduk> C_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_AS
>> bkaduk> M_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DM
>> bkaduk> D5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOC
>> bkaduk> K_ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/
>> bkaduk> engines-1_1" -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall -O
>> bkaduk> 3 -D_MT -D_WINDLL -static-libgcc -shared -Wl,-Bsymbolic -Wl,--out-implib,libssl.
>> bkaduk> dll.a ssl.def rc.o -o libssl-1_1-x64.dll -Wl,--whole-archive libssl.a -Wl,--no-w
>> bkaduk> hole-archive -L. -lcrypto -lws2_32 -lgdi32 -lcrypt32
>> bkaduk> libssl.a(ssl_init.o):ssl_init.c:(.text+0x276): undefined reference to `err_free_
>> bkaduk> strings_int'
>> bkaduk> libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1d6c): undefined reference to `d2i_PUBKEY
>> bkaduk> '
>> bkaduk> libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x1ef9): undefined reference to `d2i_X509'
>> bkaduk> libssl.a(ssl_lib.o):ssl_lib.c:(.text+0x7c80): undefined reference to `d2i_PUBKEY
>> bkaduk> '
>> bkaduk>
>> bkaduk> <snip>
>> bkaduk>
>> bkaduk> LD_LIBRARY_PATH=.: gcc -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS
>> bkaduk> -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2
>> bkaduk> -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
>> bkaduk> -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM
>> bkaduk> -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM
>> bkaduk> -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl"
>> bkaduk> -DENGINESDIR="/usr/local/lib/engines-1_1" -DL_ENDIAN
>> bkaduk> -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall -O3 -D_MT
>> bkaduk> -D_WINDLL -static-libgcc -shared -Wl,--enable-auto-image-base
>> bkaduk> -Wl,-Bsymbolic -o engines/capi.dll engines/e_capi.o -L. -lcrypto
>> bkaduk> -lws2_32 -lgdi32 -lcrypt32
>> bkaduk> engines/e_capi.o:e_capi.c:(.text+0x1d2e): undefined reference to `d2i_X509'
>> bkaduk> engines/e_capi.o:e_capi.c:(.text+0x2e9a): undefined reference to `d2i_X509'
>> bkaduk> engines/e_capi.o:e_capi.c:(.text+0x3283): undefined reference to `d2i_X509'
>> bkaduk>
>> bkaduk>
>> bkaduk> On Fri, Jul 28, 2017 at 8:29 AM, Benjamin Kaduk <[email protected]> wrote:
>> bkaduk>
>> bkaduk>  On 07/28/2017 01:22 AM, Matthew Stickney wrote:
>> bkaduk>
>> bkaduk> With a make distclean, ./config, make depend (didn't appear to do
>> bkaduk> anything), and a make, I'm getting the essentially the same thing:
>> bkaduk>
>> bkaduk> Error: _num does not have a number assigned
>> bkaduk> /usr/bin/perl ./util/mkrc.pl libcrypto-1_1-x64.dll | windres
>> bkaduk> --target=pe-x86-64
>> bkaduk> -o rc.o
>> bkaduk> LD_LIBRARY_PATH=: gcc -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS
>> bkaduk> -DOPENSSL_NO_STATIC
>> bkaduk> _ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
>> bkaduk> -DOPENSSL_BN_ASM
>> bkaduk> _MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM
>> bkaduk> -DMD
>> bkaduk> 5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
>> bkaduk> -DPADLOCK
>> bkaduk> _ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl"
>> bkaduk> -DENGINESDIR="/usr/local/lib/e
>> bkaduk> ngines-1_1" -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall
>> bkaduk> -O3
>> bkaduk>  -D_MT -D_WINDLL -static-libgcc -shared -Wl,-Bsymbolic
>> bkaduk> -Wl,--out-implib,libcrypt
>> bkaduk> o.dll.a crypto.def rc.o -o libcrypto-1_1-x64.dll -Wl,--whole-archive
>> bkaduk> libcrypto.a
>> bkaduk>  -Wl,--no-whole-archive -lws2_32 -lgdi32 -lcrypt32
>> bkaduk> Cannot export MD2: symbol not defined
>> bkaduk> Cannot export MD2_Final: symbol not defined
>> bkaduk> Cannot export MD2_Init: symbol not defined
>> bkaduk> Cannot export MD2_Update: symbol not defined
>> bkaduk> Cannot export MD2_options: symbol not defined
>> bkaduk> Cannot export RC5_32_cbc_encrypt: symbol not defined
>> bkaduk> Cannot export RC5_32_cfb64_encrypt: symbol not defined
>> bkaduk> Cannot export RC5_32_decrypt: symbol not defined
>> bkaduk> Cannot export RC5_32_ecb_encrypt: symbol not defined
>> bkaduk> Cannot export RC5_32_encrypt: symbol not defined
>> bkaduk> Cannot export RC5_32_ofb64_encrypt: symbol not defined
>> bkaduk> Cannot export RC5_32_set_key: symbol not defined
>> bkaduk> collect2.exe: error: ld returned 1 exit status
>> bkaduk>
>> bkaduk>
>> bkaduk> MD2 and RC5 are disabled by default, so it is expected that they will not be
>> bkaduk> defined.  It is hard to say whether those messages are the source of the
>> bkaduk> error exit status or just warnings, though.
>> bkaduk>
>> bkaduk> It's certainly plausible that there are further mkdef.pl issues responsible,
>> bkaduk> though. Since mkdef.pl generates the crypto.def file referenced on your link
>> bkaduk> line, maybe you could post that somewhere and link to it?  (mkdef.pl can
>> bkaduk> also be used to generate .map files, but it seems like the .def file is the
>> bkaduk> relevant one at the moment.)
>> bkaduk>
>> bkaduk> But I may have to defer to Richard for the workings of mkdef.pl itself...
>> bkaduk>
>> bkaduk> -Ben
>> bkaduk>
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.