incorrectly assumes presence of comp.h

Issue #2811 new
Dominyk Tiller created an issue

There's an erroneous assumption in that the OpenSSL header comp.h will always be available, and consequently when that header isn't available the build can fail:

 File "/private/tmp/pypy-20180426-89170-ltfanb/pypy2-v6.0.0-src/rpython/rtyper/tool/", line 844, in configure_external_library
    raise last_error
[translation:ERROR] CompilationError: CompilationError(err="""
    /private/tmp/pypy-20180426-89170-ltfanb/pypy2-v6.0.0-src/usession-release-pypy2.7-v6.0.0-0/platcheck_77.c:87:10: fatal error: 'openssl/comp.h' file not found
    #include <openssl/comp.h>
    1 error generated.

Whilst it is usually available, it is perfectly legitimate to build openssl with no-comp passed during compile, which apparently disables installing that header entirely. Homebrew, the macOS package manager, has recently switched its OpenSSL formula to build with no-comp, which has revealed this issue.

Normally in C you could wrap the header inclusion in something like #ifndef OPENSSL_NO_COMP but I'm not sure how to achieve that in Python.

Comments (4)

  1. Yusuke Tsutsumi

    It looks like ropenssl may have problems, even removing the comp.h include.

    I remove the line in question that adds comp.h, and ended up with:

            /usr/local/opt/openssl/include/openssl/ossl_typ.h:181:16: note: forward declaration of 'struct comp_method_st'
            typedef struct comp_method_st COMP_METHOD;

    I removed this line:

    It looks like ossl_type.h depends on it.

  2. Yusuke Tsutsumi

    Sorry error in question is:

           implement_12.c:54371:14: error: incomplete definition of type 'struct comp_method_st'
                    l_v316938 = COMP_get_name(l_a0_402);
  3. Log in to comment