dsully / perl-crypt-openssl-x509

Perl interface to OpenSSL's X509 module.
Other
25 stars 33 forks source link

Will not compile in OSX Mavericks #30

Closed Casao closed 11 years ago

Casao commented 11 years ago

Does not compile in OSX Mavericks. This is the only Crypt::OpenSSL module that has this issue. OpenSSL itself is installed via homebrew, this happens whether using cpanm or full cpan.

Build log below.

cpanm (App::cpanminus) 1.7001 on perl 5.018001 built for darwin-thread-multi-2level
Work directory is /Users/colin.ewen/.cpanm/work/1383069862.15556
You have make /usr/bin/make
You have LWP 6.05
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching Crypt::OpenSSL::X509 on cpanmetadb ...
--> Working on Crypt::OpenSSL::X509
Fetching http://www.cpan.org/authors/id/D/DA/DANIEL/Crypt-OpenSSL-X509-1.803.tar.gz
-> OK
Unpacking Crypt-OpenSSL-X509-1.803.tar.gz
Entering Crypt-OpenSSL-X509-1.803
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.66)
Configuring Crypt-OpenSSL-X509-1.800.2
Running Makefile.PL
Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: 'ARRAY(0x7fec5883ffd0)'
Writing Makefile for Crypt::OpenSSL::X509
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 6.36 ... Yes (6.66)
Building and testing Crypt-OpenSSL-X509-1.800.2
cp X509.pm blib/lib/Crypt/OpenSSL/X509.pm
/Users/colin.ewen/perl5/perlbrew/perls/perl-5.18.1/bin/perl "-Iinc" /Users/colin.ewen/perl5/perlbrew/perls/perl-5.18.1/lib/5.18.1/ExtUtils/xsubpp  -typemap /Users/colin.ewen/perl5/perlbrew/perls/perl-5.18.1/lib/5.18.1/ExtUtils/typemap -typemap typemap  X509.xs > X509.xsc && mv X509.xsc X509.c
cc -c  -I/usr/include/openssl -I/usr/local/include/ssl -I/usr/local/ssl/include -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O2 -g -Wall -Werror   -DVERSION=\"1.803\" -DXS_VERSION=\"1.803\"  "-I/Users/colin.ewen/perl5/perlbrew/perls/perl-5.18.1/lib/5.18.1/darwin-thread-multi-2level/CORE"   X509.c
X509.xs:56:21: error: 'BIO_get_callback_arg' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
    SV *sv = (SV *) BIO_get_callback_arg(bm);
                    ^
/usr/include/openssl/bio.h:263:7: note: 'BIO_get_callback_arg' declared here
char *BIO_get_callback_arg(const BIO *b) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
X509.xs:61:21: error: 'BIO_get_callback_arg' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
    SV *sv = (SV *) BIO_get_callback_arg(bm);
                    ^
/usr/include/openssl/bio.h:263:7: note: 'BIO_get_callback_arg' declared here
char *BIO_get_callback_arg(const BIO *b) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
X509.xs:74:14: error: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO *bio = BIO_new(BIO_s_mem());
             ^
/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO *   BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
X509.xs:74:22: error: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO *bio = BIO_new(BIO_s_mem());
                     ^
/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
            ^
X509.xs:76:3: error: 'BIO_set_callback' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO_set_callback(bio, bio_write_cb);
  ^
