Re: [MacPorts] #58060: Build error on Ubuntu when libmd-dev is installed: unknown type name ‘SHA2_CTX’ / conflicting types for ‘SHA256_CTX’

MacPorts noreply at macports.org
Thu Mar 30 12:17:00 UTC 2023


#58060: Build error on Ubuntu when libmd-dev is installed: unknown type name
‘SHA2_CTX’ / conflicting types for ‘SHA256_CTX’
---------------------+--------------------------------------
  Reporter:  mojca   |      Owner:  Mihai Moldovan <ionic@…>
      Type:  defect  |     Status:  closed
  Priority:  Low     |  Milestone:
 Component:  base    |    Version:
Resolution:  fixed   |   Keywords:
      Port:          |
---------------------+--------------------------------------
Changes (by Mihai Moldovan <ionic@…>):

 * status:  new => closed
 * owner:  (none) => Mihai Moldovan <ionic@…>
 * resolution:   => fixed


Comment:

 In [changeset:"1e2ff3991b8f50fab0eabacd3b72cd42099f6e83/macports-base"
 1e2ff3991b8f50fab0eabacd3b72cd42099f6e83/macports-base] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-base"
 revision="1e2ff3991b8f50fab0eabacd3b72cd42099f6e83"
 Fix libmd linux (#237)

 The standalone libmd implementation as used on Linux includes a header
 called "sha2.h" which is supposed to be relative to its own include
 directory.

 Unfortunately, MacPorts ships its own SHA2 implementation in pextlib (in
 case neither CommonCrypto, nor libmd nor OpenSSL-like implementations
 are available), which also uses the "sha2.h" header file name. This
 seems to take precedence and both header files are not compatible, so
 the build fails.

 Move the standalone SHA2 implementation to src/compat/sha2 and update
 the references.

 Additionally, SHA1_File is almost never a proper function, but most
 often defined as a macro set to the real function. In any case, checking
 for it via AC_CHECK_FUNCS() is wrong, so switch to AC_CHECK_DECLS() and
 use the updated checking macros.

 Fixes: https://trac.macports.org/ticket/58060
 }}}

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


More information about the macports-tickets mailing list