New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.8zd/1.0.0p Build fail in cryptlib.h/bio.h BIO_FLAGS_UPLINK macro redefinition #210

Closed
winkelsdorf opened this Issue Jan 10, 2015 · 10 comments

Comments

Projects
None yet
3 participants
@winkelsdorf

winkelsdorf commented Jan 10, 2015

The Build fails in cryptlib.h/bio.h for 0.9.8zd and 1.0.0p with the following message:

1.0.0p

C:\OpenSSL\Temp\openssl-1.0.0p-x32\tmp32dll\cryptlib.h(68) : error C2220: warning treated as error - no 'object' file generated

C:\OpenSSL\Temp\openssl-1.0.0p-x32\tmp32dll\cryptlib.h(68) : warning C4005: 'BIO_FLAGS_UPLINK' : macro redefinition
C:\OpenSSL\Temp\openssl-1.0.0p-x32\inc32\openssl/bio.h(182) : see previous definition of 'BIO_FLAGS_UPLINK'

0.9.8zd

tmp32dll\cryptlib.h(68) : error C2220: warning treated as error - no 'object' file generated

tmp32dll\cryptlib.h(68) : warning C4005: 'BIO_FLAGS_UPLINK' : macro redefinition inc32\openssl/bio.h(180) : see previous definition of 'BIO_FLAGS_UPLINK'

Platform Win 7 x64. Building for Win32:

perl configure VC-WIN32
ms\do_nasm.bat

Previous versions built fine (0.9.8zc, 1.0.1o).

Using Microsoft Visual C++ 2008 Express Edition and The Netwide Assembler (NASM) v2.11.05 for Win32.

@NewEraCracker

This comment has been minimized.

Show comment
Hide comment
@NewEraCracker

NewEraCracker Jan 10, 2015

Also having this when building with Visual Studio 6 with:

perl Configure VC-WIN32
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl no-asm dll VC-WIN32 >32dll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
nmake -f 32dll.mak

Had to edit generated 32dll.mak and remove the /WX option from CFLAG as stated at INSTALL.W32

NewEraCracker commented Jan 10, 2015

Also having this when building with Visual Studio 6 with:

perl Configure VC-WIN32
perl util\mkfiles.pl >MINFO
perl util\mk1mf.pl no-asm dll VC-WIN32 >32dll.mak
perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
nmake -f 32dll.mak

Had to edit generated 32dll.mak and remove the /WX option from CFLAG as stated at INSTALL.W32

@NewEraCracker

This comment has been minimized.

Show comment
Hide comment
@NewEraCracker

NewEraCracker Jan 10, 2015

An even better fix.

Open crypto/ecdsa/ecs_vrf.c

Find

#include "ecs_locl.h"
#include "cryptlib.h"

Replace with

#include "cryptlib.h"
#include "ecs_locl.h"

It seems to be a bug in header include order.

NewEraCracker commented Jan 10, 2015

An even better fix.

Open crypto/ecdsa/ecs_vrf.c

Find

#include "ecs_locl.h"
#include "cryptlib.h"

Replace with

#include "cryptlib.h"
#include "ecs_locl.h"

It seems to be a bug in header include order.

@mattcaswell

This comment has been minimized.

Show comment
Hide comment
@mattcaswell

mattcaswell Jan 10, 2015

Member

Either of the above solutions are acceptable workarounds for this problem.

Member

mattcaswell commented Jan 10, 2015

Either of the above solutions are acceptable workarounds for this problem.

@winkelsdorf

This comment has been minimized.

Show comment
Hide comment
@winkelsdorf

winkelsdorf Jan 12, 2015

Using the 2nd fix provided by NewEraCracker everything's working as expected. Thank you!

I would suggest merging this into the two affected branches. I'll leave this issue, despite fixed, open until somebody merges the changes.

winkelsdorf commented Jan 12, 2015

Using the 2nd fix provided by NewEraCracker everything's working as expected. Thank you!

