[MacPorts] #62500: ruby21, ruby22: error: conflicting types for 'HMAC_CTX_copy'

MacPorts noreply at macports.org
Wed Oct 13 13:43:11 UTC 2021


#62500: ruby21, ruby22: error: conflicting types for 'HMAC_CTX_copy'
----------------------------+---------------------
  Reporter:  ryandesign     |      Owner:  kimuraw
      Type:  defect         |     Status:  closed
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.6.99
Resolution:  fixed          |   Keywords:
      Port:  ruby21 ruby22  |
----------------------------+---------------------
Changes (by kimura wataru <kimuraw@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"640784d862c03447ac672d4eb3a5602a82e6c809/macports-ports"
 640784d862c03447ac672d4eb3a5602a82e6c809/macports-ports] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="640784d862c03447ac672d4eb3a5602a82e6c809"
 lang/ruby22, ruby21: fix build error at ext/openssl

 closes: https://trac.macports.org/ticket/62500

 see: https://github.com/rbenv/ruby-build/issues/1489

 conftest from ext/openssl/extconf.rb runs without including <openssl/*.h>.
 this leads conflicts between ext/openssl/extconf.h and ext/openssl/*.[hc]
 under "-Werror=implicit-function-declaration", default with recent Xcode.

 ext/openssl/mkmf.log:
 {{{
 have_func: checking for HMAC_CTX_copy()... -------------------- yes  ####
 <= returns "no" under -Werror=implicit-function-declaration

 "/usr/bin/clang -o conftest -I../../.ext/include/x86_64-darwin20
 -I../.././include -I../.././ext/openssl  -I/opt/local/include/openssl-1.0
 -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
 -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
 -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -pipe -Os -Wno-error=implicit-
 function-declaration
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -fno-common
 conftest.c  -L/opt/local/lib/openssl-1.0 -L/opt/local/lib -L. -L../.. -L.
 -L/opt/local/lib -Wl,-headerpad_max_install_names
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
 -fstack-protector -L/opt/local/lib  -L/opt/local/lib   -arch x86_64
 -lssl -lcrypto -lruby.2.2.0-static -framework CoreFoundation  -lssl
 -lcrypto -lpthread -ldl -lobjc "
 conftest.c:13:57: error: use of undeclared identifier 'HMAC_CTX_copy'
 int t(void) { void ((*volatile p)()); p = (void ((*)()))HMAC_CTX_copy;
 return 0; }
     ¦   ¦   ¦   ¦   ¦   ¦   ¦   ¦   ¦   ¦               ^
 1 error generated.
 checked program was:
 /* begin */
  1: #include "ruby.h"  #### <= includes only ruby.h
  2:-
  3: /*top*/
  4: extern int t(void);
  5: int main(int argc, char **argv)
  6: {
  7:   if (argc > 1000000) {
  8:     printf("%p", &t);
  9:   }
 10:-
 11:   return 0;
 12: }
 13: int t(void) { void ((*volatile p)()); p = (void ((*)()))HMAC_CTX_copy;
 return 0; }
 /* end */
 }}}
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/62500#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list