[openssl.org #1671] Configure options are not passed to mkdef.pl in mingw build

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown [openssl.org #1671] Configure options are not passed to mkdef.pl in mingw build

by Andy Polyakov via RT :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Found in current CVS HEAD (05/13/2008 16:00)

Shared build of OpenSSL for Windows platform involves executing of
file util/mkdef.pl to creates .def file for each shared library.
This file specifies what symbols are exported from the library.

Script mkdef.pl expects to receive some configuration options, such as
no-<alg> or zlib. If these options are not passed properly (i.e same way
as to Configure), build fails, either when building shared library
(in case if some algorithms were disabled and corresponding functions
are not available in the object files) or when building openssl.exe
binary (in case if some optional features such as zlib compression were
enabled and used by object files in the apps directory).

However, script mkdef.pl is invoked from the link_a.cygwin target
of Makefile.shared without passsing configure arguments.

Attached patch fixes this problem

It does just to things:

1. Adds variable CONFIGURE_ARGS to the list of variables passed to make
subprocess in the BUILDENV macro
2. Passes content of this variable to mkdef.pl invocation in the
link_a.cygwin target in the Makefile.shared.







Index: Makefile.shared
===================================================================
RCS file: /cvs-openssl/openssl/Makefile.shared,v
retrieving revision 1.68
diff -u -r1.68 Makefile.shared
--- Makefile.shared 17 Apr 2008 10:19:04 -0000 1.68
+++ Makefile.shared 13 May 2008 14:14:29 -0000
@@ -276,7 +276,7 @@
  esac; \
  SHLIB_SOVER=32; \
  extras="$(LIBNAME).def"; \
- $(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \
+ $(PERL) util/mkdef.pl 32 $$SHLIB $(CONFIGURE_ARGS)> $$extras; \
  base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
  fi; \
  dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
Index: Makefile.org
===================================================================
RCS file: /cvs-openssl/openssl/Makefile.org,v
retrieving revision 1.288
diff -u -r1.288 Makefile.org
--- Makefile.org 17 Apr 2008 10:19:04 -0000 1.288
+++ Makefile.org 13 May 2008 14:14:29 -0000
@@ -201,6 +201,7 @@
  RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' \
  WP_ASM_OBJ='${WP_ASM_OBJ}' \
  PERLASM_SCHEME='${PERLASM_SCHEME}' \
+ CONFIGURE_ARGS='${CONFIGURE_ARGS}'  \
  THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
 # which in turn eliminates ambiguities in variable treatment with -e.

Re: [openssl.org #1671] Configure options are not passed to mkdef.pl in mingw build

by Roumen Petrov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Victor Wagner via RT wrote:

> Found in current CVS HEAD (05/13/2008 16:00)
>
> Shared build of OpenSSL for Windows platform involves executing of
> file util/mkdef.pl to creates .def file for each shared library.
> This file specifies what symbols are exported from the library.
>
> Script mkdef.pl expects to receive some configuration options, such as
> no-<alg> or zlib. If these options are not passed properly (i.e same way
> as to Configure), build fails, either when building shared library
> (in case if some algorithms were disabled and corresponding functions
> are not available in the object files) or when building openssl.exe
> binary (in case if some optional features such as zlib compression were
> enabled and used by object files in the apps directory).
>
> However, script mkdef.pl is invoked from the link_a.cygwin target
> of Makefile.shared without passsing configure arguments.
>
> Attached patch fixes this problem
>
> It does just to things:
>
> 1. Adds variable CONFIGURE_ARGS to the list of variables passed to make
> subprocess in the BUILDENV macro
> 2. Passes content of this variable to mkdef.pl invocation in the
> link_a.cygwin target in the Makefile.shared.

But util/mkdef.pl parse OPTIONS in top Makefile.

Roumen


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...

Re: [openssl.org #1671] Configure options are not passed to mkdef.pl in mingw build

by Victor B. Wagner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2008.05.13 at 22:10:12 +0300, Roumen Petrov wrote:

>> Shared build of OpenSSL for Windows platform involves executing of
>> file util/mkdef.pl to creates .def file for each shared library.
>> This file specifies what symbols are exported from the library.
>>
>> Script mkdef.pl expects to receive some configuration options, such as
>> no-<alg> or zlib. If these options are not passed properly (i.e same way
>> as to Configure), build fails, either when building shared library
>> (in case if some algorithms were disabled and corresponding functions
>> are not available in the object files) or when building openssl.exe
>> binary (in case if some optional features such as zlib compression were
>> enabled and used by object files in the apps directory).
>>
>> However, script mkdef.pl is invoked from the link_a.cygwin target
>> of Makefile.shared without passsing configure arguments.
>>
>> Attached patch fixes this problem
>>
>> It does just to things:
>>
>> 1. Adds variable CONFIGURE_ARGS to the list of variables passed to make
>> subprocess in the BUILDENV macro 2. Passes content of this variable to
>> mkdef.pl invocation in the
>> link_a.cygwin target in the Makefile.shared.
>
> But util/mkdef.pl parse OPTIONS in top Makefile.

Therefore, it does it incorrectly.

I've encountered real errors doing build
with

./Configure mingw shared zlib --cross-compile-prefix=i586-mingw32msvc-


mkdef.pl does

        if ($_ eq "zlib" || $_ eq "zlib-dynamic"
                         || $_ eq "enable-zlib-dynamic")


but in this case OPTIONS contain "enable-zlib no-zlib-dynamic"

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...

Re: [openssl.org #1671] Configure options are not passed to mkdef.pl in mingw build

by Roumen Petrov-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Victor B. Wagner wrote:
> On 2008.05.13 at 22:10:12 +0300, Roumen Petrov wrote:
[SNIP]

>> But util/mkdef.pl parse OPTIONS in top Makefile.
>
> Therefore, it does it incorrectly.
>
> I've encountered real errors doing build
> with
>
> ./Configure mingw shared zlib --cross-compile-prefix=i586-mingw32msvc-
>
> mkdef.pl does
>
>         if ($_ eq "zlib" || $_ eq "zlib-dynamic"
> || $_ eq "enable-zlib-dynamic")
>
> but in this case OPTIONS contain "enable-zlib no-zlib-dynamic"

Above change subject of reported issue.

Roumen
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...