/usr/include/openssl/bio.h:261:6: note: 'BIO_set_callback' declared here
void BIO_set_callback(BIO *b,
     ^
X509.xs:77:3: error: 'BIO_set_callback_arg' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO_set_callback_arg(bio, (void *)sv);
  ^
/usr/include/openssl/bio.h:264:6: note: 'BIO_set_callback_arg' declared here
void BIO_set_callback_arg(BIO *b, char *arg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
X509.xs:86:9: error: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  (void)BIO_flush(bio);
        ^
/usr/include/openssl/bio.h:529:28: note: expanded from macro 'BIO_flush'
#define BIO_flush(b)            (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
                                     ^
/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long    BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
X509.xs:87:14: error: 'BIO_get_callback_arg' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  sv = (SV *)BIO_get_callback_arg(bio);
             ^
/usr/include/openssl/bio.h:263:7: note: 'BIO_get_callback_arg' declared here
char *BIO_get_callback_arg(const BIO *b) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
X509.xs:88:3: error: 'BIO_set_callback_arg' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO_set_callback_arg(bio, (void *)NULL);
  ^
/usr/include/openssl/bio.h:264:6: note: 'BIO_set_callback_arg' declared here
void BIO_set_callback_arg(BIO *b, char *arg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
X509.xs:89:3: error: 'BIO_set_callback' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO_set_callback(bio, (void *)NULL);
  ^
/usr/include/openssl/bio.h:261:6: note: 'BIO_set_callback' declared here
void BIO_set_callback(BIO *b,
     ^
X509.xs:90:3: error: 'BIO_free_all' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  BIO_free_all(bio);
  ^
/usr/include/openssl/bio.h:606:6: note: 'BIO_free_all' declared here
void    BIO_free_all(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
X509.xs:100:18: error: 'BIO_get_callback_arg' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  SV* sv = (SV *)BIO_get_callback_arg(bio);
                 ^
/usr/include/openssl/bio.h:263:7: note: 'BIO_get_callback_arg' declared here
char *BIO_get_callback_arg(const BIO *b) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
      ^
X509.xs:146:3: error: 'ERR_print_errors' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  ERR_print_errors(bio);
  ^
/usr/include/openssl/err.h:290:6: note: 'ERR_print_errors' declared here
void ERR_print_errors(BIO *bp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
X509.xs:148:3: error: 'ERR_clear_error' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  ERR_clear_error();
  ^
/usr/include/openssl/err.h:278:6: note: 'ERR_clear_error' declared here
void ERR_clear_error(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
     ^
X509.xs:182:7: error: 'X509_get_ext_count' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
  c = X509_get_ext_count(x509);
      ^
/usr/include/openssl/x509.h:1144:6: note: 'X509_get_ext_count' declared here
int             X509_get_ext_count(X509 *x) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                ^
X509.xs:191:11: error: 'X509_get_ext' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
    ext = X509_get_ext(x509, i);
          ^
/usr/include/openssl/x509.h:1148:17: note: 'X509_get_ext' declared here
X509_EXTENSION *X509_get_ext(X509 *x, int loc) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                ^
X509.xs:200:12: error: 'OBJ_obj2txt' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
       r = OBJ_obj2txt(key, len, X509_EXTENSION_get_object(ext), no_name);
           ^
/usr/include/openssl/objects.h:1011:5: note: 'OBJ_obj2txt' declared here
int     OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
X509.xs:200:34: error: 'X509_EXTENSION_get_object' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
       r = OBJ_obj2txt(key, len, X509_EXTENSION_get_object(ext), no_name);
                                 ^
/usr/include/openssl/x509.h:1185:15: note: 'X509_EXTENSION_get_object' declared here
ASN1_OBJECT *   X509_EXTENSION_get_object(X509_EXTENSION *ex) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                ^
X509.xs:204:21: error: 'OBJ_nid2sn' is deprecated: first deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]
       key = (char*)OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
                    ^
/usr/include/openssl/objects.h:1008:14: note: 'OBJ_nid2sn' declared here
const char *    OBJ_nid2sn(int n) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [X509.o] Error 1
-> FAIL Installing Crypt::OpenSSL::X509 failed. See /Users/colin.ewen/.cpanm/work/1383069862.15556/build.log for details. Retry with --force to force install it.
0xxon commented 11 years ago

This uses the header files of mavericks (where OpenSSL is marked as deprecated, hence the warnings/errors) and not the header files of your homebrew install.

You either have to get perl to use the homebrew installation (perhaps by changing cc_inc_paths, depending on where it is installed), or just remove -Wall and -Werror from the cc_optimize_flags and use the system OpenSSL.

Casao commented 11 years ago

I understand that, but all of the other Crypt::OpenSSL:: modules manage to run flawlessly, so it's something specific to the X509 module's use of these headers.

A CPAN module shouldn't require someone to manually edit the configuration to handle the compile, especially when comparable modules don't.