php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43103 OpenSSL extension fails without HAVE_TM_GMTOFF
Submitted: 2007-10-24 22:15 UTC Modified: 2007-10-26 14:58 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ckuehn at uiuc dot edu Assigned:
Status: Closed Package: OpenSSL related
PHP Version: 5.2.4 OS: Solaris 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ckuehn at uiuc dot edu
New email:
PHP Version: OS:

 

 [2007-10-24 22:15 UTC] ckuehn at uiuc dot edu
Description:
------------
The OpenSSL extension fails to build because of an undeclared variable (timezone) in the !HAVE_TM_GMTOFF case of asn1_time_to_time_t() in ext/openssl/openssl.c

Reproduce code:
---------------
./configure \
        --prefix="/usr/local/encap/php-5.2.4" \
        --sysconfdir="/usr/local/encap/php-5.2.4/etc" \
        --enable-cgi \
        --enable-fastcgi \
        --enable-discard-path \
        --with-config-file-path="/usr/local/encap/php-5.2.4/etc" \
        --enable-xml \
        --with-pear \
        --with-mysql \
        --with-pgsql \
        --with-mcrypt \
        --with-openssl \
        --disable-shared \
        --enable-static
make

Expected result:
----------------
Clean compilation.

Actual result:
--------------
/services/scratch/php-5.2.4/ext/openssl/openssl.c: In function `asn1_time_to_time_t':
/services/scratch/php-5.2.4/ext/openssl/openssl.c:393: `timezone' undeclared (first use in this function)
/services/scratch/php-5.2.4/ext/openssl/openssl.c:393: (Each undeclared identifier is reported only once
/services/scratch/php-5.2.4/ext/openssl/openssl.c:393: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `ext/openssl/openssl.lo'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-25 11:49 UTC] jani@php.net
You didn't mention what compiler you use. If you're using Sun's cc, 
make sure /opt/SUNWspro/bin/cc is used instead of /usr/ucb/cc


 [2007-10-25 13:45 UTC] ckuehn at uiuc dot edu
Sorry for the omission.  I'm using GCC 3.1.
 [2007-10-25 14:14 UTC] jani@php.net
Try adding this to ext/openssl/openssl.c, around line 50:

#include <time.h>

 [2007-10-25 14:42 UTC] ckuehn at uiuc dot edu
Adding the include line doesn't seem to have changed anything.

Adding:

long timezone;

...within the asn1_time_to_time_t function allows the build to proceed without the error, but I'm pretty sure that's not an appropriate fix :)
 [2007-10-26 12:06 UTC] jani@php.net
Well, time.h should actually have that in it. So it's more likely that you're including the wrong time.h..maybe it's in the sys/time.h ? 
 [2007-10-26 14:58 UTC] ckuehn at uiuc dot edu
Thanks for that last note.  It pointed me in the right direction to find a problem with our toolchain.

Thanks for all the help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC