Menu

#2504 build failure on OS X 10.9 Mavericks

64-bit
closed
None
5
2020-07-03
2013-10-24
No

net-snmp 5.7.2 fails to build on OS X 10.9 Mavericks. The build succeeds if I copy include/net-snmp/system/darwin12.h to include/net-snmp/system/darwin13.h and make the same minimal edits that were made when include/net-snmp/system/darwin11.h was copied to include/net-snmp/system/darwin12.h before.

Discussion

  • Niels Baggesen

    Niels Baggesen - 2013-10-30

    Thank for the hint, I have done that for 5.7 and trunk.

    A couple of questions (as I only have access to a darwin10 system):
    are the two defines that SHA256 and SHA512 still required?
    could you maybe try out the current 5-7-patches branch? There has been a lot of code added in support of FreeBSD and Darwin - but only tested by myself :-(

    /Niels

     
  • Niels Baggesen

    Niels Baggesen - 2013-10-30
    • status: open --> pending
    • assigned_to: Niels Baggesen
     
  • Anonymous

    Anonymous - 2014-12-12

    This issue has resurfaced with the release of OS X 10.10 (darwin 14.0). If I copy darwin13.h to darwin14.h, the build succeeds.

     
  • Niels Baggesen

    Niels Baggesen - 2014-12-15

    Thanks, I have added the file for the 5.7.patches branch.
    My question still stands: are the defines for OPENSSL_NO_SHA256_h (and 512) still needed for the newer Darwins?

     
  • Andrew Janke

    Andrew Janke - 2015-09-14

    Resurfaced again with OS X 10.11 (darwin 15.0). Copying darwin13.h to darwin14.h makes the build succeed.

    I don't know how to determine whether those defines are still needed. Is it just a matter of commenting them out and seeing if the build still works?

     
  • Niels Baggesen

    Niels Baggesen - 2015-09-14

    It is surely a god try ...

    Please try it out, and report back

    Niels

     
  • Andrew Janke

    Andrew Janke - 2015-09-17

    I think OPENSSL_NO_SHA256 and OPENSSL_NO_SHA512 are no longer needed. Or rather, you can no longer know ahead of time whether they are needed.

    It looks like they were needed in earlier versions of OS X because OS X shipped with an older version of OpenSSL 0.9.8 that didn't have sha256 or sha512. OS X 10.11 "El Capitan" (darwin15) no longer ships OpenSSL at all. So net-snmp must be compiled against a user-supplied openssl, and you don't know what version it will be.

    In the case of Homebrew, it's supplying newer versions of openssl which do have sha256 and sha512.

    I removed them and compiled net-snmp on OS X 10.11 with Homebrew's openssl 1.0.2d and it worked fine.

    Could these #defines be replaced with configure directive that check for the sha256 and sha512 features in the openssl it's building against? Even on older versions of OS X, users might be compiling against a newer user-supplied openssl library instead of the system one. That looks like it could be enough to combine all the version-specific darwinNN.h headers into a single darwin.h, too. Then you wouldn't have to do this update each year.

     
  • Ryan Carsten Schmidt

    Any progress on this issue? It would be great to get rid of the OS-version-specific headers that make assumptions that might not be true. I agree with Andrew that configure script checks seem like the right way to check for the availability of features.

     
  • Ryan Carsten Schmidt

    Just a reminder that this continues to be a stumbling block every year when a new version of macOS is released.

     
  • Hanspeter Niederstrasser

    Commit 5c209f9 was a little forward looking in adding darwinXX.h up to XX=21 (but 18-21 just include darwin17.h). Presumably Big Sur will be darwin20.

     
  • Bart Van Assche

    Bart Van Assche - 2020-07-03

    The many Darwin header files have been merged into a single header file on the V5-8-patches and master branches. It would be appreciated if someone could help with testing one or both branches.

     
  • Bart Van Assche

    Bart Van Assche - 2020-07-03
    • status: pending --> closed
     

Log in to post a comment.