J. J. Farrell wrote:
> 
>> From: patfla
>> Sent: Thursday, June 18, 2009 12:46 AM
>> 
>> ...
>> 
>> I'm on the latest build of Windows Server 2008 R2 from MSDN.  
>> Build 7100.
>> 
>> First built using
>> 
>> ./config
>> 
>> make clean       ! clean up the previous build
>> make 
>> 
>> which craps out on what appears to be the first file: 
>> 
>> > making all in crypto...
>> > make[1]: Entering directory `/cygdrive/c/openssl-0.9.8k/crypto'
>> > gcc -I. -I.. -I../include -DOPENSSL_THREADS  -DDSO_WIN32 -mno-cygwin
>> > -DL_ENDIAN
>> > -fomit-frame-pointer -O3 -march=i486 -Wall -D_WIN32_WINNT=0x333
>> > -DOPENSSL_BN_ASM
>> > _PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
>> > -DAES_ASM   -c
>> >  -o cryptlib.o cryptlib.c
>> > cryptlib.c: In function `OPENSSL_isservice':
>> > cryptlib.c:415: error: `HWINSTA' undeclared (first use in 
>> this function)
>> > cryptlib.c:415: error: (Each undeclared identifier is 
>> reported only once
>> > cryptlib.c:415: error: for each function it appears in.)
>> > cryptlib.c:415: error: parse error before "h"
>> 
>> ...
> 
> Looks like a problem with your MinGW installation. Do you have both
> mingw-runtime and w32api installed correctly?
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
> 
> 


Still flailing away - but I've discovered some interesting things along the
way.

I'm able to successfully build from source on my home machine, using cygwin. 
The home machine is vanilla XP.

At home I did a ./Configure shared debug-Cygwin and did get working DLLs
(hooray).

The problem (in building from source) is with my work machine which is a
slightly more exotic 64-bit processor but in particular with Windows Server
2008 R2 (R2 means rewritten with the new Windows 7 Core).

On the work machine, I try this Configure (which worked for me on my home
machine):



> m...@machine /cygdrive/c/openssl-0.9.8k
> $ ./Configure shared debug-Cygwin
> Configuring for debug-Cygwin
>     no-camellia     [default]  OPENSSL_NO_CAMELLIA (skip dir)
>     no-capieng      [default]  OPENSSL_NO_CAPIENG (skip dir)
>     no-cms          [default]  OPENSSL_NO_CMS (skip dir)
>     no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
>     no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)
>     no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
>     no-mdc2         [default]  OPENSSL_NO_MDC2 (skip dir)
>     no-montasm      [default]
>     no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
>     no-rfc3779      [default]  OPENSSL_NO_RFC3779 (skip dir)
>     no-seed         [default]  OPENSSL_NO_SEED (skip dir)
>     no-zlib         [default]
>     no-zlib-dynamic [default]
> IsMK1MF=0
> CC            =gcc
> CFLAG         =-D_WINDLL -DOPENSSL_PIC -DOPENSSL_THREADS  -DDSO_DLFCN
> -DHAVE_DLF
> CN_H -DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK
> -DCONF_DEBUG
> -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes
> -Wmis
> sing-declarations -Werror
> EX_LIBS       =
> CPUID_OBJ     =
> BN_ASM        =bn_asm.o
> DES_ENC       =des_enc.o fcrypt_b.o
> AES_ASM_OBJ   =aes_core.o aes_cbc.o
> BF_ENC        =bf_enc.o
> CAST_ENC      =c_enc.o
> RC4_ENC       =rc4_enc.o rc4_skey.o
> RC5_ENC       =rc5_enc.o
> MD5_OBJ_ASM   =
> SHA1_OBJ_ASM  =
> RMD160_OBJ_ASM=
> PROCESSOR     =
> RANLIB        =true
> ARFLAGS       =
> PERL          =perl
> THIRTY_TWO_BIT mode
> RC4_CHUNK is undefined
> e_os2.h => include/openssl/e_os2.h
> making links in crypto...
> make[1]: Entering directory `/cygdrive/c/openssl-0.9.8k/crypto'
> crypto.h => ../include/openssl/crypto.h
> tmdiff.h => ../include/openssl/tmdiff.h
> opensslv.h => ../include/openssl/opensslv.h
> opensslconf.h => ../include/openssl/opensslconf.h
> ebcdic.h => ../include/openssl/ebcdic.h
> symhacks.h => ../include/openssl/symhacks.h
> ossl_typ.h => ../include/openssl/ossl_typ.h
> making links in crypto/objects...
> .
> .
> .
> make[1]: Leaving directory `/cygdrive/c/openssl-0.9.8k/fips'
> generating dummy tests (if needed)...
> make[1]: Entering directory `/cygdrive/c/openssl-0.9.8k/test'
> make[1]: Nothing to be done for `generate'.
> make[1]: Leaving directory `/cygdrive/c/openssl-0.9.8k/test'
> 
> Configured for debug-Cygwin.
> 
> m...@machine /cygdrive/c/openssl-0.9.8k
> $ pwd
> 
> 

So, based on what I know now from my home machine, the ./Configure
succeeded.  But then the build on the work machine (again: Windows Server
2008 R2) craps out on the first compile as follows:



> .
> .
> .
> ( echo "#ifndef MK1MF_BUILD"; \
>         echo '  /* auto-generated by crypto/Makefile for crypto/cversion.c
> */';
> \
>         echo '  #define CFLAGS "gcc -D_WINDLL -DOPENSSL_PIC
> -DOPENSSL_THREADS  -
> DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIOS -DL_ENDIAN -march=i486 -Wall
> -DBN_DEBUG -DRE
> F_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow
> -Wmis
> sing-prototypes -Wmissing-declarations -Werror"'; \
>         echo '  #define PLATFORM "debug-Cygwin"'; \
>         echo "  #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
>         echo '#endif' ) >buildinf.h
> gcc -I. -I.. -I../include -D_WINDLL -DOPENSSL_PIC -DOPENSSL_THREADS 
> -DDSO_DLFCN
>  -DHAVE_DLFCN_H -DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG
> -DREF_CHECK -D
> CONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow
> -Wmissing-proto
> types -Wmissing-declarations -Werror   -c -o cryptlib.o cryptlib.c
> cryptlib.c:375: warning: no previous prototype for 'DllMain'
> make[1]: *** [cryptlib.o] Error 1
> make[1]: Leaving directory `/cygdrive/c/openssl-0.9.8k/crypto'
> make: *** [build_crypto] Error 1
> 
> m...@machine /cygdrive/c/openssl-0.9.8k
> $
> 

No prototype for the function/routine (meaning for DLLMain which I
presumably turned on with the 'shared' option)?  That sounds like some kind
of gcc switch (to turn on-or-off the need for prototypes).

Maybe because the platform in question is WS 2008 - which openssl may not
have much experience with - the ./Configure misinterprets things to believe
that gcc needs to have prototypes turned on?

Or maybe something wildly different from that.  But with the same effect of
course.

This has been real 2-yards-in-cloud-of-dust stuff.
-- 
View this message in context: 
http://www.nabble.com/example-code-for-OpenSSL-tp24040969p24139755.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to