cannot build with pyopenssl

883 views
Skip to first unread message

Booze Aholic

unread,
Aug 1, 2015, 3:17:52 PM8/1/15
to Kivy users support
Not quite sure what I'm doing wrong here. I get the same error that prevents me from building pyopenssl whether I try to  run

./distribute.sh -m "pyopenssl kivy"


or include it as a line in buildozer.spec, as in:

requirements = kivy,pyopenssl

Specifically, here is what I get when I run either the distribute.sh script or buildozer android debug


ccache arm
-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot ~/.buildozer/android/platform/android-ndk-r9c//platforms/android-14/arch-arm -I/PATH_TO_MY_PROJECT/python-for-android/build/openssl/openssl-1.0.2d/include -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot ~/.buildozer/android/platform/android-ndk-r9c//platforms/android-14/arch-arm -fPIC -I/PATH_TO_MY_PROJECT/python-for-android/build/python-install/include/python2.7 -c OpenSSL/crypto/crl.c -o build/temp.linux-x86_64-2.7/OpenSSL/crypto/crl.o
OpenSSL/crypto/crl.c:6:23: error: static declaration of 'X509_REVOKED_dup' follows non-static declaration
 
static X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *orig) {
                       
^
In file included from PATH_TO_MY_PROJECT/python-for-android/build/openssl/openssl-1.0.2d/include/openssl/ssl.h:156:0,
                 
from OpenSSL/crypto/x509.h:17,
                 
from OpenSSL/crypto/crypto.h:30,
                 
from OpenSSL/crypto/crl.c:3:
PATH_TO_MY_PROJECT/python-for-android/build/openssl/openssl-1.0.2d/include/openssl/x509.h:751:15: note: previous declaration of 'X509_REVOKED_dup' was here
 X509_REVOKED
*X509_REVOKED_dup(X509_REVOKED *rev);
               
^
error
: command 'ccache' failed with exit status 1
ここにコードを入力...


I googled this error, but no obvious fix comes up. My platform is Ubuntu 14.04.

Any ideas?

Tom Rota

unread,
Aug 2, 2015, 7:13:39 AM8/2/15
to Kivy users support
Have you tried changing the requirements in the buildozer spec to "openssl", rather than "pyopenssl"?  Maybe you'd get the same error, but it is a quick test.

Booze Aholic

unread,
Aug 2, 2015, 12:06:38 PM8/2/15
to Kivy users support
I have, and have had no problem getting openSSL to work fine with both buildozer and python-for-android.

2015年8月2日日曜日 7時13分39秒 UTC-4 Tom Rota:

keyw...@gmail.com

unread,
Sep 4, 2015, 7:04:36 PM9/4/15
to Kivy users support
They got a small issue with pyOpenSSL-0.13 there https://github.com/sumanj/frankencert/issues/4 and replacing "..dup" with "..dupe" worked for me so, if you're not sure git clean -dxf, let it run until it reports that error, then navigate to "<p4a dir>/build/pyopenssl/pyOpenSSL-0.13/OpenSSL/crypto/crl.c" and replace :)

Garage Science

unread,
Oct 26, 2016, 9:00:58 PM10/26/16
to Kivy users support
Thanks you for the fix!
I had the same error when running the making lucida on linux:


error: static declaration of ‘X509_REVOKED_dup’ follows non-static declaration
     static X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *orig) {
                           ^~~~~~~~~~~~~~~~
    In file included from /usr/include/openssl/ssl.h:156:0,

                     from OpenSSL/crypto/x509.h:17,
                     from OpenSSL/crypto/crypto.h:30,
                     from OpenSSL/crypto/crl.c:3:
    /usr/include/openssl/x509.h:751:15: note: previous declaration of ‘X509_REVOKED_dup’ was here
     X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev);

Didn't need to git clean, but, it worked for me by editing the line X509_REVOKED_dup to X509_REVOKED_dupe in my /usr/include/openssl/x509.h file. 
I think it's likely a typo they haven't fixed in an older version.
Reply all
Reply to author
Forward
0 new messages