Skip Menu | | Logout
Logged in as guest
RT for openssl.org
 
 
#1685: [BUG] OpenSSL 0.9.8h cannot be compiled by GCC 4.3.0 on MinGW
X  Ticket metadata  
X  The Basics  
Id: 1685
Status: new
Left: 0 min
Priority: 0/0
Queue: OpenSSL-Bugs

X  Custom Fields  
Milestone:
  • (no value)
Subsystem:
  • (no value)
Severity:
  • (no value)
Broken in:
  • (no value)

X  People  
Owner: Nobody
Requestors: prantlf@gmail.com
Cc:
AdminCc:

X  Dates  
Created: Mon Jun 02 10:26:56 2008
Starts: Not set
Started: Not set
Last Contact: Not set
Due: Not set
Closed: Not set
Updated: Mon Jun 02 10:26:58 2008 by prantlf@gmail.com

X  Links  
Depends on:
Depended on by:
Parents:
Children:
Refers to:
Referred to by:

X  More about Ferdinand Prantl  
Comments about this user:
No comment entered about this user
This user's 10 highest priority tickets:
Groups this user belongs to:
  • Everyone
  • Unprivileged

X  History Display mode:[Brief headers] [Full headers]
#     Mon Jun 02 10:26:56 2008  prantlf@gmail.com - Ticket created    
Subject: [BUG] OpenSSL 0.9.8h cannot be compiled by GCC 4.3.0 on MinGW
Date: Sat, 31 May 2008 10:06:25 +0200
To: rt@openssl.org
From: "Ferdinand Prantl" <prantlf@gmail.com>
Download (untitled)
text/plain 1.7k
Hello,

I called ms\mingw32.bat and here we are the last console lines:

gcc -o tmp\set_key.o -Ioutinc -Itmp -DL_ENDIAN -DDSO_WIN32
-fomit-frame-pointer -O3 -march=i486 -Wall -DBN_ASM -DMD5_ASM
-DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_NO_CAMELLIA
-DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2
-DOPENSSL_NO_TLSEXT -DOPENSSL_NO_CMS -DOPENSSL_NO_KRB5
-DOPENSSL_NO_DYNAMIC_ENGINE -c .\crypto\des\set_key.c
.\crypto\des\set_key.c:68: error: static declaration of
'_hide_DES_check_key' follows non-static declaration
.\crypto\des\set_key.c:68: error: previous declaration of
'_hide_DES_check_key' was here
mingw32-make: *** [tmp\set_key.o] Error 1

I looked into e_os2.h and found that the macro
OPENSSL_IMPLEMENT_GLOBAL declares a variable both extern and static:

#ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
# define OPENSSL_IMPLEMENT_GLOBAL(type,name) \
extern type _hide_##name; \
type *_shadow_##name(void) { return &_hide_##name; } \
static type _hide_##name
........^^^
# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
#else
# define OPENSSL_IMPLEMENT_GLOBAL(type,name) OPENSSL_GLOBAL type
_shadow_##name
# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type
_shadow_##name
# define OPENSSL_GLOBAL_REF(name) _shadow_##name
#endif

I removed the modifier "static" marked above and compiled the package
successfully. What did you intend by declaring a variable both extern
and static?
Maybe the GCC 4.3.0 got too picky about such things. I think that you
can remove the modifier because the variable is getting exported
anyway.

I used gcc-4.3.0-20080502-mingw32-alpha-bin on Windows XP.

Cheers,
Ferda Prantl
»|« RT 3.4.5 Copyright 1996-2005 Best Practical Solutions, LLC.
Time to display: 0.307137