I have been trying to get the latest development snapshot (currently 6/25) to compile and link for Windows in connection with work I am doing to produce an 0.9.8 patch introducing NetWare support to OpenSSL.
Richard addressed a number of issues I found last week (Thank you), but I am still seeing some problems in the latest snapshot and wanted to pass the information along to be considered for additional fixes. Issue #1 I am still seeing a problem with the "dynamic_ctrl" function prototype in crypto\engine\eng_dyn.c despite the change Richard made this week. It turns out that although line 73 was changed from: static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); to: static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void)); line 319 still shows: static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) Since line 291 of crypto\engine\engine.h, defines: typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *, void (*f)(void)); we could update line 319 of crypto\engine\eng_dyn.c to match. However, there are several "ctrl" functions in engines code as well as they are all defined like this one in engines\e_aep.c on line 91: static int aep_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); so it looks like the best change may be to change line 73 of crypto\engine\eng_dyn.c back from: static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void)); to: static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()); and also update line 291 of crypto\engine\engine.h from: typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *, void (*f)(void)); to: typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *, void (*f)()); Issue #2 The .c files in the "engines" directory is not being built which results in several undefined when linking: link /nologo /subsystem:console /machine:I386 /opt:ref /debug /out:out32 .dbg\evp_test.exe @c:\temp\nna01760. libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_ubsec libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_sureware libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_nuron libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_chil libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_cswift libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_atalla libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_aep libeay32.lib(eng_all.obj) : error LNK2001: unresolved external symbol _ENGINE_load_4758cca out32.dbg\evp_test.exe : fatal error LNK1120: 8 unresolved externals NMAKE : fatal error U1077: 'link' : return code '0x460' This can be fixed with the following patch: *** openssl-SNAP-20030625\util\mkfiles.pl Tue Jun 10 23:00:22 2003 --- opensslnw\util\mkfiles.pl Wed Jun 25 16:18:38 2003 *************** *** 55,60 **** --- 55,61 ---- "crypto/krb5", "crypto/store", "ssl", + "engines", "apps", "test", "tools" With these changes the static libraries for Windows build and pass all tests, but there are still issues with the shared libraries. Issue #3 When building the shared libraries, I get: link /debug /nologo /subsystem:console /machine:I386 /opt:ref /debug /dl l /out:out32dll.dbg\libeay32.dll /def:ms/LIBEAY32.def @c:\temp\nma01780. LIBEAY32.def : error LNK2001: unresolved external symbol ENGINE_load_gmp LIBEAY32.def : error LNK2001: unresolved external symbol STORE_Directory LIBEAY32.def : error LNK2001: unresolved external symbol STORE_File LIBEAY32.def : error LNK2001: unresolved external symbol STORE_ctrl LIBEAY32.def : error LNK2001: unresolved external symbol STORE_method_get_cleanup_function LIBEAY32.def : error LNK2001: unresolved external symbol STORE_method_get_initialise_function LIBEAY32.def : error LNK2001: unresolved external symbol STORE_method_get_modify_function LIBEAY32.def : error LNK2001: unresolved external symbol STORE_method_set_cleanup_function LIBEAY32.def : error LNK2001: unresolved external symbol STORE_method_set_initialise_function LIBEAY32.def : error LNK2001: unresolved external symbol STORE_method_set_modify_function LIBEAY32.def : error LNK2001: unresolved external symbol STORE_modify_arbitrary LIBEAY32.def : error LNK2001: unresolved external symbol STORE_modify_certificate LIBEAY32.def : error LNK2001: unresolved external symbol STORE_modify_crl LIBEAY32.def : error LNK2001: unresolved external symbol STORE_modify_number LIBEAY32.def : error LNK2001: unresolved external symbol STORE_modify_private_key LIBEAY32.def : error LNK2001: unresolved external symbol STORE_modify_public_key out32dll.dbg\libeay32.lib : fatal error LNK1120: 16 unresolved externals LINK : fatal error LNK1141: failure during build of exports file NMAKE : fatal error U1077: 'link' : return code '0x475' As near as I can tell even though these functions exist in the public header files, none of them are defined in the actual code. The easiest way to work around this problem is to remove the references to the functions in util\libeay.num. This results in a number of warnings, but the code compiles, links and tests properly. I am not sure what the "correct" solution is. Hope this helps. Verdon Walker (801) 861-2633 [EMAIL PROTECTED] Novell, Inc., the leading provider of information solutions http://www.novell.com ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]