Ok, I have still not been able to reproduce this.

We have already established that the perl you use is the mingw one,
haven't we?  (if we haven't, that really needs to be checked.
Matching perl and all that)

A test to figure out is this:

    perl util/mkdef.pl 32 crypto debug 2> mkdef-debug.txt > /dev/null

Then let someone who knows mkdef look at the output.  I would usually
volunteer, but my time is currently limited (on vacation), so I won't
be able to look at it before mid August.  The debug output is messy,
fair warning.

Cheers,
Richard

In message <cakh_ld5k49i9v5-k_vxtmgreyo5nnal43hakuqcutnlfq6j...@mail.gmail.com> 
on Mon, 31 Jul 2017 21:07:07 -0400, Matthew Stickney <mtstick...@gmail.com> 
said:

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

Reply via email to