I would suggest merging this into the two affected branches. I'll leave this issue, despite fixed, open until somebody merges the changes.

@mattcaswell

This comment has been minimized.

Show comment
Hide comment
@mattcaswell

mattcaswell Jan 12, 2015

Member

There's an official fix going through review at the moment...hopefully should be there soon.

Member

mattcaswell commented Jan 12, 2015

There's an official fix going through review at the moment...hopefully should be there soon.

@winkelsdorf

This comment has been minimized.

Show comment
Hide comment
@winkelsdorf

winkelsdorf Jan 12, 2015

Ok, thanks for the follow-up. Nothing complicated here, just overlooked the include order in the aforementioned file, instead I was looking at the redeclaration itself.. Thanks for merging the changes!

winkelsdorf commented Jan 12, 2015

Ok, thanks for the follow-up. Nothing complicated here, just overlooked the include order in the aforementioned file, instead I was looking at the redeclaration itself.. Thanks for merging the changes!

@winkelsdorf

This comment has been minimized.

Show comment
Hide comment
@winkelsdorf

winkelsdorf Jan 12, 2015

Offtopic: By the way, as you are part of the official Team: I am providing pre-compiled Win32/64 libraries for about 10 years now, as I am part of a network component development team (Indy Components) for the Delphi Language.

The main difference between my releases and the shining light/slproweb releases (as linked at OpenSSL's binary distribution page https://www.openssl.org/related/binaries.html) is that my libraries are compiled without external dependencies to the Microsoft Visual Studio Runtime DLLs, expect for the system provided msvcrt.dll. Basically these precompiled versions allow an easier distribution without having to install corresponding, newer VC runtime dlls, too.

Feel free to include a link to my blog and/or the Fulgan Mirror in Switzerland, where I am hosting them:
http://opendec.wordpress.com
http://indy.fulgan.com/SSL/

Cheers

winkelsdorf commented Jan 12, 2015

Offtopic: By the way, as you are part of the official Team: I am providing pre-compiled Win32/64 libraries for about 10 years now, as I am part of a network component development team (Indy Components) for the Delphi Language.

The main difference between my releases and the shining light/slproweb releases (as linked at OpenSSL's binary distribution page https://www.openssl.org/related/binaries.html) is that my libraries are compiled without external dependencies to the Microsoft Visual Studio Runtime DLLs, expect for the system provided msvcrt.dll. Basically these precompiled versions allow an easier distribution without having to install corresponding, newer VC runtime dlls, too.

Feel free to include a link to my blog and/or the Fulgan Mirror in Switzerland, where I am hosting them:
http://opendec.wordpress.com
http://indy.fulgan.com/SSL/

Cheers

@mattcaswell

This comment has been minimized.

Show comment
Hide comment
@mattcaswell

mattcaswell Jan 13, 2015

Member

@winkelsdorf a link has been added on the binaries page

Member

mattcaswell commented Jan 13, 2015

@winkelsdorf a link has been added on the binaries page

@mattcaswell

This comment has been minimized.

Show comment
Hide comment
@mattcaswell

mattcaswell Jan 13, 2015

Member

The official fix for this issue is in commit 94e5cf3 for 1.0.0, and 56abaa1 for 0.9.8

Member

mattcaswell commented Jan 13, 2015

The official fix for this issue is in commit 94e5cf3 for 1.0.0, and 56abaa1 for 0.9.8

@winkelsdorf

This comment has been minimized.

Show comment
Hide comment
@winkelsdorf

winkelsdorf Jan 16, 2015

Thanks for adding a link. I verified that both 94e5cf3 and 56abaa1 are working correctly. 1.0.1l, 1.0.0q and 0.9.8ze are building fine without any modification. Thank you!

winkelsdorf commented Jan 16, 2015

Thanks for adding a link. I verified that both 94e5cf3 and 56abaa1 are working correctly. 1.0.1l, 1.0.0q and 0.9.8ze are building fine without any modification. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment