[openssl-users] Build failure in 1.0.1k on Windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[openssl-users] Build failure in 1.0.1k on Windows

gperrow

I just downloaded 1.0.1k and when trying to build it on Windows (using Visual Studio 10.0), I get a compile error:

 

.\crypto\cversion.c(80) : error C2065: 'cflags' : undeclared identifier

.\crypto\cversion.c(80) : warning C4047: 'return' : 'const char *' differs in levels of indirection from 'int'

 

The problem is this block in cversion.c:

 

                if (t == SSLEAY_CFLAGS)

                                {

#ifdef CFLAGS

                                return(cflags);

#else

                                return("compiler: information not available");

#endif

                                }

 

There is no “cflags” variable anywhere. I suspect this should be “return (CFLAGS);”, and making this change to the source does make the compile succeed. I’m not sure how it compiles as-is on Linux but it does.

 

Graeme Perrow

 


_______________________________________________
openssl-users mailing list
[hidden email]
https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: [openssl-users] [Bulk] Build failure in 1.0.1k on Windows

Gisle Vanem-3
Perrow, Graeme wrote:

> I just downloaded 1.0.1k and when trying to build it on Windows (using Visual Studio 10.0), I get a compile error:
>
> .\crypto\cversion.c(80) : error C2065: 'cflags' : undeclared identifier
>
> .\crypto\cversion.c(80) : warning C4047: 'return' : 'const char *' differs in levels of indirection from 'int'

(you should avoid such long lines).

'cflags' should be automatically generated by the util/mkbuildinf.pl
script and included via crypto/buildinf.h (which is included in cversion.c).
It's a total mess. Here, crypto/buildinf*.h looks like:

#ifndef MK1MF_BUILD
     /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */
     #define CFLAGS
     /*
      * Generate CFLAGS as an array of individual characters. This is a
      * workaround for the situation where CFLAGS gets too long for a C90 string
      * literal
      */
     static const char cflags[] = {

         'c','o','m','p','i','l','e','r',':',' ',' ','"','-','D','O','P','E','N',
         'S','S','L','_','S','Y','S','N','A','M','E','_','W','I','N','3','2',' ',
         '-','D','_','W','I','N','3','2',' ','-','D','W','I','N','N','T',' ','-',
         'D','D','S','O','_','W','I','N','3','2',' ','-','D','O','P','E','N','S',

--------

Nice and readable, no?

--
--gv
_______________________________________________
openssl-users mailing list
[hidden email]
https://mta.openssl.org/mailman/listinfo/openssl